[PATCH v5 6/7] app/testpmd: add commands to dump mbuf history
Bruce Richardson
bruce.richardson at intel.com
Tue Oct 14 11:48:43 CEST 2025
On Tue, Oct 14, 2025 at 11:43:28AM +0200, Thomas Monjalon wrote:
> 14/10/2025 10:45, Morten Brørup:
> > > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > > Sent: Tuesday, 14 October 2025 08.59
> > >
> > > Dump the mbuf history to the console or to a file.
> > >
> > > The dump will contain:
> > > - Operation history for each mbuf
> > > - Summary and statistics about all mbufs
> > >
> > > Dump the history of all mbufs:
> > > testpmd> dump mbuf history all [file]
> > >
> > > Dump the history of one mbuf pool:
> > > testpmd> dump mbuf history mempool <mp_name> [file]
> > >
> > > Dump the history of one mbuf:
> > > testpmd> dump mbuf history one <mbuf_addr> [file]
> >
> > The "one" seems superfluous. I think this would suffice:
> > testpmd> dump mbuf history <mbuf_addr> [file]
>
> It's not superfluous :)
> Without it, the cmdline library cannot distinguish easily
> between
> dump mbuf history <mbuf_addr> [file]
> and
> dump mbuf history mempool <mp_name>
>
The latter might read better as "dump mbuf pool history <mp_name>", which
would also resolve the ambiguity.
Even without cmdline lib resolving the ambiguity, it should be easy enough
for the cmdline callback to do strcmp() on the 4th parameter to check if
it's the string "mempool" and then direct appropriately.
/Bruce
More information about the dev
mailing list