From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by dpdk.org (Postfix) with ESMTP id 568F1D08E for ; Tue, 28 Mar 2017 12:06:35 +0200 (CEST) Received: by mail-wr0-f173.google.com with SMTP id w11so79867488wrc.3 for ; Tue, 28 Mar 2017 03:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Fk70Jy+VcBuXMUlUZ/xfwSqlq6v+qQBlduJtrANTNA=; b=D9PWJaQJYDVYK/fWQQYDcG/i5h/Xei0opvrdUCR4et7eDPwOiWhRkac0LpTWrHebkz gkOy8GRFeIBjvCdGkEVQE+7WVey6iuMtrxSPdrf8C3x3SfzlwqhXmRpBcuPT9RXhdZic VEgGKVS8ktps5zYX9M2CVuZo/dRjjdj/gjGVyfol9RpUXrUyHqBIqYze9JOybj0oDLoc WL3MnsxS7PE5EaiI/z1peHWEI5WwfRVQJBQBR+94QDrFysxr1jVLT5OWL+1Hijyzkzid hoP8NEH7OiaWcqbDMQrTXgV9SDpI9oo6Ck7uajDNRnmhTdrAZpfSgPUVzmIbm4NHjHYG BFzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=5Fk70Jy+VcBuXMUlUZ/xfwSqlq6v+qQBlduJtrANTNA=; b=czrP89jjQD2lXetWCdnpZV7cP3Rnq0L4BoN4/s5N7GeMYwSKTaXGkF745rEV79AAib u/pvkMiJPfzGYTa+ufYNWZ7rCPJJGdKlqdxSafqrByt5g6GMRUJqD1ku4ZMHMLKNicIk cDwYEbkkbQoILW+X2hG8u+IU9NvosGphEhel/9JG+sYYi7vMzLxsKr4g/k7SR4A0pnR9 iNsZNzrR9Sp8gNxaQ96lvA5Z4Sgty8Y1eKLnhvys1YI4QeLT3sovcelrWtaYoJrRFlt9 2VWmwNJCLkeImo+8Gg5CXw7CdnbypnS+a9n+t9BstMH3kqKT5dtIGNNaStQpHX//5rB8 tnGg== X-Gm-Message-State: AFeK/H2f357GOXe++t1SU7G2LzbJmM8Lk3kQLGtOmOxXUjGZmQC7VS4dTEDCN177Fg4ICHO4 X-Received: by 10.223.136.92 with SMTP id e28mr13781618wre.73.1490695592651; Tue, 28 Mar 2017 03:06:32 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id b82sm2958126wmh.4.2017.03.28.03.06.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 03:06:31 -0700 (PDT) From: Thomas Monjalon To: "Wiles, Keith" Cc: dev@dpdk.org, Olivier Matz , techboard@dpdk.org Date: Tue, 28 Mar 2017 12:06:30 +0200 Message-ID: <1976507.q6Vb44MXhO@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <5CD3E4F5-4284-4D68-8008-642E9C3685B3@intel.com> References: <20170324140954.356e3755@platinum> <5CD3E4F5-4284-4D68-8008-642E9C3685B3@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: Re: [dpdk-dev] [RFC] New CLI for DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:06:35 -0000 2017-03-24 14:48, Wiles, Keith: >=20 > > On Mar 24, 2017, at 8:09 AM, Olivier Matz = wrote: > >=20 > > Hi Keith, > >=20 > > On Thu, 23 Mar 2017 16:13:21 +0000, "Wiles, Keith" wrote: > >>> On Mar 10, 2017, at 9:25 AM, Wiles, Keith = wrote: > >>>=20 > >>> 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 i= n progress for you review. > >>>=20 > >>> I have also ported the CLI to a version of Pktgen on the =E2=80=98= dev=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 tha= t seems reasonable to everyone. I need more testing of the API and Pktg= en, but I feel it has a simpler design, easier to understand and hopefu= lly make it easier for developers to add commands. > >>>=20 > >>> As an example I quickly converted over testpmd from CMDLINE to CL= I (I just add a -I option to select CLI instead) and reduced the test-p= md/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 s= ense and I am not suggesting to replace CMDLINE library. > >>>=20 > >>> If you play with the new CLI in pktgen and see any problems or wa= nt to suggest new features or changes please let me know. > >>>=20 > >>> 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 expl= ain the example and another to explain CLI internals. =20 > >>=20 > >> Any more comments on the CLI code for DPDK. > >>=20 > >> Should I submit a patch for DPDK or would it be better to push thi= s into its own repo on DPDK? > >>=20 > >=20 > > I agree that there is a large possibility of improvements in librte= _cmdline. > >=20 > > Just for reference, I think this design was not that bad at the tim= e it > > was introduced: > > - declaring commands as static variables makes sense when running o= n > > baremetal without malloc library > > - implementing a readline-like part was also needed because not ava= ilable > > on baremetal > > - masking structures to the user was harder due to the lack of mall= oc > > - having a cli is really helpful for a program like testpmd (both f= or > > a user or for an automatic test program) >=20 > I agree, but we do need to use a better version. >=20 > >=20 > > Few efforts were made to enhance this library because it's not the = heart > > of dpdk. >=20 > True CLI is not the heart of DPDK, but adding a better supported CLI = could be a reasonable addition to DPDK for developers to create a real = produce instead of cmdline, which is stated was not a CLI for a real pr= oduct. We can ask to the techboard whether CLI is in DPDK scope. My position: it is neither in the scope of the repo nor in the scope of= dpdk.org. > > The current status is acceptable to me: this library is mostly used= > > internally in dpdk for test apps, and application developers are fr= ee > > to use a better one if they want. > >=20 > > But adding another cli lib in dpdk does not make sense to me. I thi= nk > > the proper direction would be to remove the cli from dpdk and use a= > > good cli library that is available in distros. But for that: > > - we need to find one > > - we need to update all examples/tests that use the cmdline, and > > that will be a lot of work > > - we need to enhance dpdk framework to better manage deps with > > external libraries I agree we could convert testpmd and examples to a new CLI lib. Then we could remove librte_cmdline from DPDK. > Replacing applications with a new CLI is background work and we do no= t need to toss out cmdline until all have been converted, which could t= ake a while. We can move cmdline out of DPDK, but the problem is most o= f the current applications require cmdline and the developer would be r= equired to pull DPDK and cmdline. I would suggest we have both in DPDK = and slowly convert the apps to use the new CLI. >=20 > If we split up DPDK repo into smaller repos and use something like th= e =E2=80=98repo=E2=80=99 command with a catalog file then it would be m= ostly transparent to the developer we have multiple repos. Until that d= ay it does seem more reasonable to have CLI in DPDK repo, but I am will= ing to have it in a different repo for now. It is reasonnable for an application to have some dependencies. It is commonly managed in three ways: - detect the lib on the system - download the lib as part of the build process - ask user to download it > > So, in my opinion, the CLI you are proposing should be hosted on an= other > > repo. >=20 > I will contact Thomas to setup a new repo for the CLI. We had a private discussion. I have tried to put here my conclusions.