From: Stephen Hemminger Date: Thu, 30 Apr 2020 19:08:49 +0000 (-0700) Subject: bus/vmbus: add missing barrier X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1c33435a58f307c1800a79220122026f56fee450;p=dpdk.git bus/vmbus: add missing barrier The check for event ring being empty needs a barrier to avoid any over aggressive optimization. This is same barrier as Linux kernel. Signed-off-by: Stephen Hemminger --- diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c index 46b3ba3f9f..ff2985c257 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; }