Skip to contentSkip to conversation

app/testpmd: fix commands to config some offload

PATCH In review Wei Dai 4 participants 9 messages Jul 24, 2018 – Aug 5, 2018

lore
Share & tools
lore

Wei Dai

author
#0 lore raw

PATCH 1/1 app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")
---
 app/test-pmd/cmdline.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
app/test-pmd/cmdline.c +8 -8
index 5885289..a0ed3a0 100644
@@ -16665,7 +16665,7 @@ struct cmd_config_per_port_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -16744,7 +16744,7 @@ struct cmd_config_per_port_rx_offload_result {
 	.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -16794,7 +16794,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -16846,7 +16846,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		    "vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17063,7 +17063,7 @@ struct cmd_config_per_port_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17144,7 +17144,7 @@ struct cmd_config_per_port_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17195,7 +17195,7 @@ struct cmd_config_per_queue_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17248,7 +17248,7 @@ struct cmd_config_per_queue_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_tx_offload_result_port,
Signature · 1 line
1.8.3.1
#1 lore raw

Hi Wei,

Quoted 119 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Dai
Sent: Tuesday, July 24, 2018 4:45 AM
To: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Cc: Dai, Wei <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload

API")
Cc: [email protected]

---
 app/test-pmd/cmdline.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

5885289..a0ed3a0 100644

app/test-pmd/cmdline.c +0 -0
@@ -16665,7 +16665,7 @@ struct cmd_config_per_port_rx_offload_result {
 		 offload,

"vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"

"header_split#vlan_filter#vlan_extend#jumbo_frame#"

app/test-pmd/cmdline.c +1 -1
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t

cmd_config_per_port_rx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -16744,7 +16744,7 @@ struct cmd_config_per_port_rx_offload_result {
 	.help_str = "port config <port_id> rx_offload

vlan_strip|ipv4_cksum|"

"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"

app/test-pmd/cmdline.c +1 -1
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+

"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "

app/test-pmd/cmdline.c +0 -0
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -16794,7 +16794,7 @@ struct cmd_config_per_queue_rx_offload_result
 {
 		 offload,

"vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"

"header_split#vlan_filter#vlan_extend#jumbo_frame#"

app/test-pmd/cmdline.c +1 -1
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t

cmd_config_per_queue_rx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -16846,7 +16846,7 @@ struct cmd_config_per_queue_rx_offload_result
 {
 		    "vlan_strip|ipv4_cksum|"
 

"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"

app/test-pmd/cmdline.c +1 -1
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+

"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "

app/test-pmd/cmdline.c +0 -0
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17063,7 +17063,7 @@ struct cmd_config_per_port_tx_offload_result {
 

"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"

app/test-pmd/cmdline.c +1 -1
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+

"mt_lockfree#multi_segs#mbuf_fast_free#security");
cmdline_parse_token_string_t
cmd_config_per_port_tx_offload_result_on_off =

app/test-pmd/cmdline.c +1 -1
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17144,7 +17144,7 @@ struct cmd_config_per_port_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17195,7 +17195,7 @@ struct cmd_config_per_queue_tx_offload_result
 {
 

"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"

app/test-pmd/cmdline.c +1 -1
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+

"mt_lockfree#multi_segs#mbuf_fast_free#security");
cmdline_parse_token_string_t
cmd_config_per_queue_tx_offload_result_on_off =

app/test-pmd/cmdline.c +1 -1
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17248,7 +17248,7 @@ struct cmd_config_per_queue_tx_offload_result
 {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
Quoted 3 lines

(void *)&cmd_config_per_queue_tx_offload_result_port,
--
1.8.3.1

Changes are also needed in dpdk/doc/guides/testpmd_app_guide/testpmd_funcs.rst for mbuf_fast_free and keep_crc.

Regards,

Bernard

author
#2 lore raw

Hi, Bernard

Thanks for your feedback and guidance.
I have just submitted a v2 patch to include modification on document.

Thanks & Best Regrards
-Wei

Quoted 149 lines

-----Original Message-----
From: Iremonger, Bernard
Sent: Tuesday, July 24, 2018 10:22 PM
To: Dai, Wei <[email protected]>; Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Cc: Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Hi Wei,

app/test-pmd/cmdline.c struct

Quoted 28 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Dai
Sent: Tuesday, July 24, 2018 4:45 AM
To: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Cc: Dai, Wei <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload

API")
Cc: [email protected]

---
 app/test-pmd/cmdline.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

5885289..a0ed3a0 100644

app/test-pmd/cmdline.c +0 -0
@@ -16665,7 +16665,7 @@ struct

cmd_config_per_port_rx_offload_result {

app/test-pmd/cmdline.c struct

Quoted 12 lines
app/test-pmd/cmdline.c +0 -0
 		 offload,

"vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"

"header_split#vlan_filter#vlan_extend#jumbo_frame#"

app/test-pmd/cmdline.c +1 -1
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t

cmd_config_per_port_rx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -16744,7 +16744,7 @@ struct

cmd_config_per_port_rx_offload_result {

app/test-pmd/cmdline.c struct

Quoted 12 lines
app/test-pmd/cmdline.c +0 -0
 	.help_str = "port config <port_id> rx_offload

vlan_strip|ipv4_cksum|"

"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"

app/test-pmd/cmdline.c +1 -1
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+

"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "

app/test-pmd/cmdline.c +0 -0
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -16794,7 +16794,7 @@ struct

cmd_config_per_queue_rx_offload_result

app/test-pmd/cmdline.c struct

Quoted 13 lines
app/test-pmd/cmdline.c +0 -0
 {
 		 offload,

"vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"

"header_split#vlan_filter#vlan_extend#jumbo_frame#"

app/test-pmd/cmdline.c +1 -1
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t

cmd_config_per_queue_rx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -16846,7 +16846,7 @@ struct

cmd_config_per_queue_rx_offload_result

app/test-pmd/cmdline.c struct

Quoted 12 lines
app/test-pmd/cmdline.c +0 -0
 {
 		    "vlan_strip|ipv4_cksum|"
 

"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"

app/test-pmd/cmdline.c +1 -1
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+

"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "

app/test-pmd/cmdline.c +0 -0
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17063,7 +17063,7 @@ struct

cmd_config_per_port_tx_offload_result {

app/test-pmd/cmdline.c struct

Quoted 12 lines

"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"

app/test-pmd/cmdline.c +1 -1
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+

"mt_lockfree#multi_segs#mbuf_fast_free#security");
cmdline_parse_token_string_t
cmd_config_per_port_tx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17144,7 +17144,7 @@ struct

cmd_config_per_port_tx_offload_result {

app/test-pmd/cmdline.c struct

Quoted 9 lines
app/test-pmd/cmdline.c +1 -1
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17195,7 +17195,7 @@ struct

cmd_config_per_queue_tx_offload_result

app/test-pmd/cmdline.c struct

Quoted 13 lines
app/test-pmd/cmdline.c +0 -0
 {
 

"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"

app/test-pmd/cmdline.c +1 -1
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+

"mt_lockfree#multi_segs#mbuf_fast_free#security");
cmdline_parse_token_string_t
cmd_config_per_queue_tx_offload_result_on_off =

app/test-pmd/cmdline.c +0 -0
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17248,7 +17248,7 @@ struct

cmd_config_per_queue_tx_offload_result

Quoted 11 lines
app/test-pmd/cmdline.c +1 -1
 {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {

(void *)&cmd_config_per_queue_tx_offload_result_port,
--
1.8.3.1

Changes are also needed in dpdk/doc/guides/testpmd_app_guide/testpmd_funcs.rst for mbuf_fast_free and keep_crc.

Regards,

Bernard

Tested-by on v1 1/1
#3 lore raw
In reply to Wei Dai

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Dai
Sent: Tuesday, July 24, 2018 11:45 AM
To: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Cc: Dai, Wei <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument". This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")

- DPDK version: 18.08-rc1 commit c27dbc300eee78c2eb33e84181617fdd7cbaaae4
- OS: 4.5.5-300.fc24.x86_64
- Compiler: gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
- Hardware platform: BDE-EP
- NIC Intel Corporation Device Fortville [8086:1583]
- driver: i40e
- version: 2.4.3
- firmware-version: 6.01 0x80003205 1.1691.0
- CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
- Default x86_64-native-linuxapp-gcc configuration
- Prerequisites:
- Total 2 cases, 2 passed, 0 failed

---
 app/test-pmd/cmdline.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
app/test-pmd/cmdline.c +8 -8
@@ -16665,7 +16665,7 @@ struct cmd_config_per_port_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -16744,7 +16744,7 @@ struct cmd_config_per_port_rx_offload_result {
 	.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -16794,7 +16794,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -16846,7 +16846,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		    "vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17063,7 +17063,7 @@ struct cmd_config_per_port_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17144,7 +17144,7 @@ struct cmd_config_per_port_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17195,7 +17195,7 @@ struct cmd_config_per_queue_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17248,7 +17248,7 @@ struct cmd_config_per_queue_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_tx_offload_result_port,

--
1.8.3.1

author
#4 lore raw

PATCH 1/1 app/testpmd: fix commands to config some offload

In reply to Wei Dai

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")
---
 app/test-pmd/cmdline.c                      | 16 ++++++++--------
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
app/test-pmd/cmdline.c +8 -8
index 54ba2f5..589121d 100644
@@ -17005,7 +17005,7 @@ struct cmd_config_per_port_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -17084,7 +17084,7 @@ struct cmd_config_per_port_rx_offload_result {
 	.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -17134,7 +17134,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -17186,7 +17186,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		    "vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17403,7 +17403,7 @@ struct cmd_config_per_port_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17484,7 +17484,7 @@ struct cmd_config_per_port_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17535,7 +17535,7 @@ struct cmd_config_per_queue_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17588,7 +17588,7 @@ struct cmd_config_per_queue_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_tx_offload_result_port,
doc/guides/testpmd_app_ug/testpmd_funcs.rst +4 -4
index c35077c..a705366 100644
@@ -1490,7 +1490,7 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
                   vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
                   qinq_strip, outer_ipv4_cksum, macsec_strip,
                   header_split, vlan_filter, vlan_extend, jumbo_frame,
-                  crc_strip, scatter, timestamp, security
+                  crc_strip, scatter, timestamp, security, keep_crc
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1505,7 +1505,7 @@ Enable or disable a per queue Rx offloading only on a specific Rx queue::
                   vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
                   qinq_strip, outer_ipv4_cksum, macsec_strip,
                   header_split, vlan_filter, vlan_extend, jumbo_frame,
-                  crc_strip, scatter, timestamp, security
+                  crc_strip, scatter, timestamp, security, keep_crc
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1521,7 +1521,7 @@ Enable or disable a per port Tx offloading on all Tx queues of a port::
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
-                  mt_lockfree, multi_segs, fast_free, security
+                  mt_lockfree, multi_segs, mbuf_fast_free, security
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1537,7 +1537,7 @@ Enable or disable a per queue Tx offloading only on a specific Tx queue::
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
-                  mt_lockfree, multi_segs, fast_free, security
+                  mt_lockfree, multi_segs, mbuf_fast_free, security
 
 This command should be run when the port is stopped, or else it will fail.
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#5 lore raw
Quoted 12 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Dai
Sent: Thursday, August 2, 2018 2:32 AM
To: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Quoted 6 lines
Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")

Should have been [PATCH v2] otherwise fine.

author
#6 lore raw

Thanks, Iremonger.
I will reply this patch with a v3 patch.

Quoted 34 lines

-----Original Message-----
From: Iremonger, Bernard
Sent: Thursday, August 2, 2018 5:12 PM
To: Dai, Wei <[email protected]>; Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Quoted 13 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Dai
Sent: Thursday, August 2, 2018 2:32 AM
To: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some offload

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Quoted 7 lines
Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload

API")
Cc: [email protected]

Should have been [PATCH v2] otherwise fine.

author
#7 lore raw

PATCH v3 1/1 app/testpmd: fix commands to config some offload

In reply to Wei Dai

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")
---
 app/test-pmd/cmdline.c                      | 16 ++++++++--------
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
app/test-pmd/cmdline.c +8 -8
index 54ba2f5..589121d 100644
@@ -17005,7 +17005,7 @@ struct cmd_config_per_port_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_rx_offload_result,
@@ -17084,7 +17084,7 @@ struct cmd_config_per_port_rx_offload_result {
 	.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_rx_offload_result_port,
@@ -17134,7 +17134,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
 			   "qinq_strip#outer_ipv4_cksum#macsec_strip#"
 			   "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-			   "crc_strip#scatter#timestamp#security");
+			   "crc_strip#scatter#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_rx_offload_result,
@@ -17186,7 +17186,7 @@ struct cmd_config_per_queue_rx_offload_result {
 		    "vlan_strip|ipv4_cksum|"
 		    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
 		    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-		    "jumbo_frame|crc_strip|scatter|timestamp|security "
+		    "jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_rx_offload_result_port,
@@ -17403,7 +17403,7 @@ struct cmd_config_per_port_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
@@ -17484,7 +17484,7 @@ struct cmd_config_per_port_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_port_tx_offload_result_port,
@@ -17535,7 +17535,7 @@ struct cmd_config_per_queue_tx_offload_result {
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
-			  "mt_lockfree#multi_segs#fast_free#security");
+			  "mt_lockfree#multi_segs#mbuf_fast_free#security");
 cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_on_off =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
@@ -17588,7 +17588,7 @@ struct cmd_config_per_queue_tx_offload_result {
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
-		    "mt_lockfree|multi_segs|fast_free|security "
+		    "mt_lockfree|multi_segs|mbuf_fast_free|security "
 		    "on|off",
 	.tokens = {
 		(void *)&cmd_config_per_queue_tx_offload_result_port,
doc/guides/testpmd_app_ug/testpmd_funcs.rst +4 -4
index c35077c..a705366 100644
@@ -1490,7 +1490,7 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
                   vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
                   qinq_strip, outer_ipv4_cksum, macsec_strip,
                   header_split, vlan_filter, vlan_extend, jumbo_frame,
-                  crc_strip, scatter, timestamp, security
+                  crc_strip, scatter, timestamp, security, keep_crc
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1505,7 +1505,7 @@ Enable or disable a per queue Rx offloading only on a specific Rx queue::
                   vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
                   qinq_strip, outer_ipv4_cksum, macsec_strip,
                   header_split, vlan_filter, vlan_extend, jumbo_frame,
-                  crc_strip, scatter, timestamp, security
+                  crc_strip, scatter, timestamp, security, keep_crc
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1521,7 +1521,7 @@ Enable or disable a per port Tx offloading on all Tx queues of a port::
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
-                  mt_lockfree, multi_segs, fast_free, security
+                  mt_lockfree, multi_segs, mbuf_fast_free, security
 
 This command should be run when the port is stopped, or else it will fail.
 
@@ -1537,7 +1537,7 @@ Enable or disable a per queue Tx offloading only on a specific Tx queue::
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
-                  mt_lockfree, multi_segs, fast_free, security
+                  mt_lockfree, multi_segs, mbuf_fast_free, security
 
 This command should be run when the port is stopped, or else it will fail.
 
Signature · 1 line
1.8.3.1
#8 lore raw

03/08/2018 14:55, Wei Dai:

Quoted 11 lines

Without this patch, testpmd command to config Rx offload keep_crc would fail and report "Bad argument".
This patch aslo fix the command to config the Tx offload mbuf_fast_free.

Fixes 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")

Applied, thanks