[PATCH] mempool: fix rte primary program coredump

Stephen Hemminger stephen at networkplumber.org
Fri Jun 30 23:36:46 CEST 2023


On Thu, 27 Jan 2022 11:06:56 +0100
Olivier Matz <olivier.matz at 6wind.com> wrote:

> > 
> >  this array in primary program is different with secondary program.
> >  so when secondary program call rte_pktmbuf_pool_create_by_ops() with
> >  mempool name “ring_mp_mc”, but the primary program use "bucket" type
> >  to alloc rte_mbuf.
> > 
> >  so sort this array both primary program and secondary program when init
> >  memzone.
> > 
> > Signed-off-by: Tianli Lai <laitianli at tom.com>  
> 
> I think it is the same problem than the one described here:
> http://inbox.dpdk.org/dev/1583114253-15345-1-git-send-email-xiangxia.m.yue@gmail.com/#r
> 
> To summarize what is said in the thread, sorting ops look dangerous because it
> changes the index during the lifetime of the application. A new proposal was
> made to use a shared memory to ensure the indexes are the same in primary and
> secondaries, but it requires some changes in EAL to have init callbacks at a
> specific place.
> 
> I have a draft patchset that may fix this issue by using the vdev infrastructure
> instead of a specific init, but it is not heavily tested. I can send it here as
> a RFC if you want to try it.
> 
> One thing that is not clear to me is how do you trigger this issue? Why the
> mempool ops are not loaded in the same order in primary and secondary?
> 
> Thanks,
> Olivier

Agree with Olivier, hard coded sort is not the best way to fix this.
Some work is needed to address either the ordering or communicate the list from primary/secondary


More information about the dev mailing list