[Top][All Lists]

[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: Mao Zhongyi
Subject: Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specified Connection
Date: Thu, 16 Nov 2017 09:32:45 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 11/16/2017 02:57 AM, Peter Maydell wrote:
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

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;

Hi, Peter

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

Well´╝îI will fix it right away.

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

It will be used in colo_compare_connection.


reply via email to

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