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 D4B8CA05D3 for ; Tue, 23 Apr 2019 15:53:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E82331B277; Tue, 23 Apr 2019 15:53:09 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4683F4D27 for ; Tue, 23 Apr 2019 15:53:08 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 06:53:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,386,1549958400"; d="scan'208";a="153193790" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 23 Apr 2019 06:53:05 -0700 Received: from wgcvswdev001.ir.intel.com (wgcvswdev001.ir.intel.com [10.102.246.100]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x3NDr5a3024692; Tue, 23 Apr 2019 14:53:05 +0100 Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id x3NDqLus014717; Tue, 23 Apr 2019 14:52:21 +0100 Received: (from agalyabx@localhost) by wgcvswdev001.ir.intel.com with œ id x3NDqLOj014713; Tue, 23 Apr 2019 14:52:21 +0100 From: Agalya Babu RadhaKrishnan To: dev@dpdk.org Cc: reshma.pattan@intel.com, bruce.richardson@intel.com, ramirose@gmail.com, jingjing.wu@intel.com, Agalya Babu RadhaKrishnan Date: Tue, 23 Apr 2019 14:51:56 +0100 Message-Id: <1556027516-14297-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1551785289-4543-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> References: <1551785289-4543-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix help info for interactive commands X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190423135156.Iyxm18JstV4Y8WgRKFxHaSYyeeFhI-Kv0UzDMsivi4o@z> Added some missing help info for interactive mode commands Fixes: 6673fe0ce2 ("app/testpmd: add TM commands to mark packets") Fixes: c73a907187 ("app/testpmd: add commands to test new offload API") Fixes: e977e4199a ("app/testpmd: add commands to load/unload BPF filters") Fixes: c18feafa19 ("app/testpmd: support metadata as flow rule item") Signed-off-by: Agalya Babu RadhaKrishnan Reviewed-by: Rami Rosen --- v2: added TM to separate group and addressed comments. --- app/test-pmd/cmdline.c | 262 ++++++++++++++++++++++++++++------------- 1 file changed, 178 insertions(+), 84 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5a10c5f38..147a617d5 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -93,14 +93,15 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result, cl, "\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" ); } @@ -209,26 +210,32 @@ 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 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" "show fwd stats all\n" " Display statistics for all fwd engines.\n\n" "clear fwd stats all\n" " Clear statistics for all fwd engines.\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 (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" ); } @@ -646,11 +653,6 @@ static void cmd_help_long_parsed(void *parsed_result, "E-tag set filter del e-tag-id (value) port (port_id)\n" " 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" @@ -731,62 +733,6 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) queue-region\n" " 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" " (ip-dst) eth-src (eth-src) eth-dst (eth-dst)\n" @@ -928,6 +874,52 @@ 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" ); } @@ -1147,6 +1139,107 @@ static void cmd_help_long_parsed(void *parsed_result, " flow rules\n\n" ); } + + 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" + ); + } + } cmdline_parse_token_string_t cmd_help_long_help = @@ -1155,12 +1248,13 @@ cmdline_parse_token_string_t cmd_help_long_help = 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 = { (void *)&cmd_help_long_help, -- 2.17.2