From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 670C11B494 for ; Fri, 23 Nov 2018 11:29:12 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CEE54307D846; Fri, 23 Nov 2018 10:29:11 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89147413C; Fri, 23 Nov 2018 10:29:10 +0000 (UTC) From: Kevin Traynor To: Rosen Xu Cc: dpdk stable Date: Fri, 23 Nov 2018 10:26:23 +0000 Message-Id: <20181123102713.17309-19-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 23 Nov 2018 10:29:11 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 10:29:12 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 1556c205ea66059819a54c6a8ce6ba8a663c75db Mon Sep 17 00:00:00 2001 From: Rosen Xu Date: Mon, 22 Oct 2018 16:46:40 +0800 Subject: [PATCH] app/testpmd: fix shaper profile parameters [ upstream commit c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 ] As struct rte_tm_shaper_params defined, the command line of testpmd 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 Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles") Signed-off-by: Rosen Xu --- app/test-pmd/cmdline.c | 3 +- app/test-pmd/cmdline_tm.c | 34 +++++++++++++++------ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 ++++-- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 69c8e0499..3b24aac8b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -725,5 +725,6 @@ static void cmd_help_long_parsed(void *parsed_result, "add port tm node shaper profile (port_id) (shaper_profile_id)" - " (tb_rate) (tb_size) (packet_length_adjust)\n" + " (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)" + " (packet_length_adjust)\n" " Add port tm node private shaper profile.\n\n" diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c index 631f17995..8ee2785ad 100644 --- a/app/test-pmd/cmdline_tm.c +++ b/app/test-pmd/cmdline_tm.c @@ -772,6 +772,8 @@ struct cmd_add_port_tm_node_shaper_profile_result { 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; }; @@ -808,12 +810,20 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id = 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 = +cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_rate = 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 = + cmit_tb_rate, UINT64); +cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_size = 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 = + 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 = + 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 = TOKEN_NUM_INITIALIZER( @@ -839,6 +849,8 @@ static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result, memset(&sp, 0, sizeof(struct rte_tm_shaper_params)); memset(&error, 0, sizeof(struct rte_tm_error)); - sp.peak.rate = res->tb_rate; - sp.peak.size = res->tb_size; + sp.committed.rate = res->cmit_tb_rate; + sp.committed.size = res->cmit_tb_size; + sp.peak.rate = res->peak_tb_rate; + sp.peak.size = res->peak_tb_size; sp.pkt_length_adjust = pkt_len_adjust; @@ -863,6 +875,8 @@ cmdline_parse_inst_t cmd_add_port_tm_node_shaper_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, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index c3e4005d6..c82094eca 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2452,11 +2452,14 @@ Add the port traffic management private shaper profile:: testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \ - (tb_rate) (tb_size) (packet_length_adjust) + (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size) \ + (packet_length_adjust) where: * ``shaper_profile id``: Shaper profile ID for the new profile. -* ``tb_rate``: Token bucket rate (bytes per second). -* ``tb_size``: Token bucket size (bytes). +* ``cmit_tb_rate``: Committed token bucket rate (bytes per second). +* ``cmit_tb_size``: Committed token bucket size (bytes). +* ``peak_tb_rate``: Peak token bucket rate (bytes per second). +* ``peak_tb_size``: Peak token bucket size (bytes). * ``packet_length_adjust``: The value (bytes) to be added to the length of each packet for the purpose of shaping. This parameter value can be used to -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:54.729538821 +0000 +++ 0019-app-testpmd-fix-shaper-profile-parameters.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 Mon Sep 17 00:00:00 2001 +From 1556c205ea66059819a54c6a8ce6ba8a663c75db Mon Sep 17 00:00:00 2001 From: Rosen Xu Date: Mon, 22 Oct 2018 16:46:40 +0800 Subject: [PATCH] app/testpmd: fix shaper profile parameters +[ upstream commit c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 ] + As struct rte_tm_shaper_params defined, the command line of testpmd should include committed and peak parameters, but right now the command line doesn't identify whether it's @@ -10,7 +12,6 @@ adds the clarify definition Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles") -Cc: stable@dpdk.org Signed-off-by: Rosen Xu --- @@ -20,10 +21,10 @@ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c -index 1050fde96..c38367981 100644 +index 69c8e0499..3b24aac8b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c -@@ -729,5 +729,6 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -725,5 +725,6 @@ static void cmd_help_long_parsed(void *parsed_result, "add port tm node shaper profile (port_id) (shaper_profile_id)" - " (tb_rate) (tb_size) (packet_length_adjust)\n" @@ -32,7 +33,7 @@ " Add port tm node private shaper profile.\n\n" diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c -index b43079746..4c763482a 100644 +index 631f17995..8ee2785ad 100644 --- a/app/test-pmd/cmdline_tm.c +++ b/app/test-pmd/cmdline_tm.c @@ -772,6 +772,8 @@ struct cmd_add_port_tm_node_shaper_profile_result { @@ -94,10 +95,10 @@ (void *)&cmd_add_port_tm_node_shaper_profile_pktlen_adjust, NULL, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst -index e23079b6d..e3c4606d1 100644 +index c3e4005d6..c82094eca 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst -@@ -2586,11 +2586,14 @@ Add the port traffic management private shaper profile:: +@@ -2452,11 +2452,14 @@ Add the port traffic management private shaper profile:: testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \ - (tb_rate) (tb_size) (packet_length_adjust)