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

Thomas Monjalon thomas at monjalon.net
Thu Nov 19 15:47:00 CET 2026


19/11/2026 15:18, Morten Brørup:
> > 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.
> 
> > 
> > [...]
> > > +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.

Oh I forgot this constraint.

Please add this explanation in the commit log.

By the way I assume it is too late to add such a function in 26.11,
and it is not a recent regression, so it can wait a little, right?




More information about the dev mailing list