From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC] New CLI for DPDK Date: Fri, 10 Mar 2017 08:06:04 -0800 Message-ID: <20170310080604.66c9f168@xeon-e3> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: DPDK To: "Wiles, Keith" Return-path: Received: from mail-pg0-f41.google.com (mail-pg0-f41.google.com [74.125.83.41]) by dpdk.org (Postfix) with ESMTP id 31909689E for ; Fri, 10 Mar 2017 17:06:07 +0100 (CET) Received: by mail-pg0-f41.google.com with SMTP id 77so40290024pgc.1 for ; Fri, 10 Mar 2017 08:06:07 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 10 Mar 2017 15:25:31 +0000 "Wiles, Keith" wrote: > I would like to request for comments on a new CLI design and get any feed= back. I have attached the cli.rst text, which is still a work in progress f= or you review. >=20 > I have also ported the CLI to a version of Pktgen on the =E2=80=98dev=E2= =80=99 branch of the repo in DPDK.org. >=20 > http://dpdk.org/browse/apps/pktgen-dpdk/refs/?h=3Ddev >=20 > 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 fe= el it has a simpler design, easier to understand and hopefully make it easi= er for developers to add commands. >=20 > As an example I quickly converted over testpmd from CMDLINE to CLI (I jus= t 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. >=20 > 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. >=20 > If you play with the new CLI in pktgen and see any problems or want to su= ggest new features or changes please let me know. >=20 > Comments on the cli.rst text is also welcome, but the cli.rst is not comp= lete. I think this file needs to be broken into two one to explain the exam= ple and another to explain CLI internals. >=20 It would be great if all DPDK examples used a similar architecture. And hav= ing 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 s= ource. Heck even VPP has its own CLI inside.