[dpdk-dev] [RFC] New CLI for DPDK

Stephen Hemminger stephen at networkplumber.org
Fri Mar 10 17:06:04 CET 2017


On Fri, 10 Mar 2017 15:25:31 +0000
"Wiles, Keith" <keith.wiles at intel.com> wrote:

> I would like to request for comments on a new CLI design and get any feedback. I have attached the cli.rst text, which is still a work in progress for you review.
> 
> I have also ported the CLI to a version of Pktgen on the ‘dev’ branch of the repo in DPDK.org.
> 
> http://dpdk.org/browse/apps/pktgen-dpdk/refs/?h=dev
> 
> I would like to submit the CLI library to be used in DPDK, if that seems reasonable to everyone. I need more testing of the API and Pktgen, but I feel it has a simpler design, easier to understand and hopefully make it easier for developers to add commands.
> 
> As an example I quickly converted over testpmd from CMDLINE to CLI (I just add a -I option to select CLI instead) and reduced the test-pmd/cmdline.c file from 12.6K lines to about 4.5K lines. I did not fully test the code, but the ones I did test seem to work.
> 
> I do not expect DPDK to convert to the new CLI only if it makes sense and I am not suggesting to replace CMDLINE library.
> 
> If you play with the new CLI in pktgen and see any problems or want to suggest new features or changes please let me know.
> 
> Comments on the cli.rst text is also welcome, but the cli.rst is not complete. I think this file needs to be broken into two one to explain the example and another to explain CLI internals.
> 

It would be great if all DPDK examples used a similar architecture. And having a common
infrastructure would help.

But not sure it needs to be special. Why should this be DPDK specific?
What you are building really ends up being an application
framework at some point. Surely, there are lots of others already in open source.

Heck even VPP has its own CLI inside.




More information about the dev mailing list