[dpdk-dev] [PATCH v2 3/3] app/testpmd: add CL for ptype mapping configure

Wu, Jingjing jingjing.wu at intel.com
Tue Mar 28 05:34:00 CEST 2017



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, March 17, 2017 12:27 AM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>;
> Zhang, Helin <helin.zhang at intel.com>
> Cc: dev at dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 3/3] app/testpmd: add CL for ptype mapping
> configure
> 
> On 3/12/2017 12:08 PM, Qi Zhang wrote:
> > Add below command line to configure ptype mapping.
> > ptype mapping get <port_id> <valid_only>.
> > ptype mapping replace <port_id> <target> <mask> <pkt_type>.
> > ptype mapping reset <port_id>.
> > ptype mapping update <port_id> <hw_ptype> <sw_ptype>.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> > ---
> >  app/test-pmd/cmdline.c | 372
> > +++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 372 insertions(+)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 43fc636..85f07ba 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -575,6 +575,18 @@ static void cmd_help_long_parsed(void
> *parsed_result,
> >  			"E-tag set filter del e-tag-id (value) port (port_id)\n"
> >  			"    Delete an E-tag forwarding filter on a port\n\n"
> >
> > +			"ptype mapping get (port_id) (valid_only)\n"
> > +			"    Get ptype mapping on a port\n\n"
> > +
> > +			"ptype mapping replace (port_id) (target) (mask)
> (pky_type)\n"
> > +			"    Replace target with the pkt_type in ptype
> mapping\n\n"
> > +
> > +			"ptype mapping reset (port_id)\n"
> > +			"    Reset ptype mapping on a port\n\n"
> > +
> > +			"ptype mapping update (port_id) (hw_ptype)
> (sw_ptype)\n"
> > +			"    Update a ptype mapping item on a port\n\n"
> > +
> 
> This adds new root level "ptype" command, I think it would be nice to get an Ack
> from testpmd maintainers for this.
> 
> testpmd now supports many commands, and I don't know if it is only me, but I
> am having hard time to find some commands. Perhaps commands can be
> grouped better.

Now following groups are used. I think the most confusing one
is config or ports. Too many commands are included in it.
But it looks like new group is not necessary for Qi's commands.
We need extra work to refine it.

		"Help is available for the following sections:\n\n"
		"    help control    : Start and stop forwarding.\n"
		"    help display    : Displaying port, stats and config "
		"information.\n"
		"    help config     : Configuration information.\n"
		"    help ports      : Configuring ports.\n"
		"    help registers  : Reading and setting port registers.\n"
		"    help filters    : Filters configuration help.\n"
		"    help all        : All of the above sections.\n\n"


More information about the dev mailing list