Message ID | 20200922095525.4081603-4-lizhijian@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | colo-compare: minor fixes | expand |
> -----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 3/3] colo-compare: check mark in mutual exclusion > > Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> By the way, we have other optimization here, will be sent in the future. Thanks Zhang Chen > --- > net/colo-compare.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/net/colo-compare.c b/net/colo-compare.c index > 039b515611..19633fc684 100644 > --- a/net/colo-compare.c > +++ b/net/colo-compare.c > @@ -481,13 +481,11 @@ sec: > colo_release_primary_pkt(s, ppkt); > g_queue_push_head(&conn->secondary_list, spkt); > goto pri; > - } > - if (mark == COLO_COMPARE_FREE_SECONDARY) { > + } else if (mark == COLO_COMPARE_FREE_SECONDARY) { > conn->compare_seq = spkt->seq_end; > packet_destroy(spkt, NULL); > goto sec; > - } > - if (mark == (COLO_COMPARE_FREE_PRIMARY | > COLO_COMPARE_FREE_SECONDARY)) { > + } else if (mark == (COLO_COMPARE_FREE_PRIMARY | > + COLO_COMPARE_FREE_SECONDARY)) { > conn->compare_seq = ppkt->seq_end; > colo_release_primary_pkt(s, ppkt); > packet_destroy(spkt, NULL); > -- > 2.28.0 > >
diff --git a/net/colo-compare.c b/net/colo-compare.c index 039b515611..19633fc684 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -481,13 +481,11 @@ sec: colo_release_primary_pkt(s, ppkt); g_queue_push_head(&conn->secondary_list, spkt); goto pri; - } - if (mark == COLO_COMPARE_FREE_SECONDARY) { + } else if (mark == COLO_COMPARE_FREE_SECONDARY) { conn->compare_seq = spkt->seq_end; packet_destroy(spkt, NULL); goto sec; - } - if (mark == (COLO_COMPARE_FREE_PRIMARY | COLO_COMPARE_FREE_SECONDARY)) { + } else if (mark == (COLO_COMPARE_FREE_PRIMARY | COLO_COMPARE_FREE_SECONDARY)) { conn->compare_seq = ppkt->seq_end; colo_release_primary_pkt(s, ppkt); packet_destroy(spkt, NULL);
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> --- net/colo-compare.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)