[dpdk-dev] mbuf pool and ring size...

Vithal Mohare vmohare at arubanetworks.com
Tue Sep 22 07:10:12 CEST 2015


Hi,

While creating mbuf pool, suppose if mbuf-pool size passed to DPDK API is already pow-of-2  [ rte_mempool_create()-->rte_mempool_xmem_create()].  Then, noticed that, corresponding size of the ring created for this pool will be double the size of mbuf-pool.  This is because of below code snippet:
                rte_mempool_xmem_create(...) {
                                ....
r = rte_ring_create(rg_name, rte_align32pow2(n+1), socket_id, rg_flags);  <<<<<<<< Notice that its 'n+1' here,  rte_align32pow2(n+1)
....
                }
Question: why is this 'n+1'? Shouldn't this be just 'n'?

Thanks,
-Vithal


More information about the dev mailing list