[2/3] net/ice: reduce redundant store operation
Checks
Commit Message
For free buffer in ice driver, 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>
---
drivers/net/ice/ice_rxtx.c | 2 --
1 file changed, 2 deletions(-)
@@ -2893,12 +2893,10 @@ ice_tx_free_bufs(struct ice_tx_queue *txq)
if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) {
for (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) {
rte_mempool_put(txep->mbuf->pool, txep->mbuf);
- txep->mbuf = NULL;
}
} else {
for (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) {
rte_pktmbuf_free_seg(txep->mbuf);
- txep->mbuf = NULL;
}
}