From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F31394CA5 for ; Mon, 22 Oct 2018 10:49:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 01:49:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,411,1534834800"; d="scan'208";a="79900636" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 22 Oct 2018 01:49:09 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 Oct 2018 01:49:08 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 Oct 2018 01:49:07 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.21]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.46]) with mapi id 14.03.0319.002; Mon, 22 Oct 2018 16:49:04 +0800 From: "Xu, Rosen" To: "Singh, Jasvinder" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" , "Lu, Wenzhuo" , "Yigit, Ferruh" Thread-Topic: [PATCH] app/test-pmd: add and identify shaper profile parameters Thread-Index: AQHUMvFTmuLOrthdyU+h/lA1Ac6inKUBIunQgCo/SFA= Date: Mon, 22 Oct 2018 08:49:03 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73A320D1E@SHSMSX104.ccr.corp.intel.com> References: <1534156498-57837-1-git-send-email-rosen.xu@intel.com> <54CBAA185211B4429112C315DA58FF6D336145FF@IRSMSX103.ger.corp.intel.com> In-Reply-To: <54CBAA185211B4429112C315DA58FF6D336145FF@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGRkYmFiYzQtMjY3My00MDAxLTk5ZGMtMmVjNzU1NDExZWQ3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWU03d2JPWjNzWHRqb0xEZzhBMWx6ZTJGUE50TU54WEZBNFAzUnBpbGtqNG5cL1hoWFNhSVFCbDNCZitXdkhlZnMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/test-pmd: add and identify shaper profile parameters 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, 22 Oct 2018 08:49:10 -0000 > -----Original Message----- > From: Singh, Jasvinder > Sent: Tuesday, September 25, 2018 19:56 > To: Xu, Rosen ; dev@dpdk.org > Cc: Dumitrescu, Cristian ; Lu, Wenzhuo > ; Yigit, Ferruh > Subject: RE: [PATCH] app/test-pmd: add and identify shaper profile > parameters >=20 >=20 >=20 > > -----Original Message----- > > From: Xu, Rosen > > Sent: Monday, August 13, 2018 11:35 AM > > To: dev@dpdk.org > > Cc: Dumitrescu, Cristian ; Lu, Wenzhuo > > ; Singh, Jasvinder ; > > Xu, Rosen ; Yigit, Ferruh > > Subject: [PATCH] app/test-pmd: add and identify shaper profile > > parameters > > > > As struct rte_tm_shaper_params defined, the command line of test-pmd > > should include committed and peak parameters, but right now the > > command line doesn't identify whether it's committed or peak > > parameter. This patch identifies and adds the clarify definition > > > > Signed-off-by: Rosen Xu > > Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred > > profiles") > > Cc: jasvinder.singh@intel.com > > --- > > app/test-pmd/cmdline_tm.c | 34 ++++++++++++++++++++++++---------- > > 1 file changed, 24 insertions(+), 10 deletions(-) > > > > diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c > > index > > 631f179..8ee2785 100644 > > --- a/app/test-pmd/cmdline_tm.c > > +++ b/app/test-pmd/cmdline_tm.c > > @@ -771,8 +771,10 @@ struct > cmd_add_port_tm_node_shaper_profile_result > > { > > cmdline_fixed_string_t profile; > > uint16_t port_id; > > uint32_t shaper_id; > > - uint64_t tb_rate; > > - uint64_t tb_size; > > + uint64_t cmit_tb_rate; > > + uint64_t cmit_tb_size; > > + uint64_t peak_tb_rate; > > + uint64_t peak_tb_size; > > uint32_t pktlen_adjust; > > }; > > > > @@ -807,14 +809,22 @@ struct > > cmd_add_port_tm_node_shaper_profile_result { > > TOKEN_NUM_INITIALIZER( > > struct cmd_add_port_tm_node_shaper_profile_result, > > shaper_id, UINT32); > > -cmdline_parse_token_num_t > cmd_add_port_tm_node_shaper_profile_tb_rate > > =3D > > +cmdline_parse_token_num_t > > +cmd_add_port_tm_node_shaper_profile_cmit_tb_rate =3D > > TOKEN_NUM_INITIALIZER( > > struct cmd_add_port_tm_node_shaper_profile_result, > > - tb_rate, UINT64); > > -cmdline_parse_token_num_t > cmd_add_port_tm_node_shaper_profile_tb_size > > =3D > > + cmit_tb_rate, UINT64); > > +cmdline_parse_token_num_t > > +cmd_add_port_tm_node_shaper_profile_cmit_tb_size =3D > > TOKEN_NUM_INITIALIZER( > > struct cmd_add_port_tm_node_shaper_profile_result, > > - tb_size, UINT64); > > + cmit_tb_size, UINT64); > > +cmdline_parse_token_num_t > > cmd_add_port_tm_node_shaper_profile_peak_tb_rate =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_tm_node_shaper_profile_result, > > + peak_tb_rate, UINT64); > > +cmdline_parse_token_num_t > > cmd_add_port_tm_node_shaper_profile_peak_tb_size =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_tm_node_shaper_profile_result, > > + peak_tb_size, UINT64); > > cmdline_parse_token_num_t > > cmd_add_port_tm_node_shaper_profile_pktlen_adjust =3D > > TOKEN_NUM_INITIALIZER( > > struct cmd_add_port_tm_node_shaper_profile_result, > > @@ -838,8 +848,10 @@ static void > > cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result, > > /* Private shaper profile params */ > > memset(&sp, 0, sizeof(struct rte_tm_shaper_params)); > > memset(&error, 0, sizeof(struct rte_tm_error)); > > - sp.peak.rate =3D res->tb_rate; > > - sp.peak.size =3D res->tb_size; > > + sp.committed.rate =3D res->cmit_tb_rate; > > + sp.committed.size =3D res->cmit_tb_size; > > + sp.peak.rate =3D res->peak_tb_rate; > > + sp.peak.size =3D res->peak_tb_size; > > sp.pkt_length_adjust =3D pkt_len_adjust; > > > > ret =3D rte_tm_shaper_profile_add(port_id, shaper_id, &sp, &error); > @@ > > -862,8 +874,10 @@ static void > > cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result, > > (void *)&cmd_add_port_tm_node_shaper_profile_profile, > > (void *)&cmd_add_port_tm_node_shaper_profile_port_id, > > (void *)&cmd_add_port_tm_node_shaper_profile_shaper_id, > > - (void *)&cmd_add_port_tm_node_shaper_profile_tb_rate, > > - (void *)&cmd_add_port_tm_node_shaper_profile_tb_size, > > + (void > > *)&cmd_add_port_tm_node_shaper_profile_cmit_tb_rate, > > + (void > > *)&cmd_add_port_tm_node_shaper_profile_cmit_tb_size, > > + (void > > *)&cmd_add_port_tm_node_shaper_profile_peak_tb_rate, > > + (void > > *)&cmd_add_port_tm_node_shaper_profile_peak_tb_size, > > (void > > *)&cmd_add_port_tm_node_shaper_profile_pktlen_adjust, > > NULL, > > }, > > -- >=20 > Can you also update the help command section (test-pmd/cmdline.c) as well > as the documentation (doc/guides/testpmd_app_ug) for these changes. > Thanks! It's done, thanks.