From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F2D861B118 for ; Tue, 25 Sep 2018 14:00:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 05:00:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,302,1534834800"; d="scan'208";a="94629655" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2018 04:55:46 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.234]) by IRSMSX109.ger.corp.intel.com ([169.254.13.156]) with mapi id 14.03.0319.002; Tue, 25 Sep 2018 12:55:45 +0100 From: "Singh, Jasvinder" To: "Xu, Rosen" , "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/lA1Ac6inKUBIunQ Date: Tue, 25 Sep 2018 11:55:44 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D336145FF@IRSMSX103.ger.corp.intel.com> References: <1534156498-57837-1-git-send-email-rosen.xu@intel.com> In-Reply-To: <1534156498-57837-1-git-send-email-rosen.xu@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.200.100 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] 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: Tue, 25 Sep 2018 12:00:31 -0000 > -----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 >=20 > As struct rte_tm_shaper_params defined, the command line of test-pmd shou= ld > 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 >=20 > 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(-) >=20 > 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; > }; >=20 > @@ -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; >=20 > 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, > }, > -- Can you also update the help command section (test-pmd/cmdline.c) as well a= s the documentation (doc/guides/testpmd_app_ug) for these changes. Thanks!