net/i40e: fix potential Tx hang
Checks
Commit Message
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(+)
@@ -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;
@@ -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;
@@ -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;