patches for DPDK stable branches
 help / color / 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, back to index

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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox