[dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable

Yongseok Koh yskoh at mellanox.com
Mon Aug 12 20:49:52 CEST 2019


> On Aug 9, 2019, at 4:09 AM, Tiwei Bie <tiwei.bie at intel.com> wrote:
> 
> [ backported from upstream commit 8f66bc4ac3c0d4a11252d860f495abd806aa871f ]
> 
> Typically, after enabling Rx interrupt, a check should be done
> to make sure that there is no new incoming packets before going
> to sleep. So a barrier is needed to make sure that any following
> check won't happen before the interrupt is actually enabled.
> 
> Fixes: c056be239db5 ("net/virtio: add Rx interrupt enable/disable functions")
> 
> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---

applied to stable/17.11

thanks,
Yongseok

> drivers/net/virtio/virtio_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index b3e55ff3b..1bdf37e4b 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -739,6 +739,7 @@ virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
> 	struct virtqueue *vq = rxvq->vq;
> 
> 	virtqueue_enable_intr(vq);
> +	virtio_mb();
> 	return 0;
> }
> 
> -- 
> 2.17.1
> 



More information about the stable mailing list