From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 394C9A0096 for ; Wed, 8 May 2019 18:03:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30C634C94; Wed, 8 May 2019 18:03:04 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9C713DE3 for ; Wed, 8 May 2019 18:03:02 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05A1530198AF; Wed, 8 May 2019 16:03:02 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-210.ams2.redhat.com [10.36.117.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id B993160C82; Wed, 8 May 2019 16:03:00 +0000 (UTC) From: Kevin Traynor To: Agalya Babu RadhaKrishnan Cc: Rami Rosen , Ferruh Yigit , dpdk stable Date: Wed, 8 May 2019 17:02:14 +0100 Message-Id: <20190508160233.2648-17-ktraynor@redhat.com> In-Reply-To: <20190508160233.2648-1-ktraynor@redhat.com> References: <20190508160233.2648-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 08 May 2019 16:03:02 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: fix help info for interactive commands' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/14/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/ad4834815bf92cc4314822bb47ed716b6fadc807 Thanks. Kevin Traynor --- >From ad4834815bf92cc4314822bb47ed716b6fadc807 Mon Sep 17 00:00:00 2001 From: Agalya Babu RadhaKrishnan Date: Tue, 23 Apr 2019 14:51:56 +0100 Subject: [PATCH] app/testpmd: fix help info for interactive commands [ upstream commit 920fa9a2a1c965347bbb454ef92fb870dd25a4f7 ] Added some missing help info for interactive mode commands Fixes: 6673fe0ce213 ("app/testpmd: add TM commands to mark packets") Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API") Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters") Fixes: c18feafa193c ("app/testpmd: support metadata as flow rule item") Signed-off-by: Agalya Babu RadhaKrishnan Reviewed-by: Rami Rosen Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 259 ++++++++++++++++++++++++++++------------- 1 file changed, 179 insertions(+), 80 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 7ceb76b53..77641ee23 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -95,12 +95,13 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result, "\n" "Help is available for the following sections:\n\n" - " help control : Start and stop forwarding.\n" - " help display : Displaying port, stats and config " + " help control : Start and stop forwarding.\n" + " help display : Displaying port, stats and config " "information.\n" - " help config : Configuration information.\n" - " help ports : Configuring ports.\n" - " help registers : Reading and setting port registers.\n" - " help filters : Filters configuration help.\n" - " help all : All of the above sections.\n\n" + " help config : Configuration information.\n" + " help ports : Configuring ports.\n" + " help registers : Reading and setting port registers.\n" + " help filters : Filters configuration help.\n" + " help traffic_management : Traffic Management commmands.\n" + " help all : All of the above sections.\n\n" ); @@ -211,19 +212,30 @@ static void cmd_help_long_parsed(void *parsed_result, "show port meter stats (port_id) (meter_id) (clear)\n" " Get meter stats on a port\n\n" - "show port tm cap (port_id)\n" - " Display the port TM capability.\n\n" - "show port tm level cap (port_id) (level_id)\n" - " Display the port TM hierarchical level capability.\n\n" + "show fwd stats all\n" + " Display statistics for all fwd engines.\n\n" - "show port tm node cap (port_id) (node_id)\n" - " Display the port TM node capability.\n\n" + "clear fwd stats all\n" + " Clear statistics for all fwd engines.\n\n" - "show port tm node type (port_id) (node_id)\n" - " Display the port TM node type.\n\n" + "show port (port_id) rx_offload capabilities\n" + " List all per queue and per port Rx offloading" + " capabilities of a port\n\n" - "show port tm node stats (port_id) (node_id) (clear)\n" - " Display the port TM node stats.\n\n" + "show port (port_id) rx_offload configuration\n" + " List port level and all queue level" + " Rx offloading configuration\n\n" + "show port (port_id) tx_offload capabilities\n" + " List all per queue and per port" + " Tx offloading capabilities of a port\n\n" + + "show port (port_id) tx_offload configuration\n" + " List port level and all queue level" + " Tx offloading configuration\n\n" + + "show port (port_id) tx_metadata\n" + " Show Tx metadata value set" + " for a specific port\n\n" ); } @@ -643,9 +655,4 @@ static void cmd_help_long_parsed(void *parsed_result, " Delete an E-tag forwarding filter on a port\n\n" -#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED - "set port tm hierarchy default (port_id)\n" - " Set default traffic Management hierarchy on a port\n\n" - -#endif "ddp add (port_id) (profile_path[,backup_profile_path])\n" " Load a profile package on a port\n\n" @@ -728,60 +735,4 @@ static void cmd_help_long_parsed(void *parsed_result, " show all queue region related configuration info\n\n" - "add port tm node shaper profile (port_id) (shaper_profile_id)" - " (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)" - " (packet_length_adjust)\n" - " Add port tm node private shaper profile.\n\n" - - "del port tm node shaper profile (port_id) (shaper_profile_id)\n" - " Delete port tm node private shaper profile.\n\n" - - "add port tm node shared shaper (port_id) (shared_shaper_id)" - " (shaper_profile_id)\n" - " Add/update port tm node shared shaper.\n\n" - - "del port tm node shared shaper (port_id) (shared_shaper_id)\n" - " Delete port tm node shared shaper.\n\n" - - "set port tm node shaper profile (port_id) (node_id)" - " (shaper_profile_id)\n" - " Set port tm node shaper profile.\n\n" - - "add port tm node wred profile (port_id) (wred_profile_id)" - " (color_g) (min_th_g) (max_th_g) (maxp_inv_g) (wq_log2_g)" - " (color_y) (min_th_y) (max_th_y) (maxp_inv_y) (wq_log2_y)" - " (color_r) (min_th_r) (max_th_r) (maxp_inv_r) (wq_log2_r)\n" - " Add port tm node wred profile.\n\n" - - "del port tm node wred profile (port_id) (wred_profile_id)\n" - " Delete port tm node wred profile.\n\n" - - "add port tm nonleaf node (port_id) (node_id) (parent_node_id)" - " (priority) (weight) (level_id) (shaper_profile_id)" - " (n_sp_priorities) (stats_mask) (n_shared_shapers)" - " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" - " Add port tm nonleaf node.\n\n" - - "add port tm leaf node (port_id) (node_id) (parent_node_id)" - " (priority) (weight) (level_id) (shaper_profile_id)" - " (cman_mode) (wred_profile_id) (stats_mask) (n_shared_shapers)" - " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" - " Add port tm leaf node.\n\n" - - "del port tm node (port_id) (node_id)\n" - " Delete port tm node.\n\n" - - "set port tm node parent (port_id) (node_id) (parent_node_id)" - " (priority) (weight)\n" - " Set port tm node parent.\n\n" - - "suspend port tm node (port_id) (node_id)" - " Suspend tm node.\n\n" - - "resume port tm node (port_id) (node_id)" - " Resume tm node.\n\n" - - "port tm hierarchy commit (port_id) (clean_on_fail)\n" - " Commit tm hierarchy.\n\n" - "vxlan ip-version (ipv4|ipv6) vni (vni) udp-src" " (udp-src) udp-dst (udp-dst) ip-src (ip-src) ip-dst" @@ -919,4 +870,50 @@ static void cmd_help_long_parsed(void *parsed_result, "port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port)\n\n" " Add/remove UDP tunnel port for tunneling offload\n\n" + + "port config 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 on|off\n" + " Enable or disable a per port Rx offloading" + " on all Rx queues of a port\n\n" + + "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|" + "scatter|timestamp|security|keep_crc on|off\n" + " Enable or disable a per queue Rx offloading" + " only on a specific Rx queue\n\n" + + "port config (port_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|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|mbuf_fast_free|" + "security|match_metadata on|off\n" + " Enable or disable a per port Tx offloading" + " on all Tx queues of a port\n\n" + + "port (port_id) txq (queue_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|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|mbuf_fast_free|security" + " on|off\n" + " Enable or disable a per queue Tx offloading" + " only on a specific Tx queue\n\n" + + "bpf-load rx|tx (port) (queue) (J|M|B) (file_name)\n" + " Load an eBPF program as a callback" + " for particular RX/TX queue\n\n" + + "bpf-unload rx|tx (port) (queue)\n" + " Unload previously loaded eBPF program" + " for particular RX/TX queue\n\n" + + "port config (port_id) tx_metadata (value)\n" + " Set Tx metadata value per port. Testpmd will add this value" + " to any Tx packet sent from this port\n\n" ); } @@ -1138,4 +1135,105 @@ static void cmd_help_long_parsed(void *parsed_result, ); } + + if (show_all || !strcmp(res->section, "traffic_management")) { + cmdline_printf( + cl, + "\n" + "Traffic Management:\n" + "--------------\n" + "show port tm cap (port_id)\n" + " Display the port TM capability.\n\n" + + "show port tm level cap (port_id) (level_id)\n" + " Display the port TM hierarchical level capability.\n\n" + + "show port tm node cap (port_id) (node_id)\n" + " Display the port TM node capability.\n\n" + + "show port tm node type (port_id) (node_id)\n" + " Display the port TM node type.\n\n" + + "show port tm node stats (port_id) (node_id) (clear)\n" + " Display the port TM node stats.\n\n" + +#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED + "set port tm hierarchy default (port_id)\n" + " Set default traffic Management hierarchy on a port\n\n" +#endif + + "add port tm node shaper profile (port_id) (shaper_profile_id)" + " (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)" + " (packet_length_adjust)\n" + " Add port tm node private shaper profile.\n\n" + + "del port tm node shaper profile (port_id) (shaper_profile_id)\n" + " Delete port tm node private shaper profile.\n\n" + + "add port tm node shared shaper (port_id) (shared_shaper_id)" + " (shaper_profile_id)\n" + " Add/update port tm node shared shaper.\n\n" + + "del port tm node shared shaper (port_id) (shared_shaper_id)\n" + " Delete port tm node shared shaper.\n\n" + + "set port tm node shaper profile (port_id) (node_id)" + " (shaper_profile_id)\n" + " Set port tm node shaper profile.\n\n" + + "add port tm node wred profile (port_id) (wred_profile_id)" + " (color_g) (min_th_g) (max_th_g) (maxp_inv_g) (wq_log2_g)" + " (color_y) (min_th_y) (max_th_y) (maxp_inv_y) (wq_log2_y)" + " (color_r) (min_th_r) (max_th_r) (maxp_inv_r) (wq_log2_r)\n" + " Add port tm node wred profile.\n\n" + + "del port tm node wred profile (port_id) (wred_profile_id)\n" + " Delete port tm node wred profile.\n\n" + + "add port tm nonleaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (n_sp_priorities) (stats_mask) (n_shared_shapers)" + " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" + " Add port tm nonleaf node.\n\n" + + "add port tm leaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (cman_mode) (wred_profile_id) (stats_mask) (n_shared_shapers)" + " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" + " Add port tm leaf node.\n\n" + + "del port tm node (port_id) (node_id)\n" + " Delete port tm node.\n\n" + + "set port tm node parent (port_id) (node_id) (parent_node_id)" + " (priority) (weight)\n" + " Set port tm node parent.\n\n" + + "suspend port tm node (port_id) (node_id)" + " Suspend tm node.\n\n" + + "resume port tm node (port_id) (node_id)" + " Resume tm node.\n\n" + + "port tm hierarchy commit (port_id) (clean_on_fail)\n" + " Commit tm hierarchy.\n\n" + + "set port tm mark ip_ecn (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " for IP ECN (Explicit Congestion Notification)" + " packets on a given port\n\n" + + "set port tm mark ip_dscp (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " on the port for IP dscp packets\n\n" + + "set port tm mark vlan_dei (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " on the port for VLAN packets with DEI enabled\n\n" + ); + } + } @@ -1146,10 +1244,11 @@ cmdline_parse_token_string_t cmd_help_long_section = TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section, "all#control#display#config#" - "ports#registers#filters"); + "ports#registers#filters#traffic_management"); cmdline_parse_inst_t cmd_help_long = { .f = cmd_help_long_parsed, .data = NULL, - .help_str = "help all|control|display|config|ports|register|filters: " + .help_str = "help all|control|display|config|ports|register|" + "filters|traffic_management: " "Show help", .tokens = { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-05-08 16:33:58.329130645 +0100 +++ 0017-app-testpmd-fix-help-info-for-interactive-commands.patch 2019-05-08 16:33:57.391578827 +0100 @@ -1 +1 @@ -From 920fa9a2a1c965347bbb454ef92fb870dd25a4f7 Mon Sep 17 00:00:00 2001 +From ad4834815bf92cc4314822bb47ed716b6fadc807 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 920fa9a2a1c965347bbb454ef92fb870dd25a4f7 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18,2 +19,2 @@ - app/test-pmd/cmdline.c | 262 ++++++++++++++++++++++++++++------------- - 1 file changed, 178 insertions(+), 84 deletions(-) + app/test-pmd/cmdline.c | 259 ++++++++++++++++++++++++++++------------- + 1 file changed, 179 insertions(+), 80 deletions(-) @@ -22 +23 @@ -index 5a10c5f38..147a617d5 100644 +index 7ceb76b53..77641ee23 100644 @@ -25 +26 @@ -@@ -94,12 +94,13 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result, +@@ -95,12 +95,13 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result, @@ -46 +47 @@ -@@ -210,18 +211,4 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -211,19 +212,30 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -51 +52 @@ -- + @@ -54 +55,3 @@ -- ++ "show fwd stats all\n" ++ " Display statistics for all fwd engines.\n\n" + @@ -57 +60,3 @@ -- ++ "clear fwd stats all\n" ++ " Clear statistics for all fwd engines.\n\n" + @@ -60,9 +64,0 @@ -- -- "show port tm node stats (port_id) (node_id) (clear)\n" -- " Display the port TM node stats.\n\n" - - "show fwd stats all\n" -@@ -230,4 +217,24 @@ static void cmd_help_long_parsed(void *parsed_result, - "clear fwd stats all\n" - " Clear statistics for all fwd engines.\n\n" -+ @@ -72 +68,3 @@ -+ + +- "show port tm node stats (port_id) (node_id) (clear)\n" +- " Display the port TM node stats.\n\n" @@ -76 +74 @@ -+ + @@ -90 +88 @@ -@@ -647,9 +654,4 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -643,9 +655,4 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -100 +98 @@ -@@ -732,60 +734,4 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -728,60 +735,4 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -161 +159 @@ -@@ -929,4 +875,50 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -919,4 +870,50 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -212 +210 @@ -@@ -1148,4 +1140,105 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -1138,4 +1135,105 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -318 +316 @@ -@@ -1156,10 +1249,11 @@ cmdline_parse_token_string_t cmd_help_long_section = +@@ -1146,10 +1244,11 @@ cmdline_parse_token_string_t cmd_help_long_section =