patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable
@ 2019-08-09 11:09 Tiwei Bie
  2019-08-12 18:49 ` Yongseok Koh
  0 siblings, 1 reply; 2+ messages in thread
From: Tiwei Bie @ 2019-08-09 11:09 UTC (permalink / raw)
  To: yskoh, stable; +Cc: maxime.coquelin, zhihong.wang

[ 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@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable
  2019-08-09 11:09 [dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable Tiwei Bie
@ 2019-08-12 18:49 ` Yongseok Koh
  0 siblings, 0 replies; 2+ messages in thread
From: Yongseok Koh @ 2019-08-12 18:49 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: stable, maxime.coquelin, zhihong.wang


> On Aug 9, 2019, at 4:09 AM, Tiwei Bie <tiwei.bie@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@intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@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
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-12 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 11:09 [dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable Tiwei Bie
2019-08-12 18:49 ` Yongseok Koh

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).