test-pmd: removed references to crc_strip
Quoted 91 lines · Andrius Sirvys
crc_stripwas removed fromlib/librte_ethdev/rte_ethdev.cas the NICs carry out this operation themselves. However once removed, the references to it we're forgotten to be taken out in test-pmd.Fixes 323e7b667f18 ("ethdev: make default behavior CRC strip on Rx")Signed-off-by Andrius Sirvys <[email protected]>--- app/test-pmd/cmdline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)app/test-pmd/cmdline.c +0
-0@@ -878,7 +878,7 @@ static void cmd_help_long_parsed(void *parsed_result,"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|"app/test-pmd/cmdline.c +1
-1-"vlan_filter|vlan_extend|jumbo_frame|crc_strip|" +"vlan_filter|vlan_extend|jumbo_frame|" "scatter|timestamp|security|keep_crc on|off\n" " Enable or disable a per port Rx offloading" " on all Rx queues of a port\n\n" @@ -886,7 +886,7 @@ static void cmd_help_long_parsed(void *parsed_result, "port (port_id) rxq (queue_id) rx_offloadvlan_strip|"
"ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
"outer_ipv4_cksum|macsec_strip|header_split|"app/test-pmd/cmdline.c +1
-1-"vlan_filter|vlan_extend|jumbo_frame|crc_strip|" +"vlan_filter|vlan_extend|jumbo_frame|" "scatter|timestamp|security|keep_crc on|off\n" " Enable or disable a per queue Rx offloading" " only on a specific Rx queue\n\n" @@ -17991,7 +17991,7 @@ cmdline_parse_token_string_t
cmd_config_per_port_rx_offload_result_offload=
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#keep_crc");
+ "scatter#timestamp#security#keep_crc");
cmdline_parse_token_string_tcmd_config_per_port_rx_offload_result_on_off
=
TOKEN_STRING_INITIALIZER
(structcmd_config_per_port_rx_offload_result,app/test-pmd/cmdline.c +0
-0@@ -18067,7 +18067,7 @@ cmdline_parse_inst_t cmd_config_per_port_rx_offload = { .help_str = "port config <port_id> rx_offloadvlan_strip|ipv4_cksum|"
"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
"macsec_strip|header_split|vlan_filter|vlan_extend|"app/test-pmd/cmdline.c +1
-1-"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc " +"jumbo_frame|scatter|timestamp|security|keep_crc " "on|off", .tokens = { (void *)&cmd_config_per_port_rx_offload_result_port,@@ -18117,7 +18117,7 @@ cmdline_parse_token_string_t
cmd_config_per_queue_rx_offload_result_offload=
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#keep_crc");
+ "scatter#timestamp#security#keep_crc");
cmdline_parse_token_string_tcmd_config_per_queue_rx_offload_result_on_off=
TOKEN_STRING_INITIALIZER
(structcmd_config_per_queue_rx_offload_result,app/test-pmd/cmdline.c +0
-0@@ -18169,7 +18169,7 @@ cmdline_parse_inst_t cmd_config_per_queue_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|"app/test-pmd/cmdline.c +1
-2-"jumbo_frame|crc_strip|scatter|timestamp|security|keep_crc " +"jumbo_frame|scatter|timestamp|security|keep_crc " "on|off", .tokens = { (void *)&cmd_config_per_queue_rx_offload_result_port, --
Quoted 2 lines
2.17.1
Rather than fix this list in all those places, is it possible to use rte_rx_offload_names[] in a little wrapper in testpmd? The same would have to be done with the tx flags after this.
Signature · 1 line
David Marchand
That sounds like a good idea. Do you have any examples by chance of something like this or any advice how to implement. The string needs to be generated beforehand so where would we be able to put the code in for that.
From: David Marchand [mailto:[email protected]]
Sent: Tuesday, June 18, 2019 12:09 PM
To: Sirvys, Andrius <[email protected]>
Cc: dpdk stable <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Jingjing <[email protected]>; Iremonger, Bernard <[email protected]>; Yigit, Ferruh <[email protected]>; dev <[email protected]>
Subject: Re: [dpdk-stable] [PATCH] test-pmd: removed references to crc_strip
On Tue, Jun 18, 2019 at 12:59 PM Andrius Sirvys <[email protected]<mailto:[email protected]>> wrote:crc_strip was removed from lib/librte_ethdev/rte_ethdev.c as the
NICs carry out this operation themselves. However once removed,
the references to it we're forgotten to be taken out in test-pmd.
--- app/test-pmd/cmdline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
app/test-pmd/cmdline.c +6 -6
@@ -878,7 +878,7 @@ static void cmd_help_long_parsed(void *parsed_result,"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|" +"vlan_filter|vlan_extend|jumbo_frame|" "scatter|timestamp|security|keep_crc on|off\n" " Enable or disable a per port Rx offloading" " on all Rx queues of a port\n\n"
@@ -886,7 +886,7 @@ static void cmd_help_long_parsed(void *parsed_result,"port (port_id) rxq (queue_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|" +"vlan_filter|vlan_extend|jumbo_frame|" "scatter|timestamp|security|keep_crc on|off\n" " Enable or disable a per queue Rx offloading" " only on a specific Rx queue\n\n"
@@ -17991,7 +17991,7 @@ cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_offload = 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#keep_crc"); + "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,
@@ -18067,7 +18067,7 @@ cmdline_parse_inst_t cmd_config_per_port_rx_offload = { .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|keep_crc " +"jumbo_frame|scatter|timestamp|security|keep_crc " "on|off", .tokens = { (void *)&cmd_config_per_port_rx_offload_result_port,
@@ -18117,7 +18117,7 @@ cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_offload = 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#keep_crc"); + "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,
@@ -18169,7 +18169,7 @@ cmdline_parse_inst_t cmd_config_per_queue_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|keep_crc " +"jumbo_frame|scatter|timestamp|security|keep_crc " "on|off", .tokens = { (void *)&cmd_config_per_queue_rx_offload_result_port,
--
2.17.1
Rather than fix this list in all those places, is it possible to use rte_rx_offload_names[] in a little wrapper in testpmd? The same would have to be done with the tx flags after this.
--
David Marchand
Quoted 6 lines · Andrius
That sounds like a good idea. Do you have any examples by chance of something like this or any advice how to implement.
The string needs to be generated beforehand so where would we be able to put the code in for that.
For the usage strings, you only need to call a wrapper that dynamically outputs the list separated by |.
For the cmd_config_per_port_rx_offload/cmd_config_per_port_rx_offload_result_offload tokens init, you have an example with cmd_set_fwd_retry_mode_init() which updates cmd_set_fwd_retry_mode/cmd_setfwd_retry_mode tokens.
Signature · 1 line
David Marchand
Quoted 11 lines · David Marchand
Quoted 6 lines · Andrius
That sounds like a good idea. Do you have any examples by chance of something like this or any advice how to implement.
The string needs to be generated beforehand so where would we be able to put the code in for that.
Quoted 7 lines
For the usage strings, you only need to call a wrapper that dynamically outputs the list separated by |.
For the cmd_config_per_port_rx_offload/cmd_config_per_port_rx_offload_result_offload tokens init, you have an example withcmd_set_fwd_retry_mode_init()which updates cmd_set_fwd_retry_mode/cmd_setfwd_retry_mode tokens.
See: https://git.dpdk.org/dpdk/commit/?id=769ce6b17835
Signature · 1 line
David Marchand