I didn't modified the attach function,I modified the rte_eal_config_create. primay process first mmap's address, use a lower address, to avoid secondary process mmap the fixed address fail. the secondary still mmap the same address as the primary. dpdk do the same thing in rte_fbarray_init() function.
------------------origin------------------ from:DavidMarchand <david.march...@redhat.com> to:Burakov, Anatoly <anatoly.bura...@intel.com>; copy:hanli....@zte.com.cn;Thomas Monjalon <tho...@monjalon.net>;dev <dev@dpdk.org>; date :2019年10月24日 15:38 title :Re: [dpdk-dev] [PATCH v3] lib/librte_eal/linuxapp: fix runtime configmmap issue On Wed, Oct 23, 2019 at 7:47 PM Burakov, Anatoly <anatoly.bura...@intel.com> wrote: > > On 23-Oct-19 11:42 AM, Li Han wrote: > > In rte_eal_config_reattach(),the secondary mmap may fail > > due to the rte_mem_cfg_addr already be used by others.do > > the change just as the rte_fbarray_init() do.if no > > base_virtaddr,use the default 0x100000000. > > > > v2/v3: > > -fix code style issues > > > > Signed-off-by: Li Han <han....@zte.com.cn> > > --- > > Nack. There's a reason why we map it at the same address, and it's to > have all pointers working across processes. Remapping it at a different > address has potential to break things. Marked as rejected. Thanks. -- David Marchand