From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Huawei Xie <huawei.xie@intel.com>
Cc: dev@dpdk.org, yuanhan.liu@intel.com, thomas.monjalon@6wind.com,
mst@redhat.com, jianfeng.tan@intel.com,
stephen@networkplumber.org, konstantin.ananyev@intel.com,
bruce.richardson@intel.com
Subject: Re: [PATCH v2] virtio: fix idx in used ring retrieved only once
Date: Mon, 20 Jun 2016 19:46:49 +0800 [thread overview]
Message-ID: <20160620114649.GH23111@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1466358532-101416-1-git-send-email-huawei.xie@intel.com>
On Mon, Jun 20, 2016 at 01:48:52AM +0800, Huawei Xie wrote:
> In the following loop:
> while (vq->vq_used_cons_idx != vq->vq_ring.used->idx) {
> ...
> }
> There is no external function call or any explict memory barrier
> in the loop, the re-read of used->idx would be optimized and would
> only be retrieved once.
>
> use of voaltile normally should be prohibited, and access_once
> is Linux kernel's style to handle this issue; Once we have that
> macro in DPDK, we could change to that style.
>
> virtio_recv_mergable_pkts might have the same issue, so will be fixed.
>
> Fixes: 823ad647950a ("virtio: support multiple queues")
> Fixes: 13ce5e7eb94f ("virtio: mergeable buffers")
>
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Applied to dpdk-next-virtio.
Thanks.
--yliu
next prev parent reply other threads:[~2016-06-20 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 18:30 [PATCH] virtio: fix idx in used ring retrieved only once Huawei Xie
2016-06-19 17:48 ` [PATCH v2] " Huawei Xie
2016-06-20 11:46 ` Yuanhan Liu [this message]
2016-06-20 6:27 ` [PATCH] " Yuanhan Liu
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=20160620114649.GH23111@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=huawei.xie@intel.com \
--cc=jianfeng.tan@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=mst@redhat.com \
--cc=stephen@networkplumber.org \
--cc=thomas.monjalon@6wind.com \
--cc=yuanhan.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.