Skip to contentSkip to conversation

app/testpmd: supported offload capabilities query

PATCH Superseded Qiming Yang 7 participants 23 messages Dec 2, 2016 – Jan 30, 2017

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: supported offload capabilities query

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
 app/test-pmd/cmdline.c |  15 +++--
 app/test-pmd/config.c  | 172 +++++++++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h |   1 +
 3 files changed, 184 insertions(+), 4 deletions(-)
app/test-pmd/cmdline.c +11 -4
index 63b55dc..4a9bcd3 100644
@@ -5766,6 +5766,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "capa"))
+		FOREACH_PORT(i, ports)
+			port_offload_capa_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5775,13 +5778,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5821,6 +5825,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "capa"))
+		port_offload_capa_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5830,14 +5836,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X (X = port number)",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa X (X = port number)",
 	.tokens = {
 		(void *)&cmd_showport_show,
 		(void *)&cmd_showport_port,
app/test-pmd/config.c +172 -0

178 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 9c1e703..c59bb03 100644
@@ -484,6 +484,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_capa_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Friday, December 2, 2016 11:31 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH] app/testpmd: supported offload capabilities query

Quoted 4 lines

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

Hi,

Thanks for that.

New TestPMD functions should have a corresponding entry in the docs.

John

#2 lore raw
Quoted 25 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Mcnamara, John
Sent: Friday, December 2, 2016 11:41 AM
To: Yang, Qiming <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: supported offload capabilities query

Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Friday, December 2, 2016 11:31 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH] app/testpmd: supported offload capabilities query

Quoted 4 lines

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

Quoted 6 lines

Hi,

Thanks for that.

New TestPMD functions should have a corresponding entry in the docs.

Also, see Ferruh's patch to the TestPMD help to make sure your patch uses a similar output style.

    http://dpdk.org/dev/patchwork/patch/17361/

John

#3 lore raw

PATCH v2 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some descriptions in testpmd_funcs.rst for new functions.
---

---
 app/test-pmd/cmdline.c                      |  15 ++-
 app/test-pmd/config.c                       | 172 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 191 insertions(+), 9 deletions(-)
app/test-pmd/cmdline.c +11 -4
index 63b55dc..14dee1e 100644
@@ -5766,6 +5766,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "capa"))
+		FOREACH_PORT(i, ports)
+			port_offload_capa_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5775,13 +5778,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5821,6 +5825,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "capa"))
+		port_offload_capa_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5830,14 +5836,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X (X = port number)",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa <port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
 		(void *)&cmd_showport_port,
app/test-pmd/config.c +172 -0

178 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 9c1e703..c59bb03 100644
@@ -484,6 +484,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_capa_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index f1c269a..6f4dd4a 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|capa) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``capa``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
#4 lore raw
Quoted 21 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Tuesday, December 6, 2016 3:08 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: supported offload capabilities query

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some descriptions in testpmd_funcs.rst for new functions.
---

Quoted 7 lines
---
 app/test-pmd/cmdline.c                      |  15 ++-
 app/test-pmd/config.c                       | 172 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 191 insertions(+), 9 deletions(-)

Please add this new command for the print when "help display" in cmd_help_long_parsed.

Thanks
Jingjing

#5 lore raw

PATCH v3 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port capa <port>" and "show port capa all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some descriptions in testpmd_funcs.rst for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 172 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 192 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +12 -5
index 63b55dc..21ffa0a 100644
@@ -182,7 +182,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)\n"
+			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|capa) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port X rss reta (size) (mask0,mask1,...)\n"
@@ -5766,6 +5766,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "capa"))
+		FOREACH_PORT(i, ports)
+			port_offload_capa_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5775,13 +5778,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5821,6 +5825,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "capa"))
+		port_offload_capa_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5830,14 +5836,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#capa");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X (X = port number)",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|capa <port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
 		(void *)&cmd_showport_port,
app/test-pmd/config.c +172 -0

178 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 9c1e703..c59bb03 100644
@@ -484,6 +484,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_capa_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index f1c269a..6f4dd4a 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|capa all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|capa) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``capa``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
#6 lore raw
Quoted 1 line · Qiming Yang

Add two new commands "show port capa <port>" and "show

I think 'cap' is a more well-known shortening for capability than "capa"?

	--yliu
#7 lore raw

That's a good advice. Thanks.

-----Original Message-----
From: Yuanhan Liu [mailto:[email protected]]
Sent: Wednesday, December 21, 2016 10:37 AM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: supported offload capabilities query

Quoted 1 line · Qiming Yang

Add two new commands "show port capa <port>" and "show

I think 'cap' is a more well-known shortening for capability than "capa"?

	--yliu
#8 lore raw

PATCH v4 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 172 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 192 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +12 -5
index 63b55dc..bbfafab 100644
@@ -182,7 +182,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)\n"
+			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port X rss reta (size) (mask0,mask1,...)\n"
@@ -5766,6 +5766,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "cap"))
+		FOREACH_PORT(i, ports)
+			port_offload_cap_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5775,13 +5778,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5821,6 +5825,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5830,14 +5836,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X (X = port number)",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap <port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
 		(void *)&cmd_showport_port,
app/test-pmd/config.c +172 -0

178 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 9c1e703..719f6cc 100644
@@ -484,6 +484,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_cap_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index f1c269a..093ecf0 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``cap``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
Acked-by on v4 1/1
#9 lore raw
Quoted 10 lines

-----Original Message-----
From: Yang, Qiming
Sent: Friday, December 23, 2016 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>
Subject: [PATCH v4] app/testpmd: supported offload capabilities query

Quoted 6 lines

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

#10 lore raw
In reply to Qiming Yang

Hi Qiming,

Quoted 53 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Friday, December 23, 2016 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 172
++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 192 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

63b55dc..bbfafab 100644

app/test-pmd/cmdline.c +17 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("TCP checksum:                  ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) {
+		printf("Large receive offload:         ");
+		if (dev->data->dev_conf.rxmode.enable_lro)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+

app/test-pmd/cmdline.c

Quoted 10 lines
app/test-pmd/cmdline.c +10 -0
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_QINQ_STRIP) {
+		printf("Double VLANs stripped:         ");
+		if (dev->data->dev_conf.rxmode.hw_vlan_extend)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)
+		printf("Outer IPv4 checksum:           ");

Seems there's no 'on' or 'off' printed here, do I miss anything?

Quoted 10 lines
app/test-pmd/cmdline.c +4 -0
+
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) {
+		printf("VLAN insert:                   ");
+		if (ports[port_id].tx_ol_flags &

TESTPMD_TX_OFFLOAD_INSERT_VLAN)

app/test-pmd/cmdline.c +5 -0
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
#11 lore raw

Hi, Beilei
Nothing is missing. This capability have no switch in DPDK now. So it don't have 'on' or 'off'.

-----Original Message-----
From: Xing, Beilei
Sent: Tuesday, December 27, 2016 4:18 PM
To: Yang, Qiming <[email protected]>; [email protected]
Cc: Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilities query

Hi Qiming,

Quoted 53 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Friday, December 23, 2016 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 172
++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 192 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

63b55dc..bbfafab 100644

app/test-pmd/cmdline.c +17 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("TCP checksum:                  ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) {
+		printf("Large receive offload:         ");
+		if (dev->data->dev_conf.rxmode.enable_lro)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+

app/test-pmd/cmdline.c

Quoted 10 lines
app/test-pmd/cmdline.c +10 -0
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_QINQ_STRIP) {
+		printf("Double VLANs stripped:         ");
+		if (dev->data->dev_conf.rxmode.hw_vlan_extend)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)
+		printf("Outer IPv4 checksum:           ");

Seems there's no 'on' or 'off' printed here, do I miss anything?

Quoted 10 lines
app/test-pmd/cmdline.c +4 -0
+
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) {
+		printf("VLAN insert:                   ");
+		if (ports[port_id].tx_ol_flags &

TESTPMD_TX_OFFLOAD_INSERT_VLAN)

app/test-pmd/cmdline.c +5 -0
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
Acked-by on v4 1/1
#12 lore raw
In reply to Qiming Yang
Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Friday, December 23, 2016 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilities query

Quoted 6 lines

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

#13 lore raw

PATCH v5 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +12 -5
index 4e8b0d8..6fa1783 100644
@@ -183,7 +183,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)\n"
+			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port X rss reta (size) (mask0,mask1,...)\n"
@@ -5812,6 +5812,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "cap"))
+		FOREACH_PORT(i, ports)
+			port_offload_cap_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5821,13 +5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port"
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5876,14 +5882,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc "
+	.help_str = "show|clear port"
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
app/test-pmd/config.c +175 -0

181 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 22ce2d6..8b2374a 100644
@@ -498,6 +498,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_cap_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index c611dc5..0e49d98 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``cap``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
#14 lore raw

Hi Qiming,

Quoted 41 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Thursday, January 12, 2017 3:26 AM
To: [email protected]
Cc: Yang, Qiming
Subject: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175
++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +0 -0
index 4e8b0d8..6fa1783 100644

...

Quoted 19 lines

cmdline_parse_token_string_t cmd_showportall_show =

app/test-pmd/cmdline.c +0 -0
@@ -5821,13 +5824,14 @@ cmdline_parse_token_string_t

cmd_showportall_port =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port,
"port");
cmdline_parse_token_string_t cmd_showportall_what =

app/test-pmd/cmdline.c +0 -1
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-

"info#stats#xstats#fdir#stat_qmap#dcb_tc");
+
"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
cmdline_parse_token_string_t cmd_showportall_all =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all,
"all");
cmdline_parse_inst_t cmd_showportall = {

app/test-pmd/cmdline.c +0 -1
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port

info|stats|xstats|fdir|stat_qmap|dcb_tc all",

app/test-pmd/cmdline.c

Quoted 1 line
app/test-pmd/cmdline.c +1 -0
+	.help_str = "show|clear port"

Missing space after "port"

Quoted 33 lines
app/test-pmd/cmdline.c +3 -0
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void
 *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 

cmdline_parse_token_string_t cmd_showport_show =

app/test-pmd/cmdline.c +0 -0
@@ -5876,14 +5882,15 @@ cmdline_parse_token_string_t

cmd_showport_port =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port,
"port");
cmdline_parse_token_string_t cmd_showport_what =

app/test-pmd/cmdline.c +0 -1
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-

"info#stats#xstats#fdir#stat_qmap#dcb_tc");
+
"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
cmdline_parse_token_num_t cmd_showport_portnum =
TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum,
UINT8);

cmdline_parse_inst_t cmd_showport = {

app/test-pmd/cmdline.c +0 -1
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port

info|stats|xstats|fdir|stat_qmap|dcb_tc "

app/test-pmd/cmdline.c

Quoted 1 line
app/test-pmd/cmdline.c +1 -0
+	.help_str = "show|clear port"

Missing space after "port".
Also, add a tab in the following line to be consistent with the help_str of the next command.

Quoted 8 lines
app/test-pmd/cmdline.c +1 -0
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
app/test-pmd/config.c +0 -0
index 617e6d4..8a2ef56 100644

...

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 602

Quoted 12 lines
app/test-pmd/config.c +10 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("RX TCP checksum:               ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa &

DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)

app/test-pmd/config.c +1 -0
+		printf("RX Outer IPv4 checksum:        ");

Missing on/off?

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 610

Quoted 8 lines
app/test-pmd/config.c +8 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) {
+		printf("Large receive offload:         ");
+		if (dev->data->dev_conf.rxmode.enable_lro)
+			printf("on\n");
+		else
+			printf("off\n");
+	}

Thanks for this nice patch.

Pablo

#15 lore raw

Hi, Pablo

-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Friday, January 13, 2017 4:43 PM
To: Yang, Qiming <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Hi Qiming,

Quoted 40 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Thursday, January 12, 2017 3:26 AM
To: [email protected]
Cc: Yang, Qiming
Subject: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175
++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

4e8b0d8..6fa1783 100644

app/test-pmd/cmdline.c +0 -0

...

Quoted 16 lines

cmdline_parse_token_string_t cmd_showportall_show = @@ -5821,13
+5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port,
"port"); cmdline_parse_token_string_t cmd_showportall_what =

app/test-pmd/cmdline.c +0 -1
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-

"info#stats#xstats#fdir#stat_qmap#dcb_tc");
+
"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
cmdline_parse_token_string_t cmd_showportall_all =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
cmdline_parse_inst_t cmd_showportall = {

app/test-pmd/cmdline.c +0 -1
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port

info|stats|xstats|fdir|stat_qmap|dcb_tc all",

app/test-pmd/cmdline.c

Quoted 1 line
app/test-pmd/cmdline.c +1 -0
+	.help_str = "show|clear port"

Missing space after "port"

Quoted 30 lines
app/test-pmd/cmdline.c +3 -0
+	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void 
 *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 

cmdline_parse_token_string_t cmd_showport_show = @@ -5876,14 +5882,15
@@ cmdline_parse_token_string_t cmd_showport_port =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
cmdline_parse_token_string_t cmd_showport_what =

app/test-pmd/cmdline.c +0 -1
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-

"info#stats#xstats#fdir#stat_qmap#dcb_tc");
+
"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
cmdline_parse_token_num_t cmd_showport_portnum =

app/test-pmd/cmdline.c +0 -1
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port

info|stats|xstats|fdir|stat_qmap|dcb_tc "

app/test-pmd/cmdline.c

Quoted 1 line
app/test-pmd/cmdline.c +1 -0
+	.help_str = "show|clear port"

Missing space after "port".
Also, add a tab in the following line to be consistent with the help_str of the next command.

Quoted 8 lines
app/test-pmd/cmdline.c +1 -0
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
app/test-pmd/config.c index renamed from app/test-pmd/config.c +0 -0

617e6d4..8a2ef56 100644

app/test-pmd/config.c +0 -0

...

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 602

Quoted 12 lines
app/test-pmd/config.c +10 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("RX TCP checksum:               ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa &

DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)

app/test-pmd/config.c +1 -0
+		printf("RX Outer IPv4 checksum:        ");

Missing on/off?
Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the format problem. Thank you.

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 610

Quoted 8 lines
app/test-pmd/config.c +8 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) {
+		printf("Large receive offload:         ");
+		if (dev->data->dev_conf.rxmode.enable_lro)
+			printf("on\n");
+		else
+			printf("off\n");
+	}

Thanks for this nice patch.

Pablo

#19 lore raw

PATCH v6 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
v6 changes:
* fixed format problems.

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +12 -5
index 4e8b0d8..5938daa 100644
@@ -183,7 +183,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)\n"
+			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port X rss reta (size) (mask0,mask1,...)\n"
@@ -5812,6 +5812,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "cap"))
+		FOREACH_PORT(i, ports)
+			port_offload_cap_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5821,13 +5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port "
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5876,14 +5882,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc "
+	.help_str = "show|clear port "
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
app/test-pmd/config.c +175 -0

181 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 22ce2d6..8b2374a 100644
@@ -498,6 +498,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_cap_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index c611dc5..0e49d98 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``cap``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
#16 lore raw
In reply to Yang, Qiming

Hi Qiming,

Quoted 63 lines

-----Original Message-----
From: Yang, Qiming
Sent: Friday, January 13, 2017 9:40 AM
To: De Lara Guarch, Pablo; [email protected]
Subject: RE: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Hi, Pablo

-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Friday, January 13, 2017 4:43 PM
To: Yang, Qiming <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Hi Qiming,

Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Thursday, January 12, 2017 3:26 AM
To: [email protected]
Cc: Yang, Qiming
Subject: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap

all"to

Quoted 31 lines

diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
---

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175
++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

4e8b0d8..6fa1783 100644

app/test-pmd/cmdline.c +0 -0

...

Quoted 16 lines

app/test-pmd/cmdline.c

Quoted 12 lines
app/test-pmd/cmdline.c +10 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("RX TCP checksum:               ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa &

DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)

app/test-pmd/cmdline.c +1 -0
+		printf("RX Outer IPv4 checksum:        ");

Missing on/off?
Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the format problem. Thank you.

I just saw your v6. So, what does this mean? If the device is capable of doing this,
but there is no way to enable/disable it, it would mean that it will be enabled or disabled by default, right?

I see that X550 NIC is the only one capable of this. Maybe Wenzhuo can help on clarifying this.

I would say that, if it is enabled when it is capable, then you should print "on",
But printing only "RX Outer IPv4 checksum" does not give any information (when all the rest of the capabilities show on/off).

Thanks,
Pablo

#17 lore raw

HI, Pablo

Quoted 18 lines

...

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 602

Quoted 12 lines
app/test-pmd/config.c +10 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("RX TCP checksum:               ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa &

DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)

app/test-pmd/config.c +1 -0
+		printf("RX Outer IPv4 checksum:        ");

Missing on/off?
Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the format problem. Thank you.

I just saw your v6. So, what does this mean? If the device is capable of doing this, but there is no way to enable/disable it, it would mean that it will be enabled or disabled by default, right?

I see that X550 NIC is the only one capable of this. Maybe Wenzhuo can help on clarifying this.

I would say that, if it is enabled when it is capable, then you should print "on", But printing only "RX Outer IPv4 checksum" does not give any information (when all the rest of the capabilities show on/off).

Qiming: Ok, I'll check with Wenzhuo, Thank you for your advice for the unsuitable print in this place .

Thanks,
Pablo

#18 lore raw

Hi, Pablo
I have checked with Wenzhuo, this capability has no way to disable and is always enable if NIC have this capability.
So I'll change the print to " RX Outer IPv4 checksum: on".

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yang, Qiming
Sent: Saturday, January 14, 2017 11:06 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

HI, Pablo

Quoted 18 lines

...

app/test-pmd/config.c port_infos_display(portid_t port_id) · line 602

Quoted 12 lines
app/test-pmd/config.c +10 -0
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
+		printf("RX TCP checksum:               ");
+		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
+			printf("on\n");
+		else
+			printf("off\n");
+	}
+
+	if (dev_info.rx_offload_capa &

DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)

app/test-pmd/config.c +1 -0
+		printf("RX Outer IPv4 checksum:        ");

Missing on/off?
Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the format problem. Thank you.

I just saw your v6. So, what does this mean? If the device is capable of doing this, but there is no way to enable/disable it, it would mean that it will be enabled or disabled by default, right?

I see that X550 NIC is the only one capable of this. Maybe Wenzhuo can help on clarifying this.

I would say that, if it is enabled when it is capable, then you should print "on", But printing only "RX Outer IPv4 checksum" does not give any information (when all the rest of the capabilities show on/off).

Qiming: Ok, I'll check with Wenzhuo, Thank you for your advice for the unsuitable print in this place .

Thanks,
Pablo

#20 lore raw

PATCH v7 1/1 app/testpmd: supported offload capabilities query

In reply to Qiming Yang

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

---
v2 changes:
* fixed the output style as Ferruh's patch show and add some description in docs for new functions.
v3 changes:
* add new command in cmd_help_long_parsed.
v4 changes:
* use 'cap' instead of 'capa'.
v5 changes:
* rebased, fixed the inappropriate expression and adjusted the output order.
v6 changes:
* fixed format problems.
v7 changes:
* show the default status of 'RX Outer IPV4 checksum'.

---
 app/test-pmd/cmdline.c                      |  17 ++-
 app/test-pmd/config.c                       | 175 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
 4 files changed, 195 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +12 -5
index 4e8b0d8..5938daa 100644
@@ -183,7 +183,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)\n"
+			"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port X rss reta (size) (mask0,mask1,...)\n"
@@ -5812,6 +5812,9 @@ static void cmd_showportall_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "dcb_tc"))
 		FOREACH_PORT(i, ports)
 			port_dcb_info_display(i);
+	else if (!strcmp(res->what, "cap"))
+		FOREACH_PORT(i, ports)
+			port_offload_cap_display(i);
 }
 
 cmdline_parse_token_string_t cmd_showportall_show =
@@ -5821,13 +5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all",
+	.help_str = "show|clear port "
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void *parsed_result,
 		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
+	else if (!strcmp(res->what, "cap"))
+		port_offload_cap_display(res->portnum);
 }
 
 cmdline_parse_token_string_t cmd_showport_show =
@@ -5876,14 +5882,15 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#stats#xstats#fdir#stat_qmap#dcb_tc");
+				 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
-	.help_str = "show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc "
+	.help_str = "show|clear port "
+		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
app/test-pmd/config.c +175 -0

181 lines not on this page · raw message

app/test-pmd/testpmd.h +1 -0
index 22ce2d6..8b2374a 100644
@@ -498,6 +498,7 @@ void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
 void nic_stats_mapping_display(portid_t port_id);
 void port_infos_display(portid_t port_id);
+void port_offload_cap_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +7 -5
index c611dc5..0e49d98 100644
@@ -51,10 +51,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available
 
    testpmd> show port <TAB>
 
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc X
-       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc all
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap X
+       stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all
        ...
 
 
@@ -131,7 +131,7 @@ show port
 
 Display information for a given port or all ports::
 
-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc) (port_id|all)
+   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)
 
 The available information categories are:
 
@@ -147,6 +147,8 @@ The available information categories are:
 
 * ``dcb_tc``: DCB information such as TC mapping.
 
+* ``cap``: Supported offload capabilities.
+
 For example:
 
 .. code-block:: console
Signature · 1 line
2.7.4
Acked-by on v7 1/1
#21 lore raw
Quoted 16 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Monday, January 16, 2017 2:31 AM
To: [email protected]
Cc: Yang, Qiming
Subject: [dpdk-dev] [PATCH v7] app/testpmd: supported offload capabilities query

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

Quoted 3 lines
#22 lore raw
Quoted 11 lines
Quoted 9 lines

Add two new commands "show port cap <port>" and "show port cap all"to diaplay what offload capabilities supported in ports. It will not only display all the capabilities of the port, but also the enabling condition for each capability in the running time.

Applied, thanks