> -----Original Message-----
> From: Dmitry Kozlyuk <dmitry.kozl...@gmail.com>
> Sent: Wednesday, October 20, 2021 3:34 AM
> To: Harman Kalra <hka...@marvell.com>
> Cc: dev@dpdk.org; Anatoly Burakov <anatoly.bura...@intel.com>;
> david.march...@redhat.com; m...@ashroe.eu; tho...@monjalon.net
> Subject: [EXT] Re: [PATCH v4 1/7] malloc: introduce malloc is ready API
> 
> External Email
> 
> ----------------------------------------------------------------------
> 2021-10-20 01:01 (UTC+0300), Dmitry Kozlyuk:
> > 2021-10-20 00:05 (UTC+0530), Harman Kalra:
> > [...]
> > >  static unsigned
> > >  check_hugepage_sz(unsigned flags, uint64_t hugepage_sz)  { @@
> > > -1328,6 +1330,7 @@ rte_eal_malloc_heap_init(void)  {
> > >   struct rte_mem_config *mcfg = rte_eal_get_configuration()-
> >mem_config;
> > >   unsigned int i;
> > > + int ret;
> > >   const struct internal_config *internal_conf =
> > >           eal_get_internal_configuration();
> > >
> > > @@ -1369,5 +1372,16 @@ rte_eal_malloc_heap_init(void)
> > >           return 0;
> >
> > A secondary process exits here...
> >
> > >   /* add all IOVA-contiguous areas to the heap */
> > > - return rte_memseg_contig_walk(malloc_add_seg, NULL);
> > > + ret = rte_memseg_contig_walk(malloc_add_seg, NULL);
> > > +
> > > + if (ret == 0)
> > > +         malloc_ready = true;
> >
> > ...and never knows that malloc is ready.
> > But malloc is always ready for a secondary process.
> 
> That is, before returning 0 above for a secondary process malloc_ready
> should be set unconditionally.

Yes, thanks for catching this, I will fix it V5.

Reply via email to