[dpdk-dev] condition for calling ixgbe_xmit_cleanup

Qing Wan qwan at evertz.com
Wed Feb 12 23:50:03 CET 2014


Hi,

 

There are following code in function ixgbe_xmit_pkts,

....

if ((txq->nb_tx_desc - txq->nb_tx_free) > txq->tx_free_thresh) {

                ixgbe_xmit_cleanup(txq);

}

....

My understanding is, nb_tx_desc means total number of descriptors in
ring and nx_tx_free represents how many descriptors are available, so
txq->nb_tx_desc - txq->nb_tx_free means how many we have used. I'm not
quite understand the meaning of this comparison.  Why is the condition
not something like "if (txq->nb_tx_free < tx_free_thresh)". 

 

really appreciate if someone could help me on this.

 

Thanks

Qing



More information about the dev mailing list