It should rarely be the case that we need to cleanup the descriptor ring mid-burst, so mark as unlikely to help performance.
Signed-off-by: Bruce Richardson <[email protected]> --- drivers/net/intel/common/tx_scalar_fns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/intel/common/tx_scalar_fns.h b/drivers/net/intel/common/tx_scalar_fns.h index cb45029bd7..27791cf138 100644 --- a/drivers/net/intel/common/tx_scalar_fns.h +++ b/drivers/net/intel/common/tx_scalar_fns.h @@ -272,7 +272,7 @@ ci_xmit_pkts(struct ci_tx_queue *txq, if (tx_last >= txq->nb_tx_desc) tx_last = (uint16_t)(tx_last - txq->nb_tx_desc); - if (nb_used > txq->nb_tx_free) { + if (unlikely(nb_used > txq->nb_tx_free)) { if (ci_tx_xmit_cleanup(txq) != 0) { if (nb_tx == 0) return 0; -- 2.51.0

