]> git.droids-corp.org - dpdk.git/commitdiff
net/i40e: remove redundant reset operation
authorFeifei Wang <feifei.wang2@arm.com>
Thu, 27 Jan 2022 07:40:01 +0000 (15:40 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 28 Jan 2022 06:56:20 +0000 (07:56 +0100)
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 <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_rxtx_vec_common.h

index f9a7f46550502abba53c57b6e4edab6b58e5b2da..959832ed6a426f8e80ef540940334c69dcdfa60f 100644 (file)
@@ -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;