DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Meaning of ETH_TXQ_FLAGS_NOREFCOUNT
@ 2015-12-07 17:37 Mike Stolarchuk
  0 siblings, 0 replies; only message in thread
From: Mike Stolarchuk @ 2015-12-07 17:37 UTC (permalink / raw)
  To: dev

Hello,

I would have thought that ETH_TXQ_FLAGS_NOREFCOUNT,
when enabled, would mean to ignore ref counts, as commented
in rte_ethdev.h:

#define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 /**< refcnt can be ignored */

But it seems to be used differently:

    if (!(txq->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOREFCOUNT)) {
        for (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) {
            rte_mempool_put(txep->mbuf->pool, txep->mbuf);
            txep->mbuf = NULL;
        }

So that if its -not- set, then rte_mempool_put() is called, and if it
is set then rte_pktmbuf_free_seg() is called.

Also, it seems to be used the same way in both the i40e driver
and the ixgbe driver:  when its set it decr's the refcount, when
its unset it ignores the refcnt, but these are the only two drivers
which seem to honor the flag.

Any chance of getting a little more information the intent here?

regards,
mts.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-07 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 17:37 [dpdk-dev] Meaning of ETH_TXQ_FLAGS_NOREFCOUNT Mike Stolarchuk

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).