From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 3/7] net/vmbus: add missing barrier
Date: Thu, 30 Apr 2020 12:08:49 -0700 [thread overview]
Message-ID: <20200430190853.498-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20200430190853.498-1-stephen@networkplumber.org>
The check for event ring being empty needs a barrier
to avoid any over agressive optimization.
This is same barrier as Linux kernel.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/vmbus/vmbus_channel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c
index 46b3ba3f9f9e..ff2985c25758 100644
--- a/drivers/bus/vmbus/vmbus_channel.c
+++ b/drivers/bus/vmbus/vmbus_channel.c
@@ -199,6 +199,7 @@ bool rte_vmbus_chan_rx_empty(const struct vmbus_channel *channel)
{
const struct vmbus_br *br = &channel->rxbr;
+ rte_smp_rmb();
return br->vbr->rindex == br->vbr->windex;
}
--
2.20.1
next prev parent reply other threads:[~2020-04-30 19:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 19:08 [dpdk-dev] [PATCH 0/7] net/netvsc: more minor fixes Stephen Hemminger
2020-04-30 19:08 ` [dpdk-dev] [PATCH 1/7] net/netvsc: fix comment spelling errors Stephen Hemminger
2020-04-30 19:08 ` [dpdk-dev] [PATCH 2/7] bus/vmbus: " Stephen Hemminger
2020-04-30 19:08 ` Stephen Hemminger [this message]
2020-04-30 19:08 ` [dpdk-dev] [PATCH 4/7] net/netvsc: check the vmbus ring buffer more often Stephen Hemminger
2020-04-30 19:08 ` [dpdk-dev] [PATCH 5/7] net/netvsc: manage VF port under rwlock Stephen Hemminger
2020-04-30 19:08 ` [dpdk-dev] [PATCH 6/7] net/netvsc: do RSS across rx queue only Stephen Hemminger
2020-04-30 19:08 ` [dpdk-dev] [PATCH 7/7] net/netvsc: don't configure RSS if disabled Stephen Hemminger
2020-05-05 18:14 ` [dpdk-dev] [PATCH 0/7] net/netvsc: more minor fixes Ferruh Yigit
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=20200430190853.498-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.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).