[dpdk-dev] [PATCH 1/4] net/vmbus: add missing barrier
Ruifeng Wang
Ruifeng.Wang at arm.com
Wed Apr 29 04:31:01 CEST 2020
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Tuesday, April 28, 2020 7:28 AM
> To: dev at dpdk.org
> Cc: Stephen Hemminger <stephen at networkplumber.org>
> Subject: [dpdk-dev] [PATCH 1/4] net/vmbus: add missing barrier
>
> 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 at 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
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the dev
mailing list