[dpdk-dev] Looks like rte_mempool_free_count() and rte_mempool_count() are swapped

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Jan 2 14:32:22 CET 2014

12/09/2013 09:52, Dmitry Vyal :
> If I understand it correctly, the ring contains free buffers and
> rte_ring_count() returns a number of entries inside a ring. So this
> function actually calculates the number of free entries, not busy.

Yes, you're right. mempool's objects are free mbufs.
So mempool_count is the number of free mbufs,
and mempool_free_count is the number of free slots to store more free mbufs.
I agree that the naming is confusing but I'm not sure we should change it.


More information about the dev mailing list