[dpdk-dev] mempool re-initialization

Nicolas Pernas Maradei nico at emutex.com
Wed Aug 20 10:56:14 CEST 2014


Hi,

At mempool creation time you can pass in a callback function to 
rte_mempool_create() that DPDK will call for every mbuf on the mempool 
so you can initialize them to your liking. However, there doesn't seem 
to be a straight forward way do that again once the mempool is already 
created though.

I'm wondering if there's a clean/nice way to re-initialize all mempool's 
mbufs once the mempool's been created?

I was thinking on something like retrieving all mbufs one by one, do my 
re-initialization and then put them back into the mempool. I'd have to 
make sure of getting all mbufs out before start putting them back again 
to avoid the cache, but that'd be OK. Of course this won't be on the 
fast-path.

Is there a cleaner way to do this? Any suggestion?

Thanks,
Nico.

-- 
Nicolás Pernas Maradei
Software Engineer
Emutex Ltd.



More information about the dev mailing list