patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/i40e: fix potential Tx hang
@ 2021-04-19  7:58 Wenzhuo Lu
  0 siblings, 0 replies; only message in thread
From: Wenzhuo Lu @ 2021-04-19  7:58 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, stable

Tx hang may happen if there's no memory barrier.

Fixes: b4669bb95038 ("i40e: add vector Tx")
Fixes: aed68d5b0e81 ("net/i40e: add AVX2 Tx function")
Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
Cc: stable@dpdk.org

Reported-by: Tao Yang <tao.y.yang@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c   | 1 +
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 1 +
 drivers/net/i40e/i40e_rxtx_vec_sse.c    | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 3b9eef9..a06813c 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -816,6 +816,7 @@
 
 	txq->tx_tail = tx_id;
 
+	rte_io_wmb();
 	I40E_PCI_REG_WC_WRITE(txq->qtx_tail, txq->tx_tail);
 
 	return nb_pkts;
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
index bd21d64..2f0915e 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
@@ -1111,6 +1111,7 @@
 
 	txq->tx_tail = tx_id;
 
+	rte_io_wmb();
 	I40E_PCI_REG_WC_WRITE(txq->qtx_tail, txq->tx_tail);
 
 	return nb_pkts;
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index bfa5aff..b37bc71 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -759,6 +759,7 @@
 
 	txq->tx_tail = tx_id;
 
+	rte_io_wmb();
 	I40E_PCI_REG_WC_WRITE(txq->qtx_tail, txq->tx_tail);
 
 	return nb_pkts;
-- 
1.9.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-19  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19  7:58 [dpdk-stable] [PATCH] net/i40e: fix potential Tx hang Wenzhuo Lu

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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