[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 1/3] colo-compare: return -1 if no packet is queued
From: |
Zhang, Chen |
Subject: |
RE: [PATCH 1/3] colo-compare: return -1 if no packet is queued |
Date: |
Wed, 23 Sep 2020 01:41:52 +0000 |
> -----Original Message-----
> From: Li Zhijian <lizhijian@cn.fujitsu.com>
> Sent: Tuesday, September 22, 2020 5:55 PM
> To: Zhang, Chen <chen.zhang@intel.com>; jasowang@redhat.com
> Cc: qemu-devel@nongnu.org; Li Zhijian <lizhijian@cn.fujitsu.com>
> Subject: [PATCH 1/3] colo-compare: return -1 if no packet is queued
>
> Return 0 will trigger a packet comparison
>
Yes, we need active trigger a checkpoint to flush all the queued packets here.
Otherwise, we should drop all the packet after this time still next checkpoint.
So, I think original logic is a better choice.
Thanks
Zhang Chen
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> net/colo-compare.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c index
> 3a45d64175..039b515611 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -289,6 +289,7 @@ static int packet_enqueue(CompareState *s, int
> mode, Connection **con)
> "queue size too big, drop packet");
> packet_destroy(pkt, NULL);
> pkt = NULL;
> + return -1;
> }
>
> *con = conn;
> --
> 2.28.0
>
>