diff mbox series

[6/8] net/qede: prefetch txq->hw_cons_ptr

Message ID 52ddb58c1ca5fe43f0308517bc519ba931859840.1614938727.git.bnemeth@redhat.com (mailing list archive)
State Changes Requested
Delegated to: Jerin Jacob
Headers show
Series Optimize qede use of rx/tx_entries | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Balazs Nemeth March 5, 2021, 1:14 p.m. UTC
Ensure that, while ecore_chain_get_cons_idx is running, txq->hw_cons_ptr
is prefetched. This shows a slight performance improvement.

Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
---
 drivers/net/qede/qede_rxtx.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index e24a937f4..b74a1ec1b 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -894,6 +894,7 @@  qede_process_tx_compl(__rte_unused struct ecore_dev *edev,
 	uint16_t first_idx;
 
 	rte_compiler_barrier();
+	rte_prefetch0(txq->hw_cons_ptr);
 	sw_tx_cons = ecore_chain_get_cons_idx(&txq->tx_pbl);
 	hw_bd_cons = rte_le_to_cpu_16(*txq->hw_cons_ptr);
 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX