app/testpmd: enable the heavyweight mode TCP/IPv4 GRO
[dpdk.git] / app / test-pmd / cmdline.c
index 89b06b8..516fc89 100644 (file)
@@ -36,7 +36,6 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdint.h>
-#include <stdarg.h>
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
@@ -76,6 +75,7 @@
 #include <rte_devargs.h>
 #include <rte_eth_ctrl.h>
 #include <rte_flow.h>
+#include <rte_gro.h>
 
 #include <cmdline_rdline.h>
 #include <cmdline_parse.h>
@@ -87,6 +87,7 @@
 #include <cmdline.h>
 #ifdef RTE_LIBRTE_PMD_BOND
 #include <rte_eth_bond.h>
+#include <rte_eth_bond_8023ad.h>
 #endif
 #ifdef RTE_LIBRTE_IXGBE_PMD
 #include <rte_pmd_ixgbe.h>
@@ -229,6 +230,10 @@ static void cmd_help_long_parsed(void *parsed_result,
 
                        "clear vf stats (port_id) (vf_id)\n"
                        "    Reset a VF's statistics.\n\n"
+
+                       "show port (port_id) pctype mapping\n"
+                       "    Get flow ptype to pctype mapping on a port\n\n"
+
                );
        }
 
@@ -422,6 +427,17 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "tso show (portid)"
                        "    Display the status of TCP Segmentation Offload.\n\n"
 
+                       "set port (port_id) gro on|off\n"
+                       "    Enable or disable Generic Receive Offload in"
+                       " csum forwarding engine.\n\n"
+
+                       "show port (port_id) gro\n"
+                       "    Display GRO configuration.\n\n"
+
+                       "set gro flush (cycles)\n"
+                       "    Set the cycle to flush GROed packets from"
+                       " reassembly tables.\n\n"
+
                        "set fwd (%s)\n"
                        "    Set packet forwarding mode.\n\n"
 
@@ -570,11 +586,18 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "set bonding mac_addr (port_id) (address)\n"
                        "       Set the MAC address of a bonded device.\n\n"
 
+                       "set bonding mode IEEE802.3AD aggregator policy (port_id) (agg_name)"
+                       "       Set Aggregation mode for IEEE802.3AD (mode 4)"
+
                        "set bonding xmit_balance_policy (port_id) (l2|l23|l34)\n"
                        "       Set the transmit balance policy for bonded device running in balance mode.\n\n"
 
                        "set bonding mon_period (port_id) (value)\n"
                        "       Set the bonding link status monitoring polling period in ms.\n\n"
+
+                       "set bonding lacp dedicated_queues <port_id> (enable|disable)\n"
+                       "       Enable/disable dedicated queues for LACP control traffic.\n\n"
+
 #endif
                        "set link-up port (port_id)\n"
                        "       Set link up for a port.\n\n"
@@ -606,6 +629,9 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "ddp add (port_id) (profile_path[,output_path])\n"
                        "    Load a profile package on a port\n\n"
 
+                       "ddp del (port_id) (profile_path)\n"
+                       "    Delete a profile package from a port\n\n"
+
                        "ptype mapping get (port_id) (valid_only)\n"
                        "    Get ptype mapping on a port\n\n"
 
@@ -662,7 +688,8 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
                        " for ports.\n\n"
 
-                       "port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)\n"
+                       "port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|"
+                       "geneve|nvgre|none|<flowtype_id>)\n"
                        "    Set the RSS mode.\n\n"
 
                        "port config port-id rss reta (hash,queue)[,(hash,queue)]\n"
@@ -697,6 +724,13 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "port config (port_id|all) l2-tunnel E-tag"
                        " (enable|disable)\n"
                        "    Enable/disable the E-tag support.\n\n"
+
+                       "port config (port_id) pctype mapping reset\n"
+                       "    Reset flow type to pctype mapping on a port\n\n"
+
+                       "port config (port_id) pctype mapping update"
+                       " (pctype_id_0[,pctype_id_1]*) (flow_type_id)\n"
+                       "    Update a flow type to pctype mapping item on a port\n\n"
                );
        }
 
@@ -859,8 +893,8 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "set_hash_input_set (port_id) (ipv4|ipv4-frag|"
                        "ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|"
                        "ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
-                       "l2_payload) (ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|"
-                       "dst-ipv6|ipv4-tos|ipv4-proto|ipv6-tc|"
+                       "l2_payload|<flowtype_id>) (ovlan|ivlan|src-ipv4|dst-ipv4|"
+                       "src-ipv6|dst-ipv6|ipv4-tos|ipv4-proto|ipv6-tc|"
                        "ipv6-next-header|udp-src-port|udp-dst-port|"
                        "tcp-src-port|tcp-dst-port|sctp-src-port|"
                        "sctp-dst-port|sctp-veri-tag|udp-key|gre-key|fld-1st|"
@@ -953,6 +987,8 @@ static void cmd_operate_port_parsed(void *parsed_result,
                stop_port(RTE_PORT_ALL);
        else if (!strcmp(res->name, "close"))
                close_port(RTE_PORT_ALL);
+       else if (!strcmp(res->name, "reset"))
+               reset_port(RTE_PORT_ALL);
        else
                printf("Unknown parameter\n");
 }
@@ -962,14 +998,14 @@ cmdline_parse_token_string_t cmd_operate_port_all_cmd =
                                                                "port");
 cmdline_parse_token_string_t cmd_operate_port_all_port =
        TOKEN_STRING_INITIALIZER(struct cmd_operate_port_result, name,
-                                               "start#stop#close");
+                                               "start#stop#close#reset");
 cmdline_parse_token_string_t cmd_operate_port_all_all =
        TOKEN_STRING_INITIALIZER(struct cmd_operate_port_result, value, "all");
 
 cmdline_parse_inst_t cmd_operate_port = {
        .f = cmd_operate_port_parsed,
        .data = NULL,
-       .help_str = "port start|stop|close all: Start/Stop/Close all ports",
+       .help_str = "port start|stop|close all: Start/Stop/Close/Reset all ports",
        .tokens = {
                (void *)&cmd_operate_port_all_cmd,
                (void *)&cmd_operate_port_all_port,
@@ -997,6 +1033,8 @@ static void cmd_operate_specific_port_parsed(void *parsed_result,
                stop_port(res->value);
        else if (!strcmp(res->name, "close"))
                close_port(res->value);
+       else if (!strcmp(res->name, "reset"))
+               reset_port(res->value);
        else
                printf("Unknown parameter\n");
 }
@@ -1006,7 +1044,7 @@ cmdline_parse_token_string_t cmd_operate_specific_port_cmd =
                                                        keyword, "port");
 cmdline_parse_token_string_t cmd_operate_specific_port_port =
        TOKEN_STRING_INITIALIZER(struct cmd_operate_specific_port_result,
-                                               name, "start#stop#close");
+                                               name, "start#stop#close#reset");
 cmdline_parse_token_num_t cmd_operate_specific_port_id =
        TOKEN_NUM_INITIALIZER(struct cmd_operate_specific_port_result,
                                                        value, UINT8);
@@ -1014,7 +1052,7 @@ cmdline_parse_token_num_t cmd_operate_specific_port_id =
 cmdline_parse_inst_t cmd_operate_specific_port = {
        .f = cmd_operate_specific_port_parsed,
        .data = NULL,
-       .help_str = "port start|stop|close <port_id>: Start/Stop/Close port_id",
+       .help_str = "port start|stop|close <port_id>: Start/Stop/Close/Reset port_id",
        .tokens = {
                (void *)&cmd_operate_specific_port_cmd,
                (void *)&cmd_operate_specific_port_port,
@@ -1697,6 +1735,9 @@ cmd_config_rss_parsed(void *parsed_result,
                rss_conf.rss_hf = ETH_RSS_NVGRE;
        else if (!strcmp(res->value, "none"))
                rss_conf.rss_hf = 0;
+       else if (isdigit(res->value[0]) && atoi(res->value) > 0 &&
+                                               atoi(res->value) < 64)
+               rss_conf.rss_hf = 1ULL << atoi(res->value);
        else {
                printf("Unknown parameter\n");
                return;
@@ -1720,14 +1761,13 @@ cmdline_parse_token_string_t cmd_config_rss_all =
 cmdline_parse_token_string_t cmd_config_rss_name =
        TOKEN_STRING_INITIALIZER(struct cmd_config_rss, name, "rss");
 cmdline_parse_token_string_t cmd_config_rss_value =
-       TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value,
-               "all#ip#tcp#udp#sctp#ether#port#vxlan#geneve#nvgre#none");
+       TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value, NULL);
 
 cmdline_parse_inst_t cmd_config_rss = {
        .f = cmd_config_rss_parsed,
        .data = NULL,
        .help_str = "port config all rss "
-               "all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none",
+               "all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none|<flowtype_id>",
        .tokens = {
                (void *)&cmd_config_rss_port,
                (void *)&cmd_config_rss_keyword,
@@ -3830,6 +3870,150 @@ cmdline_parse_inst_t cmd_tunnel_tso_show = {
        },
 };
 
+/* *** SET GRO FOR A PORT *** */
+struct cmd_gro_enable_result {
+       cmdline_fixed_string_t cmd_set;
+       cmdline_fixed_string_t cmd_port;
+       cmdline_fixed_string_t cmd_keyword;
+       cmdline_fixed_string_t cmd_onoff;
+       portid_t cmd_pid;
+};
+
+static void
+cmd_gro_enable_parsed(void *parsed_result,
+               __attribute__((unused)) struct cmdline *cl,
+               __attribute__((unused)) void *data)
+{
+       struct cmd_gro_enable_result *res;
+
+       res = parsed_result;
+       if (!strcmp(res->cmd_keyword, "gro"))
+               setup_gro(res->cmd_onoff, res->cmd_pid);
+}
+
+cmdline_parse_token_string_t cmd_gro_enable_set =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_enable_result,
+                       cmd_set, "set");
+cmdline_parse_token_string_t cmd_gro_enable_port =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_enable_result,
+                       cmd_keyword, "port");
+cmdline_parse_token_num_t cmd_gro_enable_pid =
+       TOKEN_NUM_INITIALIZER(struct cmd_gro_enable_result,
+                       cmd_pid, UINT16);
+cmdline_parse_token_string_t cmd_gro_enable_keyword =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_enable_result,
+                       cmd_keyword, "gro");
+cmdline_parse_token_string_t cmd_gro_enable_onoff =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_enable_result,
+                       cmd_onoff, "on#off");
+
+cmdline_parse_inst_t cmd_gro_enable = {
+       .f = cmd_gro_enable_parsed,
+       .data = NULL,
+       .help_str = "set port <port_id> gro on|off",
+       .tokens = {
+               (void *)&cmd_gro_enable_set,
+               (void *)&cmd_gro_enable_port,
+               (void *)&cmd_gro_enable_pid,
+               (void *)&cmd_gro_enable_keyword,
+               (void *)&cmd_gro_enable_onoff,
+               NULL,
+       },
+};
+
+/* *** DISPLAY GRO CONFIGURATION *** */
+struct cmd_gro_show_result {
+       cmdline_fixed_string_t cmd_show;
+       cmdline_fixed_string_t cmd_port;
+       cmdline_fixed_string_t cmd_keyword;
+       portid_t cmd_pid;
+};
+
+static void
+cmd_gro_show_parsed(void *parsed_result,
+               __attribute__((unused)) struct cmdline *cl,
+               __attribute__((unused)) void *data)
+{
+       struct cmd_gro_show_result *res;
+
+       res = parsed_result;
+       if (!strcmp(res->cmd_keyword, "gro"))
+               show_gro(res->cmd_pid);
+}
+
+cmdline_parse_token_string_t cmd_gro_show_show =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_show_result,
+                       cmd_show, "show");
+cmdline_parse_token_string_t cmd_gro_show_port =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_show_result,
+                       cmd_port, "port");
+cmdline_parse_token_num_t cmd_gro_show_pid =
+       TOKEN_NUM_INITIALIZER(struct cmd_gro_show_result,
+                       cmd_pid, UINT16);
+cmdline_parse_token_string_t cmd_gro_show_keyword =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_show_result,
+                       cmd_keyword, "gro");
+
+cmdline_parse_inst_t cmd_gro_show = {
+       .f = cmd_gro_show_parsed,
+       .data = NULL,
+       .help_str = "show port <port_id> gro",
+       .tokens = {
+               (void *)&cmd_gro_show_show,
+               (void *)&cmd_gro_show_port,
+               (void *)&cmd_gro_show_pid,
+               (void *)&cmd_gro_show_keyword,
+               NULL,
+       },
+};
+
+/* *** SET FLUSH CYCLES FOR GRO *** */
+struct cmd_gro_flush_result {
+       cmdline_fixed_string_t cmd_set;
+       cmdline_fixed_string_t cmd_keyword;
+       cmdline_fixed_string_t cmd_flush;
+       uint8_t cmd_cycles;
+};
+
+static void
+cmd_gro_flush_parsed(void *parsed_result,
+               __attribute__((unused)) struct cmdline *cl,
+               __attribute__((unused)) void *data)
+{
+       struct cmd_gro_flush_result *res;
+
+       res = parsed_result;
+       if ((!strcmp(res->cmd_keyword, "gro")) &&
+                       (!strcmp(res->cmd_flush, "flush")))
+               setup_gro_flush_cycles(res->cmd_cycles);
+}
+
+cmdline_parse_token_string_t cmd_gro_flush_set =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_flush_result,
+                       cmd_set, "set");
+cmdline_parse_token_string_t cmd_gro_flush_keyword =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_flush_result,
+                       cmd_keyword, "gro");
+cmdline_parse_token_string_t cmd_gro_flush_flush =
+       TOKEN_STRING_INITIALIZER(struct cmd_gro_flush_result,
+                       cmd_flush, "flush");
+cmdline_parse_token_num_t cmd_gro_flush_cycles =
+       TOKEN_NUM_INITIALIZER(struct cmd_gro_flush_result,
+                       cmd_cycles, UINT8);
+
+cmdline_parse_inst_t cmd_gro_flush = {
+       .f = cmd_gro_flush_parsed,
+       .data = NULL,
+       .help_str = "set gro flush <cycles>",
+       .tokens = {
+               (void *)&cmd_gro_flush_set,
+               (void *)&cmd_gro_flush_keyword,
+               (void *)&cmd_gro_flush_flush,
+               (void *)&cmd_gro_flush_cycles,
+               NULL,
+       },
+};
+
 /* *** ENABLE/DISABLE FLUSH ON RX STREAMS *** */
 struct cmd_set_flush_rx {
        cmdline_fixed_string_t set;
@@ -4300,6 +4484,85 @@ cmdline_parse_inst_t cmd_set_bonding_mode = {
                }
 };
 
+/* *** SET BONDING SLOW_QUEUE SW/HW *** */
+struct cmd_set_bonding_lacp_dedicated_queues_result {
+       cmdline_fixed_string_t set;
+       cmdline_fixed_string_t bonding;
+       cmdline_fixed_string_t lacp;
+       cmdline_fixed_string_t dedicated_queues;
+       uint8_t port_id;
+       cmdline_fixed_string_t mode;
+};
+
+static void cmd_set_bonding_lacp_dedicated_queues_parsed(void *parsed_result,
+               __attribute__((unused))  struct cmdline *cl,
+               __attribute__((unused)) void *data)
+{
+       struct cmd_set_bonding_lacp_dedicated_queues_result *res = parsed_result;
+       portid_t port_id = res->port_id;
+       struct rte_port *port;
+
+       port = &ports[port_id];
+
+       /** Check if the port is not started **/
+       if (port->port_status != RTE_PORT_STOPPED) {
+               printf("Please stop port %d first\n", port_id);
+               return;
+       }
+
+       if (!strcmp(res->mode, "enable")) {
+               if (rte_eth_bond_8023ad_dedicated_queues_enable(port_id) == 0)
+                       printf("Dedicate queues for LACP control packets"
+                                       " enabled\n");
+               else
+                       printf("Enabling dedicate queues for LACP control "
+                                       "packets on port %d failed\n", port_id);
+       } else if (!strcmp(res->mode, "disable")) {
+               if (rte_eth_bond_8023ad_dedicated_queues_disable(port_id) == 0)
+                       printf("Dedicated queues for LACP control packets "
+                                       "disabled\n");
+               else
+                       printf("Disabling dedicated queues for LACP control "
+                                       "traffic on port %d failed\n", port_id);
+       }
+}
+
+cmdline_parse_token_string_t cmd_setbonding_lacp_dedicated_queues_set =
+TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               set, "set");
+cmdline_parse_token_string_t cmd_setbonding_lacp_dedicated_queues_bonding =
+TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               bonding, "bonding");
+cmdline_parse_token_string_t cmd_setbonding_lacp_dedicated_queues_lacp =
+TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               lacp, "lacp");
+cmdline_parse_token_string_t cmd_setbonding_lacp_dedicated_queues_dedicated_queues =
+TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               dedicated_queues, "dedicated_queues");
+cmdline_parse_token_num_t cmd_setbonding_lacp_dedicated_queues_port_id =
+TOKEN_NUM_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               port_id, UINT8);
+cmdline_parse_token_string_t cmd_setbonding_lacp_dedicated_queues_mode =
+TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_lacp_dedicated_queues_result,
+               mode, "enable#disable");
+
+cmdline_parse_inst_t cmd_set_lacp_dedicated_queues = {
+               .f = cmd_set_bonding_lacp_dedicated_queues_parsed,
+               .help_str = "set bonding lacp dedicated_queues <port_id> "
+                       "enable|disable: "
+                       "Enable/disable dedicated queues for LACP control traffic for port_id",
+               .data = NULL,
+               .tokens = {
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_set,
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_bonding,
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_lacp,
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_dedicated_queues,
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_port_id,
+                       (void *)&cmd_setbonding_lacp_dedicated_queues_mode,
+                       NULL
+               }
+};
+
 /* *** SET BALANCE XMIT POLICY *** */
 struct cmd_set_bonding_balance_xmit_policy_result {
        cmdline_fixed_string_t set;
@@ -4372,7 +4635,7 @@ struct cmd_show_bonding_config_result {
        cmdline_fixed_string_t show;
        cmdline_fixed_string_t bonding;
        cmdline_fixed_string_t config;
-       uint8_t port_id;
+       portid_t port_id;
 };
 
 static void cmd_show_bonding_config_parsed(void *parsed_result,
@@ -4380,8 +4643,8 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,
                __attribute__((unused)) void *data)
 {
        struct cmd_show_bonding_config_result *res = parsed_result;
-       int bonding_mode;
-       uint8_t slaves[RTE_MAX_ETHPORTS];
+       int bonding_mode, agg_mode;
+       portid_t slaves[RTE_MAX_ETHPORTS];
        int num_slaves, num_active_slaves;
        int primary_id;
        int i;
@@ -4421,6 +4684,23 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,
                }
        }
 
+       if (bonding_mode == BONDING_MODE_8023AD) {
+               agg_mode = rte_eth_bond_8023ad_agg_selection_get(port_id);
+               printf("\tIEEE802.3AD Aggregator Mode: ");
+               switch (agg_mode) {
+               case AGG_BANDWIDTH:
+                       printf("bandwidth");
+                       break;
+               case AGG_STABLE:
+                       printf("stable");
+                       break;
+               case AGG_COUNT:
+                       printf("count");
+                       break;
+               }
+               printf("\n");
+       }
+
        num_slaves = rte_eth_bond_slaves_get(port_id, slaves, RTE_MAX_ETHPORTS);
 
        if (num_slaves < 0) {
@@ -4690,7 +4970,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
                return;
        }
 
-       snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "net_bond_testpmd_%d",
+       snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "net_bonding_testpmd_%d",
                        bond_dev_num++);
 
        /* Create a new bonded device. */
@@ -4853,6 +5133,77 @@ cmdline_parse_inst_t cmd_set_bond_mon_period = {
                }
 };
 
+
+
+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;
+       cmdline_fixed_string_t policy;
+};
+
+
+static void
+cmd_set_bonding_agg_mode(void *parsed_result,
+               __attribute__((unused)) struct cmdline *cl,
+               __attribute__((unused)) void *data)
+{
+       struct cmd_set_bonding_agg_mode_policy_result *res = parsed_result;
+       uint8_t policy = AGG_BANDWIDTH;
+
+       if (res->port_num >= nb_ports) {
+               printf("Port id %d must be less than %d\n",
+                               res->port_num, nb_ports);
+               return;
+       }
+
+       if (!strcmp(res->policy, "bandwidth"))
+               policy = AGG_BANDWIDTH;
+       else if (!strcmp(res->policy, "stable"))
+               policy = AGG_STABLE;
+       else if (!strcmp(res->policy, "count"))
+               policy = AGG_COUNT;
+
+       rte_eth_bond_8023ad_agg_selection_set(res->port_num, policy);
+}
+
+
+cmdline_parse_token_string_t cmd_set_bonding_agg_mode_set =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_agg_mode_policy_result,
+                               set, "set");
+cmdline_parse_token_string_t cmd_set_bonding_agg_mode_bonding =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_agg_mode_policy_result,
+                               bonding, "bonding");
+
+cmdline_parse_token_string_t cmd_set_bonding_agg_mode_agg_mode =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_bonding_agg_mode_policy_result,
+                               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);
+
+cmdline_parse_token_string_t cmd_set_bonding_agg_mode_policy_string =
+       TOKEN_STRING_INITIALIZER(
+                       struct cmd_set_bonding_balance_xmit_policy_result,
+               policy, "stable#bandwidth#count");
+
+cmdline_parse_inst_t cmd_set_bonding_agg_mode_policy = {
+       .f = cmd_set_bonding_agg_mode,
+       .data = (void *) 0,
+       .help_str = "set bonding mode IEEE802.3AD aggregator policy <port_id> <agg_name>",
+       .tokens = {
+                       (void *)&cmd_set_bonding_agg_mode_set,
+                       (void *)&cmd_set_bonding_agg_mode_bonding,
+                       (void *)&cmd_set_bonding_agg_mode_agg_mode,
+                       (void *)&cmd_set_bonding_agg_mode_portnum,
+                       (void *)&cmd_set_bonding_agg_mode_policy_string,
+                       NULL
+               }
+};
+
+
 #endif /* RTE_LIBRTE_PMD_BOND */
 
 /* *** SET FORWARDING MODE *** */
@@ -6660,7 +7011,7 @@ cmd_set_vf_macvlan_parsed(void *parsed_result,
 
        memset(&filter, 0, sizeof(struct rte_eth_mac_filter));
 
-       (void)rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN);
+       rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN);
 
        /* set VF MAC filter */
        filter.is_vf = 1;
@@ -6909,11 +7260,22 @@ static void cmd_vf_mac_addr_parsed(void *parsed_result,
                __attribute__((unused)) void *data)
 {
        struct cmd_vf_mac_addr_result *res = parsed_result;
-       int ret = 0;
+       int ret = -ENOTSUP;
+
+       if (strcmp(res->what, "add") != 0)
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       if (ret == -ENOTSUP)
+               ret = rte_pmd_i40e_add_vf_mac_addr(res->port_num, res->vf_num,
+                                                  &res->address);
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
+       if (ret == -ENOTSUP)
+               ret = rte_pmd_bnxt_mac_addr_add(res->port_num, &res->address,
+                                               res->vf_num);
+#endif
 
-       if (strcmp(res->what, "add") == 0)
-               ret = rte_eth_dev_mac_addr_add(res->port_num,
-                                       &res->address, res->vf_num);
        if(ret < 0)
                printf("vf_mac_addr_cmd error: (%s)\n", strerror(-ret));
 
@@ -8523,7 +8885,7 @@ cmd_ethertype_filter_parsed(void *parsed_result,
        memset(&filter, 0, sizeof(filter));
        if (!strcmp(res->mac, "mac_addr")) {
                filter.flags |= RTE_ETHTYPE_FLAGS_MAC;
-               (void)rte_memcpy(&filter.mac_addr, &res->mac_addr,
+               rte_memcpy(&filter.mac_addr, &res->mac_addr,
                        sizeof(struct ether_addr));
        }
        if (!strcmp(res->drop, "drop"))
@@ -8676,6 +9038,10 @@ str2flowtype(char *string)
                if (!strcmp(flowtype_str[i].str, string))
                        return flowtype_str[i].type;
        }
+
+       if (isdigit(string[0]) && atoi(string) > 0 && atoi(string) < 64)
+               return (uint16_t)atoi(string);
+
        return RTE_ETH_FLOW_UNKNOWN;
 }
 
@@ -8712,7 +9078,7 @@ do { \
 #define IPV6_ADDR_TO_ARRAY(ip_addr, ip) \
 do { \
        if ((ip_addr).family == AF_INET6) \
-               (void)rte_memcpy(&(ip), \
+               rte_memcpy(&(ip), \
                                 &((ip_addr).addr.ipv6), \
                                 sizeof(struct in6_addr)); \
        else { \
@@ -8844,12 +9210,12 @@ cmd_flow_director_filter_parsed(void *parsed_result,
        }
 
        if (fdir_conf.mode ==  RTE_FDIR_MODE_PERFECT_MAC_VLAN)
-               (void)rte_memcpy(&entry.input.flow.mac_vlan_flow.mac_addr,
+               rte_memcpy(&entry.input.flow.mac_vlan_flow.mac_addr,
                                 &res->mac_addr,
                                 sizeof(struct ether_addr));
 
        if (fdir_conf.mode ==  RTE_FDIR_MODE_PERFECT_TUNNEL) {
-               (void)rte_memcpy(&entry.input.flow.tunnel_flow.mac_addr,
+               rte_memcpy(&entry.input.flow.tunnel_flow.mac_addr,
                                 &res->mac_addr,
                                 sizeof(struct ether_addr));
                entry.input.flow.tunnel_flow.tunnel_type =
@@ -8858,7 +9224,7 @@ cmd_flow_director_filter_parsed(void *parsed_result,
                        rte_cpu_to_be_32(res->tunnel_id_value);
        }
 
-       (void)rte_memcpy(entry.input.flow_ext.flexbytes,
+       rte_memcpy(entry.input.flow_ext.flexbytes,
                   flexbytes,
                   RTE_ETH_FDIR_MAX_FLEXLEN);
 
@@ -9556,7 +9922,7 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result,
                        memset(&port->dev_conf.fdir_conf.flex_conf.flex_mask[i],
                               0, sizeof(struct rte_eth_fdir_flex_mask));
                port->dev_conf.fdir_conf.flex_conf.nb_flexmasks = 1;
-               (void)rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0],
+               rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0],
                                 &flex_mask,
                                 sizeof(struct rte_eth_fdir_flex_mask));
                cmd_reconfig_device_queue(res->port_id, 1, 1);
@@ -10152,9 +10518,7 @@ cmdline_parse_token_num_t cmd_set_hash_input_set_port_id =
                port_id, UINT8);
 cmdline_parse_token_string_t cmd_set_hash_input_set_flow_type =
        TOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,
-               flow_type,
-               "ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#ipv4-other#"
-               "ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#ipv6-other#l2_payload");
+               flow_type, NULL);
 cmdline_parse_token_string_t cmd_set_hash_input_set_field =
        TOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,
                inset_field,
@@ -10173,7 +10537,7 @@ cmdline_parse_inst_t cmd_set_hash_input_set = {
        .data = NULL,
        .help_str = "set_hash_input_set <port_id> "
        "ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-       "ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload "
+       "ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|<flowtype_id> "
        "ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6|ipv4-tos|ipv4-proto|"
        "ipv6-tc|ipv6-next-header|udp-src-port|udp-dst-port|tcp-src-port|"
        "tcp-dst-port|sctp-src-port|sctp-dst-port|sctp-veri-tag|udp-key|"
@@ -11196,7 +11560,7 @@ struct cmd_vf_vlan_stripq_result {
        cmdline_fixed_string_t vf;
        cmdline_fixed_string_t vlan;
        cmdline_fixed_string_t stripq;
-       uint8_t port_id;
+       portid_t port_id;
        uint16_t vf_id;
        cmdline_fixed_string_t on_off;
 };
@@ -13014,6 +13378,76 @@ cmdline_parse_inst_t cmd_ddp_add = {
        },
 };
 
+/* Delete dynamic device personalization*/
+struct cmd_ddp_del_result {
+       cmdline_fixed_string_t ddp;
+       cmdline_fixed_string_t del;
+       uint8_t port_id;
+       char filepath[];
+};
+
+cmdline_parse_token_string_t cmd_ddp_del_ddp =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, ddp, "ddp");
+cmdline_parse_token_string_t cmd_ddp_del_del =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, del, "del");
+cmdline_parse_token_num_t cmd_ddp_del_port_id =
+       TOKEN_NUM_INITIALIZER(struct cmd_ddp_del_result, port_id, UINT8);
+cmdline_parse_token_string_t cmd_ddp_del_filepath =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, filepath, NULL);
+
+static void
+cmd_ddp_del_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_ddp_del_result *res = parsed_result;
+       uint8_t *buff;
+       uint32_t size;
+       int ret = -ENOTSUP;
+
+       if (res->port_id > nb_ports) {
+               printf("Invalid port, range is [0, %d]\n", nb_ports - 1);
+               return;
+       }
+
+       if (!all_ports_stopped()) {
+               printf("Please stop all ports first\n");
+               return;
+       }
+
+       buff = open_ddp_package_file(res->filepath, &size);
+       if (!buff)
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       if (ret == -ENOTSUP)
+               ret = rte_pmd_i40e_process_ddp_package(res->port_id,
+                                              buff, size,
+                                              RTE_PMD_I40E_PKG_OP_WR_DEL);
+#endif
+
+       if (ret == -EACCES)
+               printf("Profile does not exist.\n");
+       else if (ret < 0)
+               printf("Failed to delete profile.\n");
+
+       close_ddp_package_file(buff);
+}
+
+cmdline_parse_inst_t cmd_ddp_del = {
+       .f = cmd_ddp_del_parsed,
+       .data = NULL,
+       .help_str = "ddp del <port_id> <profile_path>",
+       .tokens = {
+               (void *)&cmd_ddp_del_ddp,
+               (void *)&cmd_ddp_del_del,
+               (void *)&cmd_ddp_del_port_id,
+               (void *)&cmd_ddp_del_filepath,
+               NULL,
+       },
+};
+
 /* Get dynamic device personalization profile info */
 struct cmd_ddp_info_result {
        cmdline_fixed_string_t ddp;
@@ -13042,12 +13476,20 @@ cmd_ddp_info_parsed(
        uint32_t pkg_size;
        int ret = -ENOTSUP;
 #ifdef RTE_LIBRTE_I40E_PMD
-       uint32_t i;
+       uint32_t i, j, n;
        uint8_t *buff;
-       uint32_t buff_size;
+       uint32_t buff_size = 0;
        struct rte_pmd_i40e_profile_info info;
-       uint32_t dev_num;
+       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;
+       uint32_t pctype_num = 0;
+       struct rte_pmd_i40e_ptype_info *pctype;
+       uint32_t ptype_num = 0;
+       struct rte_pmd_i40e_ptype_info *ptype;
+       uint8_t proto_id;
+
 #endif
 
        pkg = open_ddp_package_file(res->filepath, &pkg_size);
@@ -13100,12 +13542,11 @@ cmd_ddp_info_parsed(
                                (uint8_t *)&dev_num, sizeof(dev_num),
                                RTE_PMD_I40E_PKG_INFO_DEVID_NUM);
        if (!ret && dev_num) {
-               devs = (struct rte_pmd_i40e_ddp_device_id *)malloc(dev_num *
-                       sizeof(struct rte_pmd_i40e_ddp_device_id));
+               buff_size = dev_num * sizeof(struct rte_pmd_i40e_ddp_device_id);
+               devs = (struct rte_pmd_i40e_ddp_device_id *)malloc(buff_size);
                if (devs) {
                        ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
-                                               (uint8_t *)devs, dev_num *
-                                               sizeof(struct rte_pmd_i40e_ddp_device_id),
+                                               (uint8_t *)devs, buff_size,
                                                RTE_PMD_I40E_PKG_INFO_DEVID_LIST);
                        if (!ret) {
                                printf("List of supported devices:\n");
@@ -13121,8 +13562,110 @@ cmd_ddp_info_parsed(
                        free(devs);
                }
        }
+
+       /* get information about protocols and packet types */
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+               (uint8_t *)&proto_num, sizeof(proto_num),
+               RTE_PMD_I40E_PKG_INFO_PROTOCOL_NUM);
+       if (ret || !proto_num)
+               goto no_print_return;
+
+       buff_size = proto_num * sizeof(struct rte_pmd_i40e_proto_info);
+       proto = (struct rte_pmd_i40e_proto_info *)malloc(buff_size);
+       if (!proto)
+               goto no_print_return;
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size, (uint8_t *)proto,
+                                       buff_size,
+                                       RTE_PMD_I40E_PKG_INFO_PROTOCOL_LIST);
+       if (!ret) {
+               printf("List of used protocols:\n");
+               for (i = 0; i < proto_num; i++)
+                       printf("  %2u: %s\n", proto[i].proto_id,
+                              proto[i].name);
+               printf("\n");
+       }
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+               (uint8_t *)&pctype_num, sizeof(pctype_num),
+               RTE_PMD_I40E_PKG_INFO_PCTYPE_NUM);
+       if (ret || !pctype_num)
+               goto no_print_pctypes;
+
+       buff_size = pctype_num * sizeof(struct rte_pmd_i40e_ptype_info);
+       pctype = (struct rte_pmd_i40e_ptype_info *)malloc(buff_size);
+       if (!pctype)
+               goto no_print_pctypes;
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size, (uint8_t *)pctype,
+                                       buff_size,
+                                       RTE_PMD_I40E_PKG_INFO_PCTYPE_LIST);
+       if (ret) {
+               free(pctype);
+               goto no_print_pctypes;
+       }
+
+       printf("List of defined packet classification types:\n");
+       for (i = 0; i < pctype_num; i++) {
+               printf("  %2u:", pctype[i].ptype_id);
+               for (j = 0; j < RTE_PMD_I40E_PROTO_NUM; j++) {
+                       proto_id = pctype[i].protocols[j];
+                       if (proto_id != RTE_PMD_I40E_PROTO_UNUSED) {
+                               for (n = 0; n < proto_num; n++) {
+                                       if (proto[n].proto_id == proto_id) {
+                                               printf(" %s", proto[n].name);
+                                               break;
+                                       }
+                               }
+                       }
+               }
+               printf("\n");
+       }
+       printf("\n");
+       free(pctype);
+
+no_print_pctypes:
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size, (uint8_t *)&ptype_num,
+                                       sizeof(ptype_num),
+                                       RTE_PMD_I40E_PKG_INFO_PTYPE_NUM);
+       if (ret || !ptype_num)
+               goto no_print_return;
+
+       buff_size = ptype_num * sizeof(struct rte_pmd_i40e_ptype_info);
+       ptype = (struct rte_pmd_i40e_ptype_info *)malloc(buff_size);
+       if (!ptype)
+               goto no_print_return;
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size, (uint8_t *)ptype,
+                                       buff_size,
+                                       RTE_PMD_I40E_PKG_INFO_PTYPE_LIST);
+       if (ret) {
+               free(ptype);
+               goto no_print_return;
+       }
+       printf("List of defined packet types:\n");
+       for (i = 0; i < ptype_num; i++) {
+               printf("  %2u:", ptype[i].ptype_id);
+               for (j = 0; j < RTE_PMD_I40E_PROTO_NUM; j++) {
+                       proto_id = ptype[i].protocols[j];
+                       if (proto_id != RTE_PMD_I40E_PROTO_UNUSED) {
+                               for (n = 0; n < proto_num; n++) {
+                                       if (proto[n].proto_id == proto_id) {
+                                               printf(" %s", proto[n].name);
+                                               break;
+                                       }
+                               }
+                       }
+               }
+               printf("\n");
+       }
+       free(ptype);
+       printf("\n");
+
+       free(proto);
        ret = 0;
 #endif
+no_print_return:
        if (ret == -ENOTSUP)
                printf("Function not supported in PMD driver\n");
        close_ddp_package_file(pkg);
@@ -13425,6 +13968,304 @@ cmdline_parse_inst_t cmd_clear_vf_stats = {
        },
 };
 
+/* port config pctype mapping reset */
+
+/* Common result structure for port config pctype mapping reset */
+struct cmd_pctype_mapping_reset_result {
+       cmdline_fixed_string_t port;
+       cmdline_fixed_string_t config;
+       uint8_t port_id;
+       cmdline_fixed_string_t pctype;
+       cmdline_fixed_string_t mapping;
+       cmdline_fixed_string_t reset;
+};
+
+/* Common CLI fields for port config pctype mapping reset*/
+cmdline_parse_token_string_t cmd_pctype_mapping_reset_port =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                port, "port");
+cmdline_parse_token_string_t cmd_pctype_mapping_reset_config =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                config, "config");
+cmdline_parse_token_num_t cmd_pctype_mapping_reset_port_id =
+       TOKEN_NUM_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                port_id, UINT8);
+cmdline_parse_token_string_t cmd_pctype_mapping_reset_pctype =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                pctype, "pctype");
+cmdline_parse_token_string_t cmd_pctype_mapping_reset_mapping =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                mapping, "mapping");
+cmdline_parse_token_string_t cmd_pctype_mapping_reset_reset =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_reset_result,
+                reset, "reset");
+
+static void
+cmd_pctype_mapping_reset_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_pctype_mapping_reset_result *res = parsed_result;
+       int ret = -ENOTSUP;
+
+       if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       ret = rte_pmd_i40e_flow_type_mapping_reset(res->port_id);
+#endif
+
+       switch (ret) {
+       case 0:
+               break;
+       case -ENODEV:
+               printf("invalid port_id %d\n", res->port_id);
+               break;
+       case -ENOTSUP:
+               printf("function not implemented\n");
+               break;
+       default:
+               printf("programming error: (%s)\n", strerror(-ret));
+       }
+}
+
+cmdline_parse_inst_t cmd_pctype_mapping_reset = {
+       .f = cmd_pctype_mapping_reset_parsed,
+       .data = NULL,
+       .help_str = "port config <port_id> pctype mapping reset",
+       .tokens = {
+               (void *)&cmd_pctype_mapping_reset_port,
+               (void *)&cmd_pctype_mapping_reset_config,
+               (void *)&cmd_pctype_mapping_reset_port_id,
+               (void *)&cmd_pctype_mapping_reset_pctype,
+               (void *)&cmd_pctype_mapping_reset_mapping,
+               (void *)&cmd_pctype_mapping_reset_reset,
+               NULL,
+       },
+};
+
+/* show port pctype mapping */
+
+/* Common result structure for show port pctype mapping */
+struct cmd_pctype_mapping_get_result {
+       cmdline_fixed_string_t show;
+       cmdline_fixed_string_t port;
+       uint8_t port_id;
+       cmdline_fixed_string_t pctype;
+       cmdline_fixed_string_t mapping;
+};
+
+/* Common CLI fields for pctype mapping get */
+cmdline_parse_token_string_t cmd_pctype_mapping_get_show =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_get_result,
+                show, "show");
+cmdline_parse_token_string_t cmd_pctype_mapping_get_port =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_get_result,
+                port, "port");
+cmdline_parse_token_num_t cmd_pctype_mapping_get_port_id =
+       TOKEN_NUM_INITIALIZER
+               (struct cmd_pctype_mapping_get_result,
+                port_id, UINT8);
+cmdline_parse_token_string_t cmd_pctype_mapping_get_pctype =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_get_result,
+                pctype, "pctype");
+cmdline_parse_token_string_t cmd_pctype_mapping_get_mapping =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_get_result,
+                mapping, "mapping");
+
+static void
+cmd_pctype_mapping_get_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_pctype_mapping_get_result *res = parsed_result;
+       int ret = -ENOTSUP;
+#ifdef RTE_LIBRTE_I40E_PMD
+       struct rte_pmd_i40e_flow_type_mapping
+                               mapping[RTE_PMD_I40E_FLOW_TYPE_MAX];
+       int i, j, first_pctype;
+#endif
+
+       if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       ret = rte_pmd_i40e_flow_type_mapping_get(res->port_id, mapping);
+#endif
+
+       switch (ret) {
+       case 0:
+               break;
+       case -ENODEV:
+               printf("invalid port_id %d\n", res->port_id);
+               return;
+       case -ENOTSUP:
+               printf("function not implemented\n");
+               return;
+       default:
+               printf("programming error: (%s)\n", strerror(-ret));
+               return;
+       }
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       for (i = 0; i < RTE_PMD_I40E_FLOW_TYPE_MAX; i++) {
+               if (mapping[i].pctype != 0ULL) {
+                       first_pctype = 1;
+
+                       printf("pctype: ");
+                       for (j = 0; j < RTE_PMD_I40E_PCTYPE_MAX; j++) {
+                               if (mapping[i].pctype & (1ULL << j)) {
+                                       printf(first_pctype ?
+                                              "%02d" : ",%02d", j);
+                                       first_pctype = 0;
+                               }
+                       }
+                       printf("  ->  flowtype: %02d\n", mapping[i].flow_type);
+               }
+       }
+#endif
+}
+
+cmdline_parse_inst_t cmd_pctype_mapping_get = {
+       .f = cmd_pctype_mapping_get_parsed,
+       .data = NULL,
+       .help_str = "show port <port_id> pctype mapping",
+       .tokens = {
+               (void *)&cmd_pctype_mapping_get_show,
+               (void *)&cmd_pctype_mapping_get_port,
+               (void *)&cmd_pctype_mapping_get_port_id,
+               (void *)&cmd_pctype_mapping_get_pctype,
+               (void *)&cmd_pctype_mapping_get_mapping,
+               NULL,
+       },
+};
+
+/* port config pctype mapping update */
+
+/* Common result structure for port config pctype mapping update */
+struct cmd_pctype_mapping_update_result {
+       cmdline_fixed_string_t port;
+       cmdline_fixed_string_t config;
+       uint8_t port_id;
+       cmdline_fixed_string_t pctype;
+       cmdline_fixed_string_t mapping;
+       cmdline_fixed_string_t update;
+       cmdline_fixed_string_t pctype_list;
+       uint16_t flow_type;
+};
+
+/* Common CLI fields for pctype mapping update*/
+cmdline_parse_token_string_t cmd_pctype_mapping_update_port =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                port, "port");
+cmdline_parse_token_string_t cmd_pctype_mapping_update_config =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                config, "config");
+cmdline_parse_token_num_t cmd_pctype_mapping_update_port_id =
+       TOKEN_NUM_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                port_id, UINT8);
+cmdline_parse_token_string_t cmd_pctype_mapping_update_pctype =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                pctype, "pctype");
+cmdline_parse_token_string_t cmd_pctype_mapping_update_mapping =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                mapping, "mapping");
+cmdline_parse_token_string_t cmd_pctype_mapping_update_update =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                update, "update");
+cmdline_parse_token_string_t cmd_pctype_mapping_update_pc_type =
+       TOKEN_STRING_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                pctype_list, NULL);
+cmdline_parse_token_num_t cmd_pctype_mapping_update_flow_type =
+       TOKEN_NUM_INITIALIZER
+               (struct cmd_pctype_mapping_update_result,
+                flow_type, UINT16);
+
+static void
+cmd_pctype_mapping_update_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_pctype_mapping_update_result *res = parsed_result;
+       int ret = -ENOTSUP;
+#ifdef RTE_LIBRTE_I40E_PMD
+       struct rte_pmd_i40e_flow_type_mapping mapping;
+       unsigned int i;
+#endif
+       unsigned int nb_item;
+       unsigned int pctype_list[RTE_PMD_I40E_PCTYPE_MAX];
+
+       if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+               return;
+
+       nb_item = parse_item_list(res->pctype_list, "pctypes",
+                                 RTE_PMD_I40E_PCTYPE_MAX, pctype_list, 1);
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       mapping.flow_type = res->flow_type;
+       for (i = 0, mapping.pctype = 0ULL; i < nb_item; i++)
+               mapping.pctype |= (1ULL << pctype_list[i]);
+       ret = rte_pmd_i40e_flow_type_mapping_update(res->port_id,
+                                               &mapping,
+                                               1,
+                                               0);
+#endif
+
+       switch (ret) {
+       case 0:
+               break;
+       case -EINVAL:
+               printf("invalid pctype or flow type\n");
+               break;
+       case -ENODEV:
+               printf("invalid port_id %d\n", res->port_id);
+               break;
+       case -ENOTSUP:
+               printf("function not implemented\n");
+               break;
+       default:
+               printf("programming error: (%s)\n", strerror(-ret));
+       }
+}
+
+cmdline_parse_inst_t cmd_pctype_mapping_update = {
+       .f = cmd_pctype_mapping_update_parsed,
+       .data = NULL,
+       .help_str = "port config <port_id> pctype mapping update"
+       " <pctype_id_0,[pctype_id_1]*> <flowtype_id>",
+       .tokens = {
+               (void *)&cmd_pctype_mapping_update_port,
+               (void *)&cmd_pctype_mapping_update_config,
+               (void *)&cmd_pctype_mapping_update_port_id,
+               (void *)&cmd_pctype_mapping_update_pctype,
+               (void *)&cmd_pctype_mapping_update_mapping,
+               (void *)&cmd_pctype_mapping_update_update,
+               (void *)&cmd_pctype_mapping_update_pc_type,
+               (void *)&cmd_pctype_mapping_update_flow_type,
+               NULL,
+       },
+};
+
 /* ptype mapping get */
 
 /* Common result structure for ptype mapping get */
@@ -13861,6 +14702,8 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *) &cmd_set_bond_mac_addr,
        (cmdline_parse_inst_t *) &cmd_set_balance_xmit_policy,
        (cmdline_parse_inst_t *) &cmd_set_bond_mon_period,
+       (cmdline_parse_inst_t *) &cmd_set_lacp_dedicated_queues,
+       (cmdline_parse_inst_t *) &cmd_set_bonding_agg_mode_policy,
 #endif
        (cmdline_parse_inst_t *)&cmd_vlan_offload,
        (cmdline_parse_inst_t *)&cmd_vlan_tpid,
@@ -13877,6 +14720,9 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_tso_show,
        (cmdline_parse_inst_t *)&cmd_tunnel_tso_set,
        (cmdline_parse_inst_t *)&cmd_tunnel_tso_show,
+       (cmdline_parse_inst_t *)&cmd_gro_enable,
+       (cmdline_parse_inst_t *)&cmd_gro_flush,
+       (cmdline_parse_inst_t *)&cmd_gro_show,
        (cmdline_parse_inst_t *)&cmd_link_flow_control_set,
        (cmdline_parse_inst_t *)&cmd_link_flow_control_set_rx,
        (cmdline_parse_inst_t *)&cmd_link_flow_control_set_tx,
@@ -13993,6 +14839,7 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_strict_link_prio,
        (cmdline_parse_inst_t *)&cmd_tc_min_bw,
        (cmdline_parse_inst_t *)&cmd_ddp_add,
+       (cmdline_parse_inst_t *)&cmd_ddp_del,
        (cmdline_parse_inst_t *)&cmd_ddp_get_list,
        (cmdline_parse_inst_t *)&cmd_ddp_get_info,
        (cmdline_parse_inst_t *)&cmd_show_vf_stats,
@@ -14001,6 +14848,10 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_ptype_mapping_replace,
        (cmdline_parse_inst_t *)&cmd_ptype_mapping_reset,
        (cmdline_parse_inst_t *)&cmd_ptype_mapping_update,
+
+       (cmdline_parse_inst_t *)&cmd_pctype_mapping_get,
+       (cmdline_parse_inst_t *)&cmd_pctype_mapping_reset,
+       (cmdline_parse_inst_t *)&cmd_pctype_mapping_update,
        NULL,
 };