pdump: fix error code check when creating/canceling pthread
[dpdk.git] / app / test-pmd / cmdline.c
index bb19d72..f71d963 100644 (file)
@@ -99,6 +99,8 @@
 #include <rte_pmd_bnxt.h>
 #endif
 #include "testpmd.h"
+#include "cmdline_mtr.h"
+#include "cmdline_tm.h"
 
 static struct cmdline *testpmd_cl;
 
@@ -234,6 +236,23 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "show port (port_id) pctype mapping\n"
                        "    Get flow ptype to pctype mapping on a port\n\n"
 
+                       "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"
+
                );
        }
 
@@ -507,6 +526,10 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "    e.g., 'set stat_qmap rx 0 2 5' sets rx queue 2"
                        " on port 0 to mapping 5.\n\n"
 
+                       "set xstats-hide-zero on|off\n"
+                       "    Set the option to hide the zero values"
+                       " for xstats display.\n"
+
                        "set port (port_id) vf (vf_id) rx|tx on|off\n"
                        "    Enable/Disable a VF receive/tranmit from a port\n\n"
 
@@ -675,9 +698,85 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "set port (port_id) queue-region flush (on|off)\n"
                        "    flush all queue region related configuration\n\n"
 
+                       "add port meter profile srtcm_rfc2697 (port_id) (profile_id) (cir) (cbs) (ebs) (color_aware)\n"
+                       "    meter profile add - srtcm rfc 2697\n\n"
+
+                       "add port meter profile trtcm_rfc2698 (port_id) (profile_id) (cir) (pir) (cbs) (pbs)\n"
+                       "    meter profile add - trtcm rfc 2698\n\n"
+
+                       "add port meter profile trtcm_rfc4115 (port_id) (profile_id) (cir) (eir) (cbs) (ebs)\n"
+                       "    meter profile add - trtcm rfc 4115\n\n"
+
+                       "del port meter profile (port_id) (profile_id)\n"
+                       "    meter profile delete\n\n"
+
+                       "set port meter (port_id) (mtr_id) (profile_id) (g_action) (y_action) (r_action) (stats_mask) (shared)\n"
+                       "    meter create\n\n"
+
+                       "del port meter (port_id) (mtr_id)\n"
+                       "    meter delete\n\n"
+
+                       "set port meter profile (port_id) (mtr_id) (profile_id)\n"
+                       "    meter update meter profile\n\n"
+
+                       "set port meter policer action (port_id) (mtr_id) (color) (action)\n"
+                       "    meter update policer action\n\n"
+
+                       "set port meter stats mask (port_id) (mtr_id) (stats_mask)\n"
+                       "    meter update stats\n\n"
+
                        "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)"
+                       " (tb_rate) (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"
+
+                       "port tm hierarchy commit (port_id) (clean_on_fail)\n"
+                       "       Commit tm hierarchy.\n\n"
+
                        , list_pkt_forwarding_modes()
                );
        }
@@ -1750,7 +1849,7 @@ cmd_config_rss_parsed(void *parsed_result,
                        __attribute__((unused)) void *data)
 {
        struct cmd_config_rss *res = parsed_result;
-       struct rte_eth_rss_conf rss_conf;
+       struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
        int diag;
        uint8_t i;
 
@@ -1942,7 +2041,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
 /* *** configure port rxq/txq start/stop *** */
 struct cmd_config_rxtx_queue {
        cmdline_fixed_string_t port;
-       uint8_t portid;
+       portid_t portid;
        cmdline_fixed_string_t rxtxq;
        uint16_t qid;
        cmdline_fixed_string_t opname;
@@ -2010,7 +2109,7 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 cmdline_parse_token_string_t cmd_config_rxtx_queue_port =
        TOKEN_STRING_INITIALIZER(struct cmd_config_rxtx_queue, port, "port");
 cmdline_parse_token_num_t cmd_config_rxtx_queue_portid =
-       TOKEN_NUM_INITIALIZER(struct cmd_config_rxtx_queue, portid, UINT8);
+       TOKEN_NUM_INITIALIZER(struct cmd_config_rxtx_queue, portid, UINT16);
 cmdline_parse_token_string_t cmd_config_rxtx_queue_rxtxq =
        TOKEN_STRING_INITIALIZER(struct cmd_config_rxtx_queue, rxtxq, "rxq#txq");
 cmdline_parse_token_num_t cmd_config_rxtx_queue_qid =
@@ -5237,7 +5336,7 @@ struct cmd_set_bond_mac_addr_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t bonding;
        cmdline_fixed_string_t mac_addr;
-       uint8_t port_num;
+       uint16_t port_num;
        struct ether_addr address;
 };
 
@@ -5267,7 +5366,8 @@ cmdline_parse_token_string_t cmd_set_bond_mac_addr_mac =
                TOKEN_STRING_INITIALIZER(struct cmd_set_bond_mac_addr_result, mac_addr,
                                "mac_addr");
 cmdline_parse_token_num_t cmd_set_bond_mac_addr_portnum =
-               TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mac_addr_result, port_num, UINT8);
+               TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mac_addr_result,
+                               port_num, UINT16);
 cmdline_parse_token_etheraddr_t cmd_set_bond_mac_addr_addr =
                TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_bond_mac_addr_result, address);
 
@@ -5291,7 +5391,7 @@ struct cmd_set_bond_mon_period_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t bonding;
        cmdline_fixed_string_t mon_period;
-       uint8_t port_num;
+       uint16_t port_num;
        uint32_t period_ms;
 };
 
@@ -5325,7 +5425,7 @@ cmdline_parse_token_string_t cmd_set_bond_mon_period_mon_period =
                                mon_period,     "mon_period");
 cmdline_parse_token_num_t cmd_set_bond_mon_period_portnum =
                TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mon_period_result,
-                               port_num, UINT8);
+                               port_num, UINT16);
 cmdline_parse_token_num_t cmd_set_bond_mon_period_period_ms =
                TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mon_period_result,
                                period_ms, UINT32);
@@ -5350,7 +5450,7 @@ struct cmd_set_bonding_agg_mode_policy_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t bonding;
        cmdline_fixed_string_t agg_mode;
-       uint8_t port_num;
+       uint16_t port_num;
        cmdline_fixed_string_t policy;
 };
 
@@ -5393,7 +5493,7 @@ cmdline_parse_token_string_t cmd_set_bonding_agg_mode_agg_mode =
 
 cmdline_parse_token_num_t cmd_set_bonding_agg_mode_portnum =
        TOKEN_NUM_INITIALIZER(struct cmd_set_bonding_agg_mode_policy_result,
-                               port_num, UINT8);
+                               port_num, UINT16);
 
 cmdline_parse_token_string_t cmd_set_bonding_agg_mode_policy_string =
        TOKEN_STRING_INITIALIZER(
@@ -5607,7 +5707,7 @@ struct cmd_set_promisc_mode_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t promisc;
        cmdline_fixed_string_t port_all; /* valid if "allports" argument == 1 */
-       uint8_t port_num;                /* valid if "allports" argument == 0 */
+       uint16_t port_num;               /* valid if "allports" argument == 0 */
        cmdline_fixed_string_t mode;
 };
 
@@ -5687,7 +5787,7 @@ struct cmd_set_allmulti_mode_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t allmulti;
        cmdline_fixed_string_t port_all; /* valid if "allports" argument == 1 */
-       uint8_t port_num;                /* valid if "allports" argument == 0 */
+       uint16_t port_num;               /* valid if "allports" argument == 0 */
        cmdline_fixed_string_t mode;
 };
 
@@ -5731,7 +5831,7 @@ cmdline_parse_token_string_t cmd_setallmulti_portall =
                                 "all");
 cmdline_parse_token_num_t cmd_setallmulti_portnum =
        TOKEN_NUM_INITIALIZER(struct cmd_set_allmulti_mode_result, port_num,
-                             UINT8);
+                             UINT16);
 cmdline_parse_token_string_t cmd_setallmulti_mode =
        TOKEN_STRING_INITIALIZER(struct cmd_set_allmulti_mode_result, mode,
                                 "on#off");
@@ -6497,7 +6597,7 @@ struct cmd_showport_result {
        cmdline_fixed_string_t show;
        cmdline_fixed_string_t port;
        cmdline_fixed_string_t what;
-       uint8_t portnum;
+       uint16_t portnum;
 };
 
 static void cmd_showport_parsed(void *parsed_result,
@@ -6535,7 +6635,7 @@ cmdline_parse_token_string_t cmd_showport_what =
        TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
                                 "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
-       TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
+       TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT16);
 
 cmdline_parse_inst_t cmd_showport = {
        .f = cmd_showport_parsed,
@@ -6557,7 +6657,7 @@ struct cmd_showqueue_result {
        cmdline_fixed_string_t show;
        cmdline_fixed_string_t type;
        cmdline_fixed_string_t what;
-       uint8_t portnum;
+       uint16_t portnum;
        uint16_t queuenum;
 };
 
@@ -6581,7 +6681,7 @@ cmdline_parse_token_string_t cmd_showqueue_type =
 cmdline_parse_token_string_t cmd_showqueue_what =
        TOKEN_STRING_INITIALIZER(struct cmd_showqueue_result, what, "info");
 cmdline_parse_token_num_t cmd_showqueue_portnum =
-       TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, portnum, UINT8);
+       TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, portnum, UINT16);
 cmdline_parse_token_num_t cmd_showqueue_queuenum =
        TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, queuenum, UINT16);
 
@@ -6969,7 +7069,7 @@ cmdline_parse_inst_t cmd_quit = {
 struct cmd_mac_addr_result {
        cmdline_fixed_string_t mac_addr_cmd;
        cmdline_fixed_string_t what;
-       uint8_t port_num;
+       uint16_t port_num;
        struct ether_addr address;
 };
 
@@ -7001,7 +7101,8 @@ cmdline_parse_token_string_t cmd_mac_addr_what =
        TOKEN_STRING_INITIALIZER(struct cmd_mac_addr_result, what,
                                "add#remove#set");
 cmdline_parse_token_num_t cmd_mac_addr_portnum =
-               TOKEN_NUM_INITIALIZER(struct cmd_mac_addr_result, port_num, UINT8);
+               TOKEN_NUM_INITIALIZER(struct cmd_mac_addr_result, port_num,
+                                       UINT16);
 cmdline_parse_token_etheraddr_t cmd_mac_addr_addr =
                TOKEN_ETHERADDR_INITIALIZER(struct cmd_mac_addr_result, address);
 
@@ -7076,6 +7177,48 @@ cmdline_parse_inst_t cmd_set_qmap = {
        },
 };
 
+/* *** SET OPTION TO HIDE ZERO VALUES FOR XSTATS  DISPLAY *** */
+struct cmd_set_xstats_hide_zero_result {
+       cmdline_fixed_string_t keyword;
+       cmdline_fixed_string_t name;
+       cmdline_fixed_string_t on_off;
+};
+
+static void
+cmd_set_xstats_hide_zero_parsed(void *parsed_result,
+                       __attribute__((unused)) struct cmdline *cl,
+                       __attribute__((unused)) void *data)
+{
+       struct cmd_set_xstats_hide_zero_result *res;
+       uint16_t on_off = 0;
+
+       res = parsed_result;
+       on_off = !strcmp(res->on_off, "on") ? 1 : 0;
+       set_xstats_hide_zero(on_off);
+}
+
+cmdline_parse_token_string_t cmd_set_xstats_hide_zero_keyword =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_xstats_hide_zero_result,
+                                keyword, "set");
+cmdline_parse_token_string_t cmd_set_xstats_hide_zero_name =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_xstats_hide_zero_result,
+                                name, "xstats-hide-zero");
+cmdline_parse_token_string_t cmd_set_xstats_hide_zero_on_off =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_xstats_hide_zero_result,
+                                on_off, "on#off");
+
+cmdline_parse_inst_t cmd_set_xstats_hide_zero = {
+       .f = cmd_set_xstats_hide_zero_parsed,
+       .data = NULL,
+       .help_str = "set xstats-hide-zero on|off",
+       .tokens = {
+               (void *)&cmd_set_xstats_hide_zero_keyword,
+               (void *)&cmd_set_xstats_hide_zero_name,
+               (void *)&cmd_set_xstats_hide_zero_on_off,
+               NULL,
+       },
+};
+
 /* *** CONFIGURE UNICAST HASH TABLE *** */
 struct cmd_set_uc_hash_table {
        cmdline_fixed_string_t set;
@@ -7397,6 +7540,8 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
                        rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
        }
 
+       RTE_SET_USED(is_on);
+
 #ifdef RTE_LIBRTE_IXGBE_PMD
        if (ret == -ENOTSUP)
                ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
@@ -7460,7 +7605,7 @@ struct cmd_vf_mac_addr_result {
        cmdline_fixed_string_t mac_addr_cmd;
        cmdline_fixed_string_t what;
        cmdline_fixed_string_t port;
-       uint8_t port_num;
+       uint16_t port_num;
        cmdline_fixed_string_t vf;
        uint8_t vf_num;
        struct ether_addr address;
@@ -7503,7 +7648,7 @@ cmdline_parse_token_string_t cmd_vf_mac_addr_port =
                                port,"port");
 cmdline_parse_token_num_t cmd_vf_mac_addr_portnum =
        TOKEN_NUM_INITIALIZER(struct cmd_vf_mac_addr_result,
-                               port_num, UINT8);
+                               port_num, UINT16);
 cmdline_parse_token_string_t cmd_vf_mac_addr_vf =
        TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
                                vf,"vf");
@@ -7629,7 +7774,7 @@ cmdline_parse_inst_t cmd_vf_rxvlan_filter = {
 struct cmd_queue_rate_limit_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t port;
-       uint8_t port_num;
+       uint16_t port_num;
        cmdline_fixed_string_t queue;
        uint8_t queue_num;
        cmdline_fixed_string_t rate;
@@ -7661,7 +7806,7 @@ cmdline_parse_token_string_t cmd_queue_rate_limit_port =
                                port, "port");
 cmdline_parse_token_num_t cmd_queue_rate_limit_portnum =
        TOKEN_NUM_INITIALIZER(struct cmd_queue_rate_limit_result,
-                               port_num, UINT8);
+                               port_num, UINT16);
 cmdline_parse_token_string_t cmd_queue_rate_limit_queue =
        TOKEN_STRING_INITIALIZER(struct cmd_queue_rate_limit_result,
                                queue, "queue");
@@ -7696,7 +7841,7 @@ cmdline_parse_inst_t cmd_queue_rate_limit = {
 struct cmd_vf_rate_limit_result {
        cmdline_fixed_string_t set;
        cmdline_fixed_string_t port;
-       uint8_t port_num;
+       uint16_t port_num;
        cmdline_fixed_string_t vf;
        uint8_t vf_num;
        cmdline_fixed_string_t rate;
@@ -7731,7 +7876,7 @@ cmdline_parse_token_string_t cmd_vf_rate_limit_port =
                                port, "port");
 cmdline_parse_token_num_t cmd_vf_rate_limit_portnum =
        TOKEN_NUM_INITIALIZER(struct cmd_vf_rate_limit_result,
-                               port_num, UINT8);
+                               port_num, UINT16);
 cmdline_parse_token_string_t cmd_vf_rate_limit_vf =
        TOKEN_STRING_INITIALIZER(struct cmd_vf_rate_limit_result,
                                vf, "vf");
@@ -10066,7 +10211,7 @@ cmdline_parse_inst_t cmd_add_del_ip_flow_director = {
                "ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|"
                "l2_payload src <src_ip> dst <dst_ip> tos <tos_value> "
                "proto <proto_value> ttl <ttl_value> vlan <vlan_value> "
-               "flexbytes <flexbyte_vaues> drop|fw <pf_vf> queue <queue_id> "
+               "flexbytes <flexbyte_values> drop|fw <pf_vf> queue <queue_id> "
                "fd_id <fd_id_value>: "
                "Add or delete an ip flow director entry on NIC",
        .tokens = {
@@ -11285,7 +11430,7 @@ cmdline_parse_inst_t cmd_set_fdir_input_set = {
 struct cmd_mcast_addr_result {
        cmdline_fixed_string_t mcast_addr_cmd;
        cmdline_fixed_string_t what;
-       uint8_t port_num;
+       uint16_t port_num;
        struct ether_addr mc_addr;
 };
 
@@ -11315,7 +11460,7 @@ cmdline_parse_token_string_t cmd_mcast_addr_what =
        TOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result, what,
                                 "add#remove");
 cmdline_parse_token_num_t cmd_mcast_addr_portnum =
-       TOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num, UINT8);
+       TOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num, UINT16);
 cmdline_parse_token_etheraddr_t cmd_mcast_addr_addr =
        TOKEN_ETHERADDR_INITIALIZER(struct cmd_mac_addr_result, address);
 
@@ -14217,7 +14362,7 @@ cmd_ddp_info_parsed(
        uint32_t dev_num = 0;
        struct rte_pmd_i40e_ddp_device_id *devs;
        uint32_t proto_num = 0;
-       struct rte_pmd_i40e_proto_info *proto;
+       struct rte_pmd_i40e_proto_info *proto = NULL;
        uint32_t pctype_num = 0;
        struct rte_pmd_i40e_ptype_info *pctype;
        uint32_t ptype_num = 0;
@@ -14396,9 +14541,10 @@ no_print_pctypes:
        free(ptype);
        printf("\n");
 
-       free(proto);
        ret = 0;
 no_print_return:
+       if (proto)
+               free(proto);
 #endif
        if (ret == -ENOTSUP)
                printf("Function not supported in PMD driver\n");
@@ -15480,6 +15626,7 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_stop,
        (cmdline_parse_inst_t *)&cmd_mac_addr,
        (cmdline_parse_inst_t *)&cmd_set_qmap,
+       (cmdline_parse_inst_t *)&cmd_set_xstats_hide_zero,
        (cmdline_parse_inst_t *)&cmd_operate_port,
        (cmdline_parse_inst_t *)&cmd_operate_specific_port,
        (cmdline_parse_inst_t *)&cmd_operate_attach_port,
@@ -15538,6 +15685,15 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_set_hash_input_set,
        (cmdline_parse_inst_t *)&cmd_set_fdir_input_set,
        (cmdline_parse_inst_t *)&cmd_flow,
+       (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
+       (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
+       (cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
+       (cmdline_parse_inst_t *)&cmd_set_port_meter,
+       (cmdline_parse_inst_t *)&cmd_del_port_meter,
+       (cmdline_parse_inst_t *)&cmd_set_port_meter_profile,
+       (cmdline_parse_inst_t *)&cmd_set_port_meter_policer_action,
+       (cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,
+       (cmdline_parse_inst_t *)&cmd_show_port_meter_stats,
        (cmdline_parse_inst_t *)&cmd_mcast_addr,
        (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_eth_type_all,
        (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_eth_type_specific,
@@ -15596,6 +15752,23 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_user_priority_region,
        (cmdline_parse_inst_t *)&cmd_flush_queue_region,
        (cmdline_parse_inst_t *)&cmd_show_queue_region_info_all,
+       (cmdline_parse_inst_t *)&cmd_show_port_tm_cap,
+       (cmdline_parse_inst_t *)&cmd_show_port_tm_level_cap,
+       (cmdline_parse_inst_t *)&cmd_show_port_tm_node_cap,
+       (cmdline_parse_inst_t *)&cmd_show_port_tm_node_type,
+       (cmdline_parse_inst_t *)&cmd_show_port_tm_node_stats,
+       (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shaper_profile,
+       (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shaper_profile,
+       (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shared_shaper,
+       (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shared_shaper,
+       (cmdline_parse_inst_t *)&cmd_add_port_tm_node_wred_profile,
+       (cmdline_parse_inst_t *)&cmd_del_port_tm_node_wred_profile,
+       (cmdline_parse_inst_t *)&cmd_set_port_tm_node_shaper_profile,
+       (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node,
+       (cmdline_parse_inst_t *)&cmd_add_port_tm_leaf_node,
+       (cmdline_parse_inst_t *)&cmd_del_port_tm_node,
+       (cmdline_parse_inst_t *)&cmd_set_port_tm_node_parent,
+       (cmdline_parse_inst_t *)&cmd_port_tm_hierarchy_commit,
        NULL,
 };