From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: leirao <lei.rao@intel.com>, <chen.zhang@intel.com>,
<jasowang@redhat.com>, <quintela@redhat.com>,
<dgilbert@redhat.com>, <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] Optimize seq_sorter function for colo-compare
Date: Tue, 22 Sep 2020 14:49:42 +0800 [thread overview]
Message-ID: <b48d0d92-b65d-4e22-88f2-42dfc8b07fa6@cn.fujitsu.com> (raw)
In-Reply-To: <1600485023-263643-2-git-send-email-lei.rao@intel.com>
On 9/19/20 11:10 AM, leirao wrote:
> The seq of tcp has been filled in fill_pkt_tcp_info, it
> can be used directly here.
>
> Signed-off-by: leirao <lei.rao@intel.com>
Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> net/colo-compare.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index 3a45d64..86980ce 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -196,11 +196,7 @@ static void colo_compare_inconsistency_notify(CompareState *s)
>
> static gint seq_sorter(Packet *a, Packet *b, gpointer data)
> {
> - struct tcp_hdr *atcp, *btcp;
> -
> - atcp = (struct tcp_hdr *)(a->transport_header);
> - btcp = (struct tcp_hdr *)(b->transport_header);
> - return ntohl(atcp->th_seq) - ntohl(btcp->th_seq);
> + return a->tcp_seq - b->tcp_seq;
> }
>
> static void fill_pkt_tcp_info(void *data, uint32_t *max_ack)
next prev parent reply other threads:[~2020-09-22 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 3:10 [PATCH 0/3] Optimized some code for COLO leirao
2020-09-19 3:10 ` [PATCH 1/3] Optimize seq_sorter function for colo-compare leirao
2020-09-22 6:49 ` Li Zhijian [this message]
2020-09-19 3:10 ` [PATCH 2/3] Reduce the time of checkpoint for COLO leirao
2020-09-22 6:57 ` Li Zhijian
2020-09-22 9:11 ` Rao, Lei
2020-09-19 3:10 ` [PATCH 3/3] Fix the qemu crash when guest shutdown in COLO mode leirao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b48d0d92-b65d-4e22-88f2-42dfc8b07fa6@cn.fujitsu.com \
--to=lizhijian@cn.fujitsu.com \
--cc=chen.zhang@intel.com \
--cc=dgilbert@redhat.com \
--cc=jasowang@redhat.com \
--cc=lei.rao@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).