Skip to contentSkip to conversation

net/i40e: fix potential Tx hang

PATCH New Wenzhuo Lu 1 participant 1 message Apr 19, 2021 Network drivers

lore
Share & tools
lore

Wenzhuo Lu

author
#0 lore raw

PATCH 1/1 net/i40e: fix potential Tx hang

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")
---
 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(+)
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -0
index 3b9eef9..a06813c 100644
@@ -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;
drivers/net/i40e/i40e_rxtx_vec_avx512.c +1 -0
index bd21d64..2f0915e 100644
@@ -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;
drivers/net/i40e/i40e_rxtx_vec_sse.c +1 -0
index bfa5aff..b37bc71 100644
@@ -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;
Signature · 1 line
1.9.3