From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 05512282; Fri, 31 Mar 2017 16:39:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490971177; x=1522507177; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=jDYJaQHChaxB2+Ihb04509X/0AD4YfOJhMujNiGLa10=; b=V7FiVCg0lPZryOyLokdNAzhsxZQNb+8l2QXTMlMTh/LeY0QjOOkKjd0+ buXKY7XFwL/escROsDvpdbkM5RFv6A==; Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Mar 2017 07:39:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,252,1486454400"; d="scan'208";a="67405362" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 31 Mar 2017 07:39:34 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.235]) by FMSMSX106.amr.corp.intel.com ([169.254.5.54]) with mapi id 14.03.0319.002; Fri, 31 Mar 2017 07:39:24 -0700 From: "Wiles, Keith" To: Olivier Matz CC: Jerin Jacob , "dev@dpdk.org" , "techboard@dpdk.org" Thread-Topic: [dpdk-dev] next technical board meeting, 2017-04-06 Thread-Index: AQHSqWcUQrEhg/Sr80aX7do3D+bCEqGt/Z2AgAEdLQCAAFypgIAABEMA Date: Fri, 31 Mar 2017 14:39:23 +0000 Message-ID: References: <20170330094058.nh2nhk4ko6tsqedn@localhost.localdomain> <20170330170512.14476bb0@platinum> <5C76150C-195D-4316-AC3B-6AE2441B254B@intel.com> <20170331105228.36617583@platinum> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.16.49] Content-Type: text/plain; charset="us-ascii" Content-ID: <2E159C1412A132498FAB8D659145B2B5@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] next technical board meeting, 2017-04-06 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: Fri, 31 Mar 2017 14:39:37 -0000 Here is a few advantages to CLI: A couple big advantages I see are: - CLI supports commands, files, aliases, directories. - The alias command is just a string using a simple substitution suppor= t for other other commands similar to the bash shell like alias commands. - Files can be static or dynamic information, can be changed on the fly= and saved for later. The file is backed with a simple function callback to= allow the developer to update the content or not. - Added support for color and cursor movement APIs similar to Pktgen if n= eeded by the developer. - It is a work alike replacement for cmdline library. Both cmdline and CL= I can be used in the same application if care is taken. - Uses a simple fake like directory layout for command and files. Allowin= g for command hierarchy as path to the command can allow for specific targe= ts to be identified without having to state it on the command line.=20 - Has auto-complete for commands, similar to Unix/Linux autocomplete and = provides support for command option help as well. - Callback functions for commands are simply just argc/argv like function= s. The CLI does not convert arguments for the user, it is up to the develop= er to decode the argv[] values. - Most of the arguments converted in the current cmdline are difficult = to use or not required as the developer just picks string type and does the= conversion himself. - Dynamically be able to add and remove commands, directories, files and = aliases, does not need to be statically compiled into the application. - No weird structures in the code and reduces the line count for testpmd = from 11K to 4K lines. I convert testpmd to have both CMDLINE and CLI with a= command line option. - Two methods to parse command lines, first is the standard argc/argv met= hod in the function. The second method is to use a map of strings with simp= le printf like formatting to detect which command line the user typed. An I= D value it returned to the used to indicate which mapping string was found = to make the command line to be used in a switch statement. - Central help support if needed (optional). Regards, Keith