DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] condition for calling ixgbe_xmit_cleanup
@ 2014-02-12 22:50 Qing Wan
  2014-02-12 23:31 ` Shaw, Jeffrey B
  0 siblings, 1 reply; 3+ messages in thread
From: Qing Wan @ 2014-02-12 22:50 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-13 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 22:50 [dpdk-dev] condition for calling ixgbe_xmit_cleanup Qing Wan
2014-02-12 23:31 ` Shaw, Jeffrey B
2014-02-13 14:59   ` Qing Wan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).