[dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Thu Jan 17 02:41:14 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/18/19. 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.

Yongseok

---
>From f7f409de64c412d7211848cee8c2c3a15db6bce3 Mon Sep 17 00:00:00 2001
From: Rosen Xu <rosen.xu at intel.com>
Date: Mon, 22 Oct 2018 16:46:40 +0800
Subject: [PATCH] app/testpmd: fix shaper profile parameters

[ backported from 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 <rosen.xu at intel.com>
---
 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 cad33579b..a4bd5825b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -729,7 +729,8 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    show all queue region related configuration info\n\n"
 
 			"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"
 
 			"del port tm node shaper profile (port_id) (shaper_profile_id)\n"
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index d40a427d8..4dcddaff3 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -795,8 +795,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;
 };
 
@@ -831,14 +833,22 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id =
 	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 =
+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(
 		struct cmd_add_port_tm_node_shaper_profile_result,
@@ -861,8 +871,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));
-	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;
 
 	ret = rte_tm_shaper_profile_add(port_id, shaper_id, &sp, &error);
@@ -885,8 +897,10 @@ cmdline_parse_inst_t cmd_add_port_tm_node_shaper_profile = {
 		(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,
 	},
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index c9ce85c90..3d7478e5f 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2122,13 +2122,16 @@ Add port traffic management private shaper profile
 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
   correct the packet length with the framing overhead bytes that are consumed
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-01-16 17:35:31.344796987 -0800
+++ 0001-app-testpmd-fix-shaper-profile-parameters.patch	2019-01-16 17:35:31.277115000 -0800
@@ -1,8 +1,10 @@
-From c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 Mon Sep 17 00:00:00 2001
+From f7f409de64c412d7211848cee8c2c3a15db6bce3 Mon Sep 17 00:00:00 2001
 From: Rosen Xu <rosen.xu at intel.com>
 Date: Mon, 22 Oct 2018 16:46:40 +0800
 Subject: [PATCH] app/testpmd: fix shaper profile parameters
 
+[ backported from 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 at dpdk.org
 
 Signed-off-by: Rosen Xu <rosen.xu at intel.com>
 ---
@@ -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 cad33579b..a4bd5825b 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -728,7 +728,8 @@ static void cmd_help_long_parsed(void *parsed_result,
+@@ -729,7 +729,8 @@ static void cmd_help_long_parsed(void *parsed_result,
  			"    show all queue region related configuration info\n\n"
  
  			"add port tm node shaper profile (port_id) (shaper_profile_id)"
@@ -34,10 +35,10 @@
  
  			"del port tm node shaper profile (port_id) (shaper_profile_id)\n"
 diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
-index b43079746..4c763482a 100644
+index d40a427d8..4dcddaff3 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 {
+@@ -795,8 +795,10 @@ struct cmd_add_port_tm_node_shaper_profile_result {
  	cmdline_fixed_string_t profile;
  	uint16_t port_id;
  	uint32_t shaper_id;
@@ -50,7 +51,7 @@
  	uint32_t pktlen_adjust;
  };
  
-@@ -807,14 +809,22 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id =
+@@ -831,14 +833,22 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_shaper_profile_result,
  			shaper_id, UINT32);
@@ -77,10 +78,10 @@
  cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_pktlen_adjust =
  	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,
+@@ -861,8 +871,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 = res->tb_rate;
 -	sp.peak.size = res->tb_size;
 +	sp.committed.rate = res->cmit_tb_rate;
@@ -90,7 +91,7 @@
  	sp.pkt_length_adjust = pkt_len_adjust;
  
  	ret = rte_tm_shaper_profile_add(port_id, shaper_id, &sp, &error);
-@@ -862,8 +874,10 @@ cmdline_parse_inst_t cmd_add_port_tm_node_shaper_profile = {
+@@ -885,8 +897,10 @@ cmdline_parse_inst_t cmd_add_port_tm_node_shaper_profile = {
  		(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,
@@ -104,10 +105,10 @@
  		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 c9ce85c90..3d7478e5f 100644
 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-@@ -2585,13 +2585,16 @@ Add port traffic management private shaper profile
+@@ -2122,13 +2122,16 @@ Add port traffic management private shaper profile
  Add the port traffic management private shaper profile::
  
     testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \


More information about the stable mailing list