From: "Zhang, Chen" <chen.zhang@intel.com>
To: Derek Su <dereksu@qnap.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
"lizhijian@cn.fujitsu.com" <lizhijian@cn.fujitsu.com>
Subject: RE: [PATCH v1 1/2] colo-compare: Fix incorrect data type conversion
Date: Sun, 13 Sep 2020 20:02:13 +0000 [thread overview]
Message-ID: <3c5d8cfd966a415c896c0d8e814e4ab9@intel.com> (raw)
In-Reply-To: <20200911190508.1316487-2-dereksu@qnap.com>
> -----Original Message-----
> From: Derek Su <dereksu@qnap.com>
> Sent: Saturday, September 12, 2020 3:05 AM
> To: qemu-devel@nongnu.org
> Cc: Zhang, Chen <chen.zhang@intel.com>; lizhijian@cn.fujitsu.com;
> jasowang@redhat.com; Derek Su <dereksu@qnap.com>
> Subject: [PATCH v1 1/2] colo-compare: Fix incorrect data type conversion
>
> Fix data type conversion of compare_timeout. The incorrect conversion
> results in a random compare_timeout value and unexpected stalls in packet
> comparison.
>
This bug already found on our internal test too. Just waiting to send.
Good catch! But this patch not fixed the root cause.
Change the compare_timeout from uint32_t to uint64_t is better.
I will send a patch for this and tag reported by you.
Thanks
Zhang Chen
> Signed-off-by: Derek Su <dereksu@qnap.com>
> ---
> net/colo-compare.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c index
> 2c20de1537..c4de86ef34 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -619,11 +619,12 @@ static int colo_packet_compare_other(Packet *spkt,
> Packet *ppkt)
> ppkt->size - offset); }
>
> -static int colo_old_packet_check_one(Packet *pkt, int64_t *check_time)
> +static int colo_old_packet_check_one(Packet *pkt, void *user_data)
> {
> int64_t now = qemu_clock_get_ms(QEMU_CLOCK_HOST);
> + uint32_t check_time = *(uint32_t *)user_data;
>
> - if ((now - pkt->creation_ms) > (*check_time)) {
> + if ((now - pkt->creation_ms) > check_time) {
> trace_colo_old_packet_check_found(pkt->creation_ms);
> return 0;
> } else {
> --
> 2.25.1
next prev parent reply other threads:[~2020-09-13 20:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 19:05 [PATCH v1 0/2] colo-compare bugfixes Derek Su
2020-09-11 19:05 ` [PATCH v1 1/2] colo-compare: Fix incorrect data type conversion Derek Su
2020-09-13 20:02 ` Zhang, Chen [this message]
2020-09-14 0:31 ` Derek Su
2020-09-11 19:05 ` [PATCH v1 2/2] colo-compare: Record packet creation time by QEMU_CLOCK_REALTIME Derek Su
2020-09-13 20:02 ` Zhang, Chen
2020-09-13 20:06 ` Zhang, Chen
2020-09-14 1:00 ` Derek Su
2020-09-14 7:42 ` Zhang, Chen
2020-09-14 16:23 ` Derek Su
2020-09-15 0:09 ` Zhang, Chen
2020-09-15 1:50 ` Derek Su
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=3c5d8cfd966a415c896c0d8e814e4ab9@intel.com \
--to=chen.zhang@intel.com \
--cc=dereksu@qnap.com \
--cc=jasowang@redhat.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
/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).