[dpdk-dev] Meaning of ETH_TXQ_FLAGS_NOREFCOUNT

Mike Stolarchuk mike.stolarchuk at bigswitch.com
Mon Dec 7 18:37:18 CET 2015


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.


More information about the dev mailing list