DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests
@ 2016-04-22  9:58 maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22  9:58 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

This patch adds 1 parameter and 2 command line items:
 * --enable-scatter
 * port config all scatter on|off
 * port config all txqflags value

With these, testpmd can be used for testing scatter-gather 
in both TX and RX.

Maciej Czekaj (3):
  app/testpmd: add "enable-scatter" parameter
  app/testpmd: extend port config with scatter parameter
  app/testpmd: support setting up txq_flags value in command line

 app/test-pmd/cmdline.c    | 81 ++++++++++++++++++++++++++++++++++++++++++++---
 app/test-pmd/parameters.c |  3 ++
 2 files changed, 80 insertions(+), 4 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
@ 2016-04-22  9:58 ` maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22  9:58 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	This parameter allows for controlling rxmode.enable_scatter
	which in turn allow for multi-segment packet receive tests.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/parameters.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 55572eb..8792c2c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -526,6 +526,7 @@ launch_args_parse(int argc, char** argv)
 		{ "pkt-filter-drop-queue",      1, 0, 0 },
 		{ "crc-strip",                  0, 0, 0 },
 		{ "enable-rx-cksum",            0, 0, 0 },
+		{ "enable-scatter",             0, 0, 0 },
 		{ "disable-hw-vlan",            0, 0, 0 },
 		{ "disable-hw-vlan-filter",     0, 0, 0 },
 		{ "disable-hw-vlan-strip",      0, 0, 0 },
@@ -764,6 +765,8 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "crc-strip"))
 				rx_mode.hw_strip_crc = 1;
+			if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
+				rx_mode.enable_scatter = 1;
 			if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
 				rx_mode.hw_ip_checksum = 1;
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH 2/3] app/testpmd: extend port config with scatter parameter
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
@ 2016-04-22  9:58 ` maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22  9:58 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	"port config all scatter on|off" allows for
	controlling rxmode.enable_scatter in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/cmdline.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c5b9479..929d19a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -559,10 +559,10 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"port config all max-pkt-len (value)\n"
 			"    Set the max packet length.\n\n"
 
-			"port config all (crc-strip|rx-cksum|hw-vlan|hw-vlan-filter|"
+			"port config all (crc-strip|scatter|rx-cksum|hw-vlan|hw-vlan-filter|"
 			"hw-vlan-strip|hw-vlan-extend|drop-en)"
 			" (on|off)\n"
-			"    Set crc-strip/rx-checksum/hardware-vlan/drop_en"
+			"    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
 			" for ports.\n\n"
 
 			"port config all rss (all|ip|tcp|udp|sctp|ether|none)\n"
@@ -1410,6 +1410,15 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 			printf("Unknown parameter\n");
 			return;
 		}
+	} else if (!strcmp(res->name, "scatter")) {
+		if (!strcmp(res->value, "on"))
+			rx_mode.enable_scatter = 1;
+		else if (!strcmp(res->value, "off"))
+			rx_mode.enable_scatter = 0;
+		else {
+			printf("Unknown parameter\n");
+			return;
+		}
 	} else if (!strcmp(res->name, "rx-cksum")) {
 		if (!strcmp(res->value, "on"))
 			rx_mode.hw_ip_checksum = 1;
@@ -1487,7 +1496,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, all, "all");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_name =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name,
-					"crc-strip#rx-cksum#hw-vlan#"
+					"crc-strip#scatter#rx-cksum#hw-vlan#"
 					"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value,
@@ -1496,7 +1505,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 cmdline_parse_inst_t cmd_config_rx_mode_flag = {
 	.f = cmd_config_rx_mode_flag_parsed,
 	.data = NULL,
-	.help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+	.help_str = "port config all crc-strip|scatter|rx-cksum|hw-vlan|"
 		"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
 	.tokens = {
 		(void *)&cmd_config_rx_mode_flag_port,
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
@ 2016-04-22  9:58 ` maciej.czekaj
  2016-04-22 10:19 ` [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests Mcnamara, John
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22  9:58 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	"port config all txqflags <value>" allows for
	specifying txq_flags value in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/cmdline.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 929d19a..680164f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2730,6 +2730,69 @@ cmdline_parse_inst_t cmd_set_txsplit = {
 	},
 };
 
+/* *** CONFIG TX QUEUE FLAGS *** */
+
+struct cmd_config_txqflags_result {
+	cmdline_fixed_string_t port;
+	cmdline_fixed_string_t config;
+	cmdline_fixed_string_t all;
+	cmdline_fixed_string_t what;
+	int32_t hexvalue;
+};
+
+static void cmd_config_txqflags_parsed(void *parsed_result,
+				__attribute__((unused)) struct cmdline *cl,
+				__attribute__((unused)) void *data)
+{
+	struct cmd_config_txqflags_result *res = parsed_result;
+
+	if (!all_ports_stopped()) {
+		printf("Please stop all ports first\n");
+		return;
+	}
+
+	if (!strcmp(res->what, "txqflags")) {
+		txq_flags = res->hexvalue;
+	} else {
+		printf("Unknown parameter\n");
+		return;
+	}
+
+	init_port_config();
+
+	cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
+}
+
+cmdline_parse_token_string_t cmd_config_txqflags_port =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, port,
+				 "port");
+cmdline_parse_token_string_t cmd_config_txqflags_config =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, config,
+				 "config");
+cmdline_parse_token_string_t cmd_config_txqflags_all =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, all,
+				 "all");
+cmdline_parse_token_string_t cmd_config_txqflags_what =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, what,
+				 "txqflags");
+cmdline_parse_token_num_t cmd_config_txqflags_value =
+	TOKEN_NUM_INITIALIZER(struct cmd_config_txqflags_result,
+				hexvalue, INT32);
+
+cmdline_parse_inst_t cmd_config_txqflags = {
+	.f = cmd_config_txqflags_parsed,
+	.data = NULL,
+	.help_str = "port config all txqflags value",
+	.tokens = {
+		(void *)&cmd_config_txqflags_port,
+		(void *)&cmd_config_txqflags_config,
+		(void *)&cmd_config_txqflags_all,
+		(void *)&cmd_config_txqflags_what,
+		(void *)&cmd_config_txqflags_value,
+		NULL,
+	},
+};
+
 /* *** ADD/REMOVE ALL VLAN IDENTIFIERS TO/FROM A PORT VLAN RX FILTER *** */
 struct cmd_rx_vlan_filter_all_result {
 	cmdline_fixed_string_t rx_vlan;
@@ -10487,6 +10550,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,
 	(cmdline_parse_inst_t *)&cmd_config_rss,
 	(cmdline_parse_inst_t *)&cmd_config_rxtx_queue,
+	(cmdline_parse_inst_t *)&cmd_config_txqflags,
 	(cmdline_parse_inst_t *)&cmd_config_rss_reta,
 	(cmdline_parse_inst_t *)&cmd_showport_reta,
 	(cmdline_parse_inst_t *)&cmd_config_burst,
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
                   ` (2 preceding siblings ...)
  2016-04-22  9:58 ` [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
@ 2016-04-22 10:19 ` Mcnamara, John
  2016-04-22 10:38   ` [dpdk-dev] Odp.: " Czekaj, Maciej
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 " maciej.czekaj
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Mcnamara, John @ 2016-04-22 10:19 UTC (permalink / raw)
  To: maciej.czekaj, De Lara Guarch, Pablo; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> maciej.czekaj@caviumnetworks.com
> Sent: Friday, April 22, 2016 10:58 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better
> scatter-gather tests
> 
> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> 
> This patch adds 1 parameter and 2 command line items:
>  * --enable-scatter
>  * port config all scatter on|off
>  * port config all txqflags value
> 
> With these, testpmd can be used for testing scatter-gather in both TX and
> RX.
> 
> Maciej Czekaj (3):
>   app/testpmd: add "enable-scatter" parameter
>   app/testpmd: extend port config with scatter parameter
>   app/testpmd: support setting up txq_flags value in command line
> 
>  app/test-pmd/cmdline.c    | 81 ++++++++++++++++++++++++++++++++++++++++++++---
>  app/test-pmd/parameters.c |  3 ++
>  2 files changed, 80 insertions(+), 4 deletions(-)

Hi,

Thanks for that.

As a general note, all new features to testpmd should have an equivalent entry in the testpmd documentation:

    http://dpdk.org/doc/guides/testpmd_app_ug/index.html

John

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] Odp.: [PATCH 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-22 10:19 ` [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests Mcnamara, John
@ 2016-04-22 10:38   ` Czekaj, Maciej
  0 siblings, 0 replies; 15+ messages in thread
From: Czekaj, Maciej @ 2016-04-22 10:38 UTC (permalink / raw)
  To: Mcnamara, John, De Lara Guarch, Pablo; +Cc: dev



________________________________________
Od: dev <dev-bounces@dpdk.org> w imieniu użytkownika Mcnamara, John <john.mcnamara@intel.com>
Wysłane: 22 kwietnia 2016 12:19
Do: Czekaj, Maciej; De Lara Guarch, Pablo
DW: dev@dpdk.org
Temat: Re: [dpdk-dev] [PATCH 0/3] testpmd: extend commands for  better  scatter-gather tests

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> maciej.czekaj@caviumnetworks.com
> Sent: Friday, April 22, 2016 10:58 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better
> scatter-gather tests
>
> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
>
> This patch adds 1 parameter and 2 command line items:
>  * --enable-scatter
>  * port config all scatter on|off
>  * port config all txqflags value
>
> With these, testpmd can be used for testing scatter-gather in both TX and
> RX.
>
> Maciej Czekaj (3):
>   app/testpmd: add "enable-scatter" parameter
>   app/testpmd: extend port config with scatter parameter
>   app/testpmd: support setting up txq_flags value in command line
>
>  app/test-pmd/cmdline.c    | 81 ++++++++++++++++++++++++++++++++++++++++++++---
>  app/test-pmd/parameters.c |  3 ++
>  2 files changed, 80 insertions(+), 4 deletions(-)

Hi,

Thanks for that.

As a general note, all new features to testpmd should have an equivalent entry in the testpmd documentation:

    http://dpdk.org/doc/guides/testpmd_app_ug/index.html

John


I will include the doc in v2.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
                   ` (3 preceding siblings ...)
  2016-04-22 10:19 ` [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests Mcnamara, John
@ 2016-04-22 14:51 ` maciej.czekaj
  2016-04-28  8:52   ` De Lara Guarch, Pablo
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22 14:51 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, john.mcnamara, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

v2:
 - included documentation changes
 - added value check for "port config all txqflags" as in --tqxflags paramater

Maciej Czekaj (3):
  app/testpmd: add "enable-scatter" parameter
  app/testpmd: extend port config with scatter parameter
  app/testpmd: support setting up txq_flags value in command line

 app/test-pmd/cmdline.c                      | 86 +++++++++++++++++++++++++++--
 app/test-pmd/parameters.c                   |  3 +
 doc/guides/testpmd_app_ug/run_app.rst       |  4 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++++++
 4 files changed, 109 insertions(+), 4 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 1/3] app/testpmd: add "enable-scatter" parameter
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
                   ` (4 preceding siblings ...)
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 " maciej.czekaj
@ 2016-04-22 14:51 ` maciej.czekaj
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22 14:51 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, john.mcnamara, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	This parameter allows for controlling rxmode.enable_scatter
	which in turn allow for multi-segment packet receive tests.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/parameters.c             | 3 +++
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 55572eb..8792c2c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -526,6 +526,7 @@ launch_args_parse(int argc, char** argv)
 		{ "pkt-filter-drop-queue",      1, 0, 0 },
 		{ "crc-strip",                  0, 0, 0 },
 		{ "enable-rx-cksum",            0, 0, 0 },
+		{ "enable-scatter",             0, 0, 0 },
 		{ "disable-hw-vlan",            0, 0, 0 },
 		{ "disable-hw-vlan-filter",     0, 0, 0 },
 		{ "disable-hw-vlan-strip",      0, 0, 0 },
@@ -764,6 +765,8 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "crc-strip"))
 				rx_mode.hw_strip_crc = 1;
+			if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
+				rx_mode.enable_scatter = 1;
 			if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
 				rx_mode.hw_ip_checksum = 1;
 
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index f605564..8fb0651 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -289,6 +289,10 @@ The commandline options are:
 
     Enable hardware RX checksum offload.
 
+*   ``--enable-scatter``
+
+    Enable scatter (multi-segment) RX.
+
 *   ``--disable-hw-vlan``
 
     Disable hardware VLAN.
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 2/3] app/testpmd: extend port config with scatter parameter
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
                   ` (5 preceding siblings ...)
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
@ 2016-04-22 14:51 ` maciej.czekaj
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22 14:51 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, john.mcnamara, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	"port config all scatter on|off" allows for
	controlling rxmode.enable_scatter in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/cmdline.c                      | 17 +++++++++++++----
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c5b9479..929d19a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -559,10 +559,10 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"port config all max-pkt-len (value)\n"
 			"    Set the max packet length.\n\n"
 
-			"port config all (crc-strip|rx-cksum|hw-vlan|hw-vlan-filter|"
+			"port config all (crc-strip|scatter|rx-cksum|hw-vlan|hw-vlan-filter|"
 			"hw-vlan-strip|hw-vlan-extend|drop-en)"
 			" (on|off)\n"
-			"    Set crc-strip/rx-checksum/hardware-vlan/drop_en"
+			"    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
 			" for ports.\n\n"
 
 			"port config all rss (all|ip|tcp|udp|sctp|ether|none)\n"
@@ -1410,6 +1410,15 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 			printf("Unknown parameter\n");
 			return;
 		}
+	} else if (!strcmp(res->name, "scatter")) {
+		if (!strcmp(res->value, "on"))
+			rx_mode.enable_scatter = 1;
+		else if (!strcmp(res->value, "off"))
+			rx_mode.enable_scatter = 0;
+		else {
+			printf("Unknown parameter\n");
+			return;
+		}
 	} else if (!strcmp(res->name, "rx-cksum")) {
 		if (!strcmp(res->value, "on"))
 			rx_mode.hw_ip_checksum = 1;
@@ -1487,7 +1496,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, all, "all");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_name =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name,
-					"crc-strip#rx-cksum#hw-vlan#"
+					"crc-strip#scatter#rx-cksum#hw-vlan#"
 					"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value,
@@ -1496,7 +1505,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 cmdline_parse_inst_t cmd_config_rx_mode_flag = {
 	.f = cmd_config_rx_mode_flag_parsed,
 	.data = NULL,
-	.help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+	.help_str = "port config all crc-strip|scatter|rx-cksum|hw-vlan|"
 		"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
 	.tokens = {
 		(void *)&cmd_config_rx_mode_flag_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index aed5e47..f2755cb 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1187,6 +1187,17 @@ CRC stripping is off by default.
 
 The ``on`` option is equivalent to the ``--crc-strip`` command-line option.
 
+port config - scatter
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set RX scatter mode on or off for all ports::
+
+   testpmd> port config all scatter (on|off)
+
+RX scatter mode is off by default.
+
+The ``on`` option is equivalent to the ``--enable-scatter`` command-line option.
+
 port config - RX Checksum
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 3/3] app/testpmd: support setting up txq_flags value in command line
  2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
                   ` (6 preceding siblings ...)
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
@ 2016-04-22 14:51 ` maciej.czekaj
  7 siblings, 0 replies; 15+ messages in thread
From: maciej.czekaj @ 2016-04-22 14:51 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, john.mcnamara, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	"port config all txqflags <value>" allows for
	specifying txq_flags value in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/cmdline.c                      | 69 +++++++++++++++++++++++++++++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  9 ++++
 2 files changed, 78 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 929d19a..1921612 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2730,6 +2730,74 @@ cmdline_parse_inst_t cmd_set_txsplit = {
 	},
 };
 
+/* *** CONFIG TX QUEUE FLAGS *** */
+
+struct cmd_config_txqflags_result {
+	cmdline_fixed_string_t port;
+	cmdline_fixed_string_t config;
+	cmdline_fixed_string_t all;
+	cmdline_fixed_string_t what;
+	int32_t hexvalue;
+};
+
+static void cmd_config_txqflags_parsed(void *parsed_result,
+				__attribute__((unused)) struct cmdline *cl,
+				__attribute__((unused)) void *data)
+{
+	struct cmd_config_txqflags_result *res = parsed_result;
+
+	if (!all_ports_stopped()) {
+		printf("Please stop all ports first\n");
+		return;
+	}
+
+	if (strcmp(res->what, "txqflags")) {
+		printf("Unknown parameter\n");
+		return;
+	}
+
+	if (res->hexvalue >= 0) {
+		txq_flags = res->hexvalue;
+	} else {
+		printf("txqflags must be >= 0\n");
+		return;
+	}
+
+	init_port_config();
+
+	cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
+}
+
+cmdline_parse_token_string_t cmd_config_txqflags_port =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, port,
+				 "port");
+cmdline_parse_token_string_t cmd_config_txqflags_config =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, config,
+				 "config");
+cmdline_parse_token_string_t cmd_config_txqflags_all =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, all,
+				 "all");
+cmdline_parse_token_string_t cmd_config_txqflags_what =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, what,
+				 "txqflags");
+cmdline_parse_token_num_t cmd_config_txqflags_value =
+	TOKEN_NUM_INITIALIZER(struct cmd_config_txqflags_result,
+				hexvalue, INT32);
+
+cmdline_parse_inst_t cmd_config_txqflags = {
+	.f = cmd_config_txqflags_parsed,
+	.data = NULL,
+	.help_str = "port config all txqflags value",
+	.tokens = {
+		(void *)&cmd_config_txqflags_port,
+		(void *)&cmd_config_txqflags_config,
+		(void *)&cmd_config_txqflags_all,
+		(void *)&cmd_config_txqflags_what,
+		(void *)&cmd_config_txqflags_value,
+		NULL,
+	},
+};
+
 /* *** ADD/REMOVE ALL VLAN IDENTIFIERS TO/FROM A PORT VLAN RX FILTER *** */
 struct cmd_rx_vlan_filter_all_result {
 	cmdline_fixed_string_t rx_vlan;
@@ -10487,6 +10555,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,
 	(cmdline_parse_inst_t *)&cmd_config_rss,
 	(cmdline_parse_inst_t *)&cmd_config_rxtx_queue,
+	(cmdline_parse_inst_t *)&cmd_config_txqflags,
 	(cmdline_parse_inst_t *)&cmd_config_rss_reta,
 	(cmdline_parse_inst_t *)&cmd_showport_reta,
 	(cmdline_parse_inst_t *)&cmd_config_burst,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f2755cb..1545350 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1198,6 +1198,15 @@ RX scatter mode is off by default.
 
 The ``on`` option is equivalent to the ``--enable-scatter`` command-line option.
 
+port config - TX queue flags
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set a hexadecimal bitmap of TX queue flags for all ports::
+
+   testpmd> port config all txqflags value
+
+This command is equivalent to the ``--txqflags`` command-line option.
+
 port config - RX Checksum
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 " maciej.czekaj
@ 2016-04-28  8:52   ` De Lara Guarch, Pablo
  2016-04-28 12:09     ` Maciej Czekaj
  2016-06-08 10:38     ` Thomas Monjalon
  0 siblings, 2 replies; 15+ messages in thread
From: De Lara Guarch, Pablo @ 2016-04-28  8:52 UTC (permalink / raw)
  To: maciej.czekaj, dev; +Cc: Mcnamara, John



> -----Original Message-----
> From: maciej.czekaj@caviumnetworks.com
> [mailto:maciej.czekaj@caviumnetworks.com]
> Sent: Friday, April 22, 2016 3:51 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-gather
> tests
> 
> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> 
> v2:
>  - included documentation changes
>  - added value check for "port config all txqflags" as in --tqxflags paramater
> 
> Maciej Czekaj (3):
>   app/testpmd: add "enable-scatter" parameter
>   app/testpmd: extend port config with scatter parameter
>   app/testpmd: support setting up txq_flags value in command line
> 
>  app/test-pmd/cmdline.c                      | 86 +++++++++++++++++++++++++++--
>  app/test-pmd/parameters.c                   |  3 +
>  doc/guides/testpmd_app_ug/run_app.rst       |  4 ++
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++++++
>  4 files changed, 109 insertions(+), 4 deletions(-)
> 
> --
> 1.9.1

Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Just one comment, maybe we should include some extra info in "show port info all", like txqflags or scatter mode.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-28  8:52   ` De Lara Guarch, Pablo
@ 2016-04-28 12:09     ` Maciej Czekaj
  2016-04-28 13:13       ` De Lara Guarch, Pablo
  2016-06-08 10:38     ` Thomas Monjalon
  1 sibling, 1 reply; 15+ messages in thread
From: Maciej Czekaj @ 2016-04-28 12:09 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: Mcnamara, John

On Thu, 28 Apr 2016 08:52:59 +0000 De Lara Guarch, Pablo wrote:
>
>
>> -----Original Message-----
>> From: maciej.czekaj@caviumnetworks.com
>> [mailto:maciej.czekaj@caviumnetworks.com]
>> Sent: Friday, April 22, 2016 3:51 PM
>> To: dev@dpdk.org
>> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
>> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-gather
>> tests
>>
>> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
>>
>> v2:
>>   - included documentation changes
>>   - added value check for "port config all txqflags" as in --tqxflags paramater
>>
>> Maciej Czekaj (3):
>>    app/testpmd: add "enable-scatter" parameter
>>    app/testpmd: extend port config with scatter parameter
>>    app/testpmd: support setting up txq_flags value in command line
>>
>>   app/test-pmd/cmdline.c                      | 86 +++++++++++++++++++++++++++--
>>   app/test-pmd/parameters.c                   |  3 +
>>   doc/guides/testpmd_app_ug/run_app.rst       |  4 ++
>>   doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++++++
>>   4 files changed, 109 insertions(+), 4 deletions(-)
>>
>> --
>> 1.9.1
>
> Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
> Just one comment, maybe we should include some extra info in "show port info all", like txqflags or scatter mode.
>

txqflags is displayed in:
  - a forwarding info upon start command
  - show txq info

scatter mode is displayed in:
  - show rxq info

Still I think it is a good point to aggregate it in port info.

I will address it in v3.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-28 12:09     ` Maciej Czekaj
@ 2016-04-28 13:13       ` De Lara Guarch, Pablo
  2016-04-28 13:19         ` Maciej Czekaj
  0 siblings, 1 reply; 15+ messages in thread
From: De Lara Guarch, Pablo @ 2016-04-28 13:13 UTC (permalink / raw)
  To: Maciej Czekaj, dev; +Cc: Mcnamara, John



> -----Original Message-----
> From: Maciej Czekaj [mailto:maciej.czekaj@caviumnetworks.com]
> Sent: Thursday, April 28, 2016 1:10 PM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Cc: Mcnamara, John
> Subject: Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for
> better scatter-gather tests
> 
> On Thu, 28 Apr 2016 08:52:59 +0000 De Lara Guarch, Pablo wrote:
> >
> >
> >> -----Original Message-----
> >> From: maciej.czekaj@caviumnetworks.com
> >> [mailto:maciej.czekaj@caviumnetworks.com]
> >> Sent: Friday, April 22, 2016 3:51 PM
> >> To: dev@dpdk.org
> >> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
> >> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-
> gather
> >> tests
> >>
> >> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> >>
> >> v2:
> >>   - included documentation changes
> >>   - added value check for "port config all txqflags" as in --tqxflags
> paramater
> >>
> >> Maciej Czekaj (3):
> >>    app/testpmd: add "enable-scatter" parameter
> >>    app/testpmd: extend port config with scatter parameter
> >>    app/testpmd: support setting up txq_flags value in command line
> >>
> >>   app/test-pmd/cmdline.c                      | 86
> +++++++++++++++++++++++++++--
> >>   app/test-pmd/parameters.c                   |  3 +
> >>   doc/guides/testpmd_app_ug/run_app.rst       |  4 ++
> >>   doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++++++
> >>   4 files changed, 109 insertions(+), 4 deletions(-)
> >>
> >> --
> >> 1.9.1
> >
> > Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >
> > Just one comment, maybe we should include some extra info in "show port
> info all", like txqflags or scatter mode.
> >
> 
> txqflags is displayed in:
>   - a forwarding info upon start command
>   - show txq info
> 
> scatter mode is displayed in:
>   - show rxq info
> 
> Still I think it is a good point to aggregate it in port info.
> 
> I will address it in v3.

Oh, true, good point. Then, probably not necessary, as we would be duplicating  information.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-28 13:13       ` De Lara Guarch, Pablo
@ 2016-04-28 13:19         ` Maciej Czekaj
  0 siblings, 0 replies; 15+ messages in thread
From: Maciej Czekaj @ 2016-04-28 13:19 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: Mcnamara, John

On Thu, 28 Apr 2016 13:13:20 +0000 De Lara Guarch, Pablo wrote:
>
>
>> -----Original Message-----
>> From: Maciej Czekaj [mailto:maciej.czekaj@caviumnetworks.com]
>> Sent: Thursday, April 28, 2016 1:10 PM
>> To: De Lara Guarch, Pablo; dev@dpdk.org
>> Cc: Mcnamara, John
>> Subject: Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for
>> better scatter-gather tests
>>
>> On Thu, 28 Apr 2016 08:52:59 +0000 De Lara Guarch, Pablo wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: maciej.czekaj@caviumnetworks.com
>>>> [mailto:maciej.czekaj@caviumnetworks.com]
>>>> Sent: Friday, April 22, 2016 3:51 PM
>>>> To: dev@dpdk.org
>>>> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
>>>> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-
>> gather
>>>> tests
>>>>
>>>> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
>>>>
>>>> v2:
>>>>    - included documentation changes
>>>>    - added value check for "port config all txqflags" as in --tqxflags
>> paramater
>>>>
>>>> Maciej Czekaj (3):
>>>>     app/testpmd: add "enable-scatter" parameter
>>>>     app/testpmd: extend port config with scatter parameter
>>>>     app/testpmd: support setting up txq_flags value in command line
>>>>
>>>>    app/test-pmd/cmdline.c                      | 86
>> +++++++++++++++++++++++++++--
>>>>    app/test-pmd/parameters.c                   |  3 +
>>>>    doc/guides/testpmd_app_ug/run_app.rst       |  4 ++
>>>>    doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++++++
>>>>    4 files changed, 109 insertions(+), 4 deletions(-)
>>>>
>>>> --
>>>> 1.9.1
>>>
>>> Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>>>
>>> Just one comment, maybe we should include some extra info in "show port
>> info all", like txqflags or scatter mode.
>>>
>>
>> txqflags is displayed in:
>>    - a forwarding info upon start command
>>    - show txq info
>>
>> scatter mode is displayed in:
>>    - show rxq info
>>
>> Still I think it is a good point to aggregate it in port info.
>>
>> I will address it in v3.
>
> Oh, true, good point. Then, probably not necessary, as we would be duplicating  information.
>

If you think it is not necessary to add another place for that info than 
I think we're fine with v2.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests
  2016-04-28  8:52   ` De Lara Guarch, Pablo
  2016-04-28 12:09     ` Maciej Czekaj
@ 2016-06-08 10:38     ` Thomas Monjalon
  1 sibling, 0 replies; 15+ messages in thread
From: Thomas Monjalon @ 2016-06-08 10:38 UTC (permalink / raw)
  To: maciej.czekaj; +Cc: dev, De Lara Guarch, Pablo, Mcnamara, John

> > Maciej Czekaj (3):
> >   app/testpmd: add "enable-scatter" parameter
> >   app/testpmd: extend port config with scatter parameter
> >   app/testpmd: support setting up txq_flags value in command line
> 
> Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-06-08 10:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-22  9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
2016-04-22  9:58 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
2016-04-22  9:58 ` [dpdk-dev] [PATCH 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
2016-04-22  9:58 ` [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
2016-04-22 10:19 ` [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests Mcnamara, John
2016-04-22 10:38   ` [dpdk-dev] Odp.: " Czekaj, Maciej
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 " maciej.czekaj
2016-04-28  8:52   ` De Lara Guarch, Pablo
2016-04-28 12:09     ` Maciej Czekaj
2016-04-28 13:13       ` De Lara Guarch, Pablo
2016-04-28 13:19         ` Maciej Czekaj
2016-06-08 10:38     ` Thomas Monjalon
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).