app/testpmd: fix commands to config some offload

Message ID 1533173520-6623-1-git-send-email-wei.dai@intel.com (mailing list archive)
State Superseded, archived
Headers
Series app/testpmd: fix commands to config some offload |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wei Dai Aug. 2, 2018, 1:32 a.m. UTC
  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: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
---
 app/test-pmd/cmdline.c                      | 16 ++++++++--------
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
  

Comments

Iremonger, Bernard Aug. 2, 2018, 9:11 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai
> Sent: Thursday, August 2, 2018 2:32 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> 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: stable@dpdk.org
> 
> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Tested-by: Yuan Peng <yuan.peng@intel.com>

Should have been [PATCH v2] otherwise fine.

Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
  
Wei Dai Aug. 3, 2018, 12:53 p.m. UTC | #2
Thanks, Iremonger.
I will reply this patch with a v3 patch.

> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Thursday, August 2, 2018 5:12 PM
> To: Dai, Wei <wei.dai@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Lu,
> Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix commands to config some
> offload
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai
> > Sent: Thursday, August 2, 2018 2:32 AM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> > 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: stable@dpdk.org
> >
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> > Tested-by: Yuan Peng <yuan.peng@intel.com>
> 
> Should have been [PATCH v2] otherwise fine.
> 
> Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
>
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 54ba2f5..589121d 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index c35077c..a705366 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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.