From bf4444261232eb36106067cbef8188dda784cd57 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Thu, 27 Jan 2022 15:40:01 +0800 Subject: [PATCH] net/i40e: remove redundant reset operation For free buffer operation in i40e vector path, it is unnecessary to store 'NULL' into txep.mbuf. This is because when putting mbuf into Tx queue, tx_tail is the sentinel. And when doing tx_free, tx_next_dd is the sentinel. In all processes, mbuf==NULL is not a condition in check. Thus reset of mbuf is unnecessary and can be omitted. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang Acked-by: Qi Zhang --- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index f9a7f46550..959832ed6a 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -103,7 +103,7 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) { for (i = 0; i < n; i++) { free[i] = txep[i].mbuf; - txep[i].mbuf = NULL; + /* no need to reset txep[i].mbuf in vector path */ } rte_mempool_put_bulk(free[0]->pool, (void **)free, n); goto done; -- 2.39.5