qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specif


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specified Connection
Date: Wed, 15 Nov 2017 18:57:52 +0000

On 14 November 2017 at 02:11, Jason Wang <address@hidden> wrote:
> From: Mao Zhongyi <address@hidden>
>
> A package from pri_indev or sec_indev only belongs to a particular
> Connection, so we only need to compare the package in the specified
> Connection's primary_list and secondary_list, rather than for each
> the whole Connection list to compare. This is time-consuming and
> unnecessary.
>
> Less checkpoint more efficiency.
>
> Cc: Zhang Chen <address@hidden>
> Cc: Li Zhijian <address@hidden>
> Cc: Jason Wang <address@hidden>
> Signed-off-by: Mao Zhongyi <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>
> ---
>  net/colo-compare.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index 54b6347..5d2429b 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -136,7 +136,7 @@ static int colo_insert_packet(GQueue *queue, Packet *pkt)
>   * Return 0 on success, if return -1 means the pkt
>   * is unsupported(arp and ipv6) and will be sent later
>   */
> -static int packet_enqueue(CompareState *s, int mode)
> +static int packet_enqueue(CompareState *s, int mode, Connection **con)
>  {
>      ConnectionKey key;
>      Packet *pkt = NULL;
> @@ -179,6 +179,7 @@ static int packet_enqueue(CompareState *s, int mode)
>                           "drop packet");
>          }
>      }
> +    con = &conn;
>
>      return 0;
>  }

Coverity points out that this looks a bit fishy --
presumably you meant
  *con = conn;

? The statement you have now doesn't do anything, since
'con' is unused after you change it.

(CID 1382804.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]