From 3f1f0bad15ee4658197131854fe1d2383c48a03c Mon Sep 17 00:00:00 2001 From: Balazs Nemeth Date: Fri, 26 Mar 2021 12:01:28 +0100 Subject: [PATCH] net/qede: prefetch hardware consumer 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 Reviewed-by: Igor Russkikh --- drivers/net/qede/qede_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index f439ee056f..4f58abfbf2 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -896,6 +896,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 -- 2.20.1