> I suspect that mbufs in use are put into mempool somehow. > Which functions do you use to free mbufs to the pool > on processing paths that do not end with `rte_eth_tx_burst()`? > You can build DPDK with `-Dc_args='-DRTE_LIBRTE_MBUF_DEBUG'` > to enable debug checks in the library.
I am using rte_pktmbuf_free(). My understanding is that it decrements the refcount, and unless it really reaches 0, will not free it back to the mempool. This is the only function that I ever use to decrement the refcount of any mbuf, or to free them. I think I might have found an error in my library's heap allocator which can result in duplicate references to copies of the same data header, which are supposed to be different headers. This could explain some of my problems if the above usage is correct. I will continue investigating this possibility. One thing gives me doubt. My code includes frequent checks of all refcounts, so if it was accessing something with a refcount of 0 then it should detect that, and so far it has not. I'll also try those debug checks. If they can detect a double free, that would be helpful evidence. Thank you, -Alan