[PATCH v4 2/3] mempool: fix dump of unpopulated pool

Morten Brørup mb at smartsharesystems.com
Thu Nov 19 15:20:33 CET 2026


> From: Morten Brørup
> Sent: Thursday, 19 November 2026 06.18
> 
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > Sent: Thursday, 19 November 2026 06.08
> >
> > 12/11/2026 16:43, Robert Sanford:
> > > +* **Added function to check if a mempool is created.**
> > > +
> > > +  Added the ``rte_mempool_is_created()`` function
> > > +  to check whether the store of a mempool has been created.
> > > +  ``rte_mempool_walk()`` callbacks can use it to skip mempools
> > > +  that are not populated yet before querying the mempool driver.
> >
> > If usage is internal, why exposing this function publicly?
> 
> It is also for public use:
> If an application walks the list of mempools using the public function
> rte_mempool_walk(), we need a public function for the application's
> callback to determine if the mempool is created (i.e. driver callbacks
> are initialized). If the mempool is not created, accessing the mempool
> driver is now allowed.

Typo: is NOT allowed.

> 
> >
> > [...]
> > > +bool rte_mempool_is_created(const struct rte_mempool *mp);
> >
> > Any new API must enter in an experimental first.
> > But here we may not need to expose it as an API?
> 
> If it is marked as experimental, it cannot be used internally, and its
> internal user would need to implement similar functionality.
> And since it is a simple function, we decided to skip the experimental
> stage.
> The alternative was making it inline; but it is not a fast path
> function, I preferred not to.
> 
> -Morten


More information about the dev mailing list