From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B4887199B6 for ; Mon, 18 Sep 2017 16:06:35 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2017 07:06:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,413,1500966000"; d="scan'208";a="153093299" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga006.fm.intel.com with ESMTP; 18 Sep 2017 07:06:18 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX108.ger.corp.intel.com (163.33.3.3) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 18 Sep 2017 15:03:09 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx112.ger.corp.intel.com ([169.254.1.142]) with mapi id 14.03.0319.002; Mon, 18 Sep 2017 15:03:09 +0100 From: "De Lara Guarch, Pablo" To: "Singh, Jasvinder" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add CLI for tm mode Thread-Index: AQHTLU5uHsYrkQuYEU+ujwAIzX7WDaK6sKiQ Date: Mon, 18 Sep 2017 14:03:08 +0000 Message-ID: References: <20170822170240.8059-1-jasvinder.singh@intel.com> <20170914115302.33995-1-jasvinder.singh@intel.com> <20170914115302.33995-2-jasvinder.singh@intel.com> In-Reply-To: <20170914115302.33995-2-jasvinder.singh@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGQwNzAwZDktM2E5Ni00OTFlLTg2ZWQtMDAwZjBhODc0YWEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InlUMkJ6TllndnhLQlhUcjNVZjF2bitBbEF2U3dheFU1aWVCZ1ROVkJmd2c9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add CLI for tm mode 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: Mon, 18 Sep 2017 14:06:36 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jasvinder Singh > Sent: Thursday, September 14, 2017 12:53 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Wu, Jingjing > > Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add CLI for tm mode >=20 > Add following CLIs in testpmd application; > - commands to build hierarchical tree for the QoS Scheduler. > - commands for runtime update of the hierarchical tree. > - commands to display TM capability information. > (per port, per hierarchy level and per hierarchy node) > - command to set the packet field mask and offset value for > classification. > - command to set traffic class translation table entry > - stats collection This patch should be split into multiple patches, as it is quite big and it is adding multiple commands that can be arranged in different categories, in different patches. Also, as you are adding several commands about traffic management, you could separate these in a different file (i.e. cmdline_tm.c). >=20 > Signed-off-by: Jasvinder Singh > --- > app/test-pmd/cmdline.c | 2975 > ++++++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 2785 insertions(+), 190 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index cd8c358..cb837ce 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c ... > + > + /* Command type: add */ > + if (strcmp(res->cmd_type, "add") =3D=3D 0) { > + /* Port link status */ > + rte_eth_link_get_nowait(port_id, &link); > + if (link.link_status =3D=3D ETH_LINK_UP) { > + printf(" Port %u link up (error)\n", port_id); > + return; > + } If you are checking if the device is started or stopped, you should probably use "is_port_started" function. > + > + /* TM hierarchy status */ > + if (port->softport.tm.hierarchy_frozen =3D=3D 1) > + port->softport.tm.hierarchy_frozen =3D 0; > + } > + > + /* Command type: set (update) */