net: add rte prefix to ether structures
[dpdk.git] / app / test-pmd / cmdline.c
index 1275074..90e3502 100644 (file)
@@ -44,7 +44,6 @@
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
 #include <rte_devargs.h>
-#include <rte_eth_ctrl.h>
 #include <rte_flow.h>
 #include <rte_gro.h>
 
@@ -94,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"
        );
 
 }
@@ -210,21 +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 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"
                );
        }
 
@@ -371,12 +382,12 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "filtered for VF(s) from port_id.\n\n"
 
                        "tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) "
-                       "(inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|"
+                       "(inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|"
                        "imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id)\n"
                        "   add a tunnel filter of a port.\n\n"
 
                        "tunnel_filter rm (port_id) (outer_mac) (inner_mac) (ip_addr) "
-                       "(inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|"
+                       "(inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|"
                        "imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id)\n"
                        "   remove a tunnel filter of a port.\n\n"
 
@@ -642,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"
 
@@ -727,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"
@@ -794,6 +744,12 @@ static void cmd_help_long_parsed(void *parsed_result,
                        " eth-dst (eth-dst)\n"
                        "       Configure the VXLAN encapsulation for flows.\n\n"
 
+                       "vxlan-tos-ttl ip-version (ipv4|ipv6) vni (vni) udp-src"
+                       " (udp-src) udp-dst (udp-dst) ip-tos (ip-tos) ip-ttl (ip-ttl)"
+                       " ip-src (ip-src) ip-dst (ip-dst) eth-src (eth-src)"
+                       " eth-dst (eth-dst)\n"
+                       "       Configure the VXLAN encapsulation for flows.\n\n"
+
                        "nvgre ip-version (ipv4|ipv6) tni (tni) ip-src"
                        " (ip-src) ip-dst (ip-dst) eth-src (eth-src) eth-dst"
                        " (eth-dst)\n"
@@ -852,7 +808,7 @@ static void cmd_help_long_parsed(void *parsed_result,
                        " for ports.\n\n"
 
                        "port config all rss (all|default|ip|tcp|udp|sctp|"
-                       "ether|port|vxlan|geneve|nvgre|none|<flowtype_id>)\n"
+                       "ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|<flowtype_id>)\n"
                        "    Set the RSS mode.\n\n"
 
                        "port config port-id rss reta (hash,queue)[,(hash,queue)]\n"
@@ -918,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 <port_id> rx_offload vlan_strip|"
+                       "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
+                       "outer_ipv4_cksum|macsec_strip|header_split|"
+                       "vlan_filter|vlan_extend|jumbo_frame|crc_strip|"
+                       "scatter|timestamp|security|keep_crc 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"
                );
        }
 
@@ -1137,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 =
@@ -1145,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,
@@ -2179,7 +2283,7 @@ cmdline_parse_inst_t cmd_config_rss = {
        .f = cmd_config_rss_parsed,
        .data = NULL,
        .help_str = "port config all rss "
-               "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none|<flowtype_id>",
+               "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|<flowtype_id>",
        .tokens = {
                (void *)&cmd_config_rss_port,
                (void *)&cmd_config_rss_keyword,
@@ -6020,7 +6124,7 @@ struct cmd_set_bond_mac_addr_result {
        cmdline_fixed_string_t bonding;
        cmdline_fixed_string_t mac_addr;
        uint16_t port_num;
-       struct ether_addr address;
+       struct rte_ether_addr address;
 };
 
 static void cmd_set_bond_mac_addr_parsed(void *parsed_result,
@@ -7380,6 +7484,49 @@ cmdline_parse_inst_t cmd_showqueue = {
        },
 };
 
+/* show/clear fwd engine statistics */
+struct fwd_result {
+       cmdline_fixed_string_t action;
+       cmdline_fixed_string_t fwd;
+       cmdline_fixed_string_t stats;
+       cmdline_fixed_string_t all;
+};
+
+cmdline_parse_token_string_t cmd_fwd_action =
+       TOKEN_STRING_INITIALIZER(struct fwd_result, action, "show#clear");
+cmdline_parse_token_string_t cmd_fwd_fwd =
+       TOKEN_STRING_INITIALIZER(struct fwd_result, fwd, "fwd");
+cmdline_parse_token_string_t cmd_fwd_stats =
+       TOKEN_STRING_INITIALIZER(struct fwd_result, stats, "stats");
+cmdline_parse_token_string_t cmd_fwd_all =
+       TOKEN_STRING_INITIALIZER(struct fwd_result, all, "all");
+
+static void
+cmd_showfwdall_parsed(void *parsed_result,
+                     __rte_unused struct cmdline *cl,
+                     __rte_unused void *data)
+{
+       struct fwd_result *res = parsed_result;
+
+       if (!strcmp(res->action, "show"))
+               fwd_stats_display();
+       else
+               fwd_stats_reset();
+}
+
+static cmdline_parse_inst_t cmd_showfwdall = {
+       .f = cmd_showfwdall_parsed,
+       .data = NULL,
+       .help_str = "show|clear fwd stats all",
+       .tokens = {
+               (void *)&cmd_fwd_action,
+               (void *)&cmd_fwd_fwd,
+               (void *)&cmd_fwd_stats,
+               (void *)&cmd_fwd_all,
+               NULL,
+       },
+};
+
 /* *** READ PORT REGISTER *** */
 struct cmd_read_reg_result {
        cmdline_fixed_string_t read;
@@ -7750,7 +7897,7 @@ struct cmd_mac_addr_result {
        cmdline_fixed_string_t mac_addr_cmd;
        cmdline_fixed_string_t what;
        uint16_t port_num;
-       struct ether_addr address;
+       struct rte_ether_addr address;
 };
 
 static void cmd_mac_addr_parsed(void *parsed_result,
@@ -7949,7 +8096,7 @@ struct cmd_set_uc_hash_table {
        cmdline_fixed_string_t port;
        portid_t port_id;
        cmdline_fixed_string_t what;
-       struct ether_addr address;
+       struct rte_ether_addr address;
        cmdline_fixed_string_t mode;
 };
 
@@ -8073,7 +8220,7 @@ struct cmd_set_vf_macvlan_filter {
        portid_t port_id;
        cmdline_fixed_string_t vf;
        uint8_t vf_id;
-       struct ether_addr address;
+       struct rte_ether_addr address;
        cmdline_fixed_string_t filter_type;
        cmdline_fixed_string_t mode;
 };
@@ -8332,7 +8479,7 @@ struct cmd_vf_mac_addr_result {
        uint16_t port_num;
        cmdline_fixed_string_t vf;
        uint8_t vf_num;
-       struct ether_addr address;
+       struct rte_ether_addr address;
 };
 
 static void cmd_vf_mac_addr_parsed(void *parsed_result,
@@ -8645,8 +8792,8 @@ struct cmd_tunnel_filter_result {
        cmdline_fixed_string_t cmd;
        cmdline_fixed_string_t what;
        portid_t port_id;
-       struct ether_addr outer_mac;
-       struct ether_addr inner_mac;
+       struct rte_ether_addr outer_mac;
+       struct rte_ether_addr inner_mac;
        cmdline_ipaddr_t ip_value;
        uint16_t inner_vlan;
        cmdline_fixed_string_t tunnel_type;
@@ -8704,6 +8851,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
 
        if (!strcmp(res->tunnel_type, "vxlan"))
                tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN;
+       else if (!strcmp(res->tunnel_type, "vxlan-gpe"))
+               tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
        else if (!strcmp(res->tunnel_type, "nvgre"))
                tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_NVGRE;
        else if (!strcmp(res->tunnel_type, "ipingre"))
@@ -8753,7 +8902,7 @@ cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value =
        ip_value);
 cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =
        TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
-       tunnel_type, "vxlan#nvgre#ipingre");
+       tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe");
 
 cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
        TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
@@ -8877,6 +9026,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
                tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
        } else if (!strcmp(res->tunnel_type, "geneve")) {
                tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE;
+       } else if (!strcmp(res->tunnel_type, "vxlan-gpe")) {
+               tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
        } else {
                printf("Invalid tunnel type\n");
                return;
@@ -8911,7 +9062,7 @@ cmdline_parse_token_string_t cmd_config_tunnel_udp_port_action =
                                 "add#rm");
 cmdline_parse_token_string_t cmd_config_tunnel_udp_port_tunnel_type =
        TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port, tunnel_type,
-                                "vxlan#geneve");
+                                "vxlan#geneve#vxlan-gpe");
 cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
        TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port,
                              UINT16);
@@ -8919,7 +9070,7 @@ cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
 cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = {
        .f = cmd_cfg_tunnel_udp_port_parsed,
        .data = NULL,
-       .help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|geneve <udp_port>",
+       .help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe <udp_port>",
        .tokens = {
                (void *)&cmd_config_tunnel_udp_port_port,
                (void *)&cmd_config_tunnel_udp_port_config,
@@ -10432,7 +10583,7 @@ struct cmd_ethertype_filter_result {
        portid_t port_id;
        cmdline_fixed_string_t ops;
        cmdline_fixed_string_t mac;
-       struct ether_addr mac_addr;
+       struct rte_ether_addr mac_addr;
        cmdline_fixed_string_t ethertype;
        uint16_t ethertype_value;
        cmdline_fixed_string_t drop;
@@ -10492,7 +10643,7 @@ cmd_ethertype_filter_parsed(void *parsed_result,
        if (!strcmp(res->mac, "mac_addr")) {
                filter.flags |= RTE_ETHTYPE_FLAGS_MAC;
                rte_memcpy(&filter.mac_addr, &res->mac_addr,
-                       sizeof(struct ether_addr));
+                       sizeof(struct rte_ether_addr));
        }
        if (!strcmp(res->drop, "drop"))
                filter.flags |= RTE_ETHTYPE_FLAGS_DROP;
@@ -10571,7 +10722,7 @@ struct cmd_flow_director_result {
        cmdline_fixed_string_t fd_id;
        uint32_t  fd_id_value;
        cmdline_fixed_string_t mac;
-       struct ether_addr mac_addr;
+       struct rte_ether_addr mac_addr;
        cmdline_fixed_string_t tunnel;
        cmdline_fixed_string_t tunnel_type;
        cmdline_fixed_string_t tunnel_id;
@@ -10874,12 +11025,12 @@ cmd_flow_director_filter_parsed(void *parsed_result,
        if (fdir_conf.mode ==  RTE_FDIR_MODE_PERFECT_MAC_VLAN)
                rte_memcpy(&entry.input.flow.mac_vlan_flow.mac_addr,
                                 &res->mac_addr,
-                                sizeof(struct ether_addr));
+                                sizeof(struct rte_ether_addr));
 
        if (fdir_conf.mode ==  RTE_FDIR_MODE_PERFECT_TUNNEL) {
                rte_memcpy(&entry.input.flow.tunnel_flow.mac_addr,
                                 &res->mac_addr,
-                                sizeof(struct ether_addr));
+                                sizeof(struct rte_ether_addr));
                entry.input.flow.tunnel_flow.tunnel_type =
                        str2fdir_tunneltype(res->tunnel_type);
                entry.input.flow.tunnel_flow.tunnel_id =
@@ -11933,6 +12084,7 @@ flowtype_to_str(uint16_t ftype)
                {"vxlan", RTE_ETH_FLOW_VXLAN},
                {"geneve", RTE_ETH_FLOW_GENEVE},
                {"nvgre", RTE_ETH_FLOW_NVGRE},
+               {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
        };
 
        for (i = 0; i < RTE_DIM(ftype_table); i++) {
@@ -12070,7 +12222,7 @@ cmd_set_hash_global_config_parsed(void *parsed_result,
                                                        res->port_id);
        else
                printf("Global hash configurations have been set "
-                       "succcessfully by port %d\n", res->port_id);
+                       "successfully by port %d\n", res->port_id);
 }
 
 cmdline_parse_token_string_t cmd_set_hash_global_config_all =
@@ -12311,7 +12463,7 @@ struct cmd_mcast_addr_result {
        cmdline_fixed_string_t mcast_addr_cmd;
        cmdline_fixed_string_t what;
        uint16_t port_num;
-       struct ether_addr mc_addr;
+       struct rte_ether_addr mc_addr;
 };
 
 static void cmd_mcast_addr_parsed(void *parsed_result,
@@ -13730,7 +13882,7 @@ struct cmd_set_vf_mac_addr_result {
        cmdline_fixed_string_t addr;
        portid_t port_id;
        uint16_t vf_id;
-       struct ether_addr mac_addr;
+       struct rte_ether_addr mac_addr;
 
 };
 
@@ -14035,7 +14187,7 @@ struct cmd_macsec_sc_result {
        cmdline_fixed_string_t sc;
        cmdline_fixed_string_t tx_rx;
        portid_t port_id;
-       struct ether_addr mac;
+       struct rte_ether_addr mac;
        uint16_t pi;
 };
 
@@ -15034,14 +15186,19 @@ struct cmd_set_vxlan_result {
        cmdline_ipaddr_t ip_src;
        cmdline_ipaddr_t ip_dst;
        uint16_t tci;
-       struct ether_addr eth_src;
-       struct ether_addr eth_dst;
+       uint8_t tos;
+       uint8_t ttl;
+       struct rte_ether_addr eth_src;
+       struct rte_ether_addr eth_dst;
 };
 
 cmdline_parse_token_string_t cmd_set_vxlan_set =
        TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, set, "set");
 cmdline_parse_token_string_t cmd_set_vxlan_vxlan =
        TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan, "vxlan");
+cmdline_parse_token_string_t cmd_set_vxlan_vxlan_tos_ttl =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan,
+                                "vxlan-tos-ttl");
 cmdline_parse_token_string_t cmd_set_vxlan_vxlan_with_vlan =
        TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan,
                                 "vxlan-with-vlan");
@@ -15066,6 +15223,16 @@ cmdline_parse_token_string_t cmd_set_vxlan_udp_dst =
                                 "udp-dst");
 cmdline_parse_token_num_t cmd_set_vxlan_udp_dst_value =
        TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, udp_dst, UINT16);
+cmdline_parse_token_string_t cmd_set_vxlan_ip_tos =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
+                                "ip-tos");
+cmdline_parse_token_num_t cmd_set_vxlan_ip_tos_value =
+       TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, tos, UINT8);
+cmdline_parse_token_string_t cmd_set_vxlan_ip_ttl =
+       TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
+                                "ip-ttl");
+cmdline_parse_token_num_t cmd_set_vxlan_ip_ttl_value =
+       TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, ttl, UINT8);
 cmdline_parse_token_string_t cmd_set_vxlan_ip_src =
        TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
                                 "ip-src");
@@ -15104,10 +15271,15 @@ static void cmd_set_vxlan_parsed(void *parsed_result,
                .vxlan_id = rte_cpu_to_be_32(res->vni) & RTE_BE32(0x00ffffff),
        };
 
+       vxlan_encap_conf.select_tos_ttl = 0;
        if (strcmp(res->vxlan, "vxlan") == 0)
                vxlan_encap_conf.select_vlan = 0;
        else if (strcmp(res->vxlan, "vxlan-with-vlan") == 0)
                vxlan_encap_conf.select_vlan = 1;
+       else if (strcmp(res->vxlan, "vxlan-tos-ttl") == 0) {
+               vxlan_encap_conf.select_vlan = 0;
+               vxlan_encap_conf.select_tos_ttl = 1;
+       }
        if (strcmp(res->ip_version, "ipv4") == 0)
                vxlan_encap_conf.select_ipv4 = 1;
        else if (strcmp(res->ip_version, "ipv6") == 0)
@@ -15117,6 +15289,8 @@ static void cmd_set_vxlan_parsed(void *parsed_result,
        rte_memcpy(vxlan_encap_conf.vni, &id.vni[1], 3);
        vxlan_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src);
        vxlan_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst);
+       vxlan_encap_conf.ip_tos = res->tos;
+       vxlan_encap_conf.ip_ttl = res->ttl;
        if (vxlan_encap_conf.select_ipv4) {
                IPV4_ADDR_TO_UINT(res->ip_src, vxlan_encap_conf.ipv4_src);
                IPV4_ADDR_TO_UINT(res->ip_dst, vxlan_encap_conf.ipv4_dst);
@@ -15161,6 +15335,40 @@ cmdline_parse_inst_t cmd_set_vxlan = {
        },
 };
 
+cmdline_parse_inst_t cmd_set_vxlan_tos_ttl = {
+       .f = cmd_set_vxlan_parsed,
+       .data = NULL,
+       .help_str = "set vxlan-tos-ttl ip-version ipv4|ipv6 vni <vni> udp-src"
+               " <udp-src> udp-dst <udp-dst> ip-tos <ip-tos> ip-ttl <ip-ttl>"
+               " ip-src <ip-src> ip-dst <ip-dst> eth-src <eth-src>"
+               " eth-dst <eth-dst>",
+       .tokens = {
+               (void *)&cmd_set_vxlan_set,
+               (void *)&cmd_set_vxlan_vxlan_tos_ttl,
+               (void *)&cmd_set_vxlan_ip_version,
+               (void *)&cmd_set_vxlan_ip_version_value,
+               (void *)&cmd_set_vxlan_vni,
+               (void *)&cmd_set_vxlan_vni_value,
+               (void *)&cmd_set_vxlan_udp_src,
+               (void *)&cmd_set_vxlan_udp_src_value,
+               (void *)&cmd_set_vxlan_udp_dst,
+               (void *)&cmd_set_vxlan_udp_dst_value,
+               (void *)&cmd_set_vxlan_ip_tos,
+               (void *)&cmd_set_vxlan_ip_tos_value,
+               (void *)&cmd_set_vxlan_ip_ttl,
+               (void *)&cmd_set_vxlan_ip_ttl_value,
+               (void *)&cmd_set_vxlan_ip_src,
+               (void *)&cmd_set_vxlan_ip_src_value,
+               (void *)&cmd_set_vxlan_ip_dst,
+               (void *)&cmd_set_vxlan_ip_dst_value,
+               (void *)&cmd_set_vxlan_eth_src,
+               (void *)&cmd_set_vxlan_eth_src_value,
+               (void *)&cmd_set_vxlan_eth_dst,
+               (void *)&cmd_set_vxlan_eth_dst_value,
+               NULL,
+       },
+};
+
 cmdline_parse_inst_t cmd_set_vxlan_with_vlan = {
        .f = cmd_set_vxlan_parsed,
        .data = NULL,
@@ -15203,8 +15411,8 @@ struct cmd_set_nvgre_result {
        cmdline_ipaddr_t ip_src;
        cmdline_ipaddr_t ip_dst;
        uint16_t tci;
-       struct ether_addr eth_src;
-       struct ether_addr eth_dst;
+       struct rte_ether_addr eth_src;
+       struct rte_ether_addr eth_dst;
 };
 
 cmdline_parse_token_string_t cmd_set_nvgre_set =
@@ -15349,8 +15557,8 @@ struct cmd_set_l2_encap_result {
        cmdline_fixed_string_t ip_version;
        uint32_t vlan_present:1;
        uint16_t tci;
-       struct ether_addr eth_src;
-       struct ether_addr eth_dst;
+       struct rte_ether_addr eth_src;
+       struct rte_ether_addr eth_dst;
 };
 
 cmdline_parse_token_string_t cmd_set_l2_encap_set =
@@ -15506,8 +15714,8 @@ struct cmd_set_mplsogre_encap_result {
        cmdline_ipaddr_t ip_src;
        cmdline_ipaddr_t ip_dst;
        uint16_t tci;
-       struct ether_addr eth_src;
-       struct ether_addr eth_dst;
+       struct rte_ether_addr eth_src;
+       struct rte_ether_addr eth_dst;
 };
 
 cmdline_parse_token_string_t cmd_set_mplsogre_encap_set =
@@ -15567,10 +15775,9 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result,
        struct cmd_set_mplsogre_encap_result *res = parsed_result;
        union {
                uint32_t mplsogre_label;
-               uint8_t label[3];
+               uint8_t label[4];
        } id = {
-               .mplsogre_label =
-                       rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff),
+               .mplsogre_label = rte_cpu_to_be_32(res->label<<12),
        };
 
        if (strcmp(res->mplsogre, "mplsogre_encap") == 0)
@@ -15583,7 +15790,7 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result,
                mplsogre_encap_conf.select_ipv4 = 0;
        else
                return;
-       rte_memcpy(mplsogre_encap_conf.label, &id.label[1], 3);
+       rte_memcpy(mplsogre_encap_conf.label, &id.label, 3);
        if (mplsogre_encap_conf.select_ipv4) {
                IPV4_ADDR_TO_UINT(res->ip_src, mplsogre_encap_conf.ipv4_src);
                IPV4_ADDR_TO_UINT(res->ip_dst, mplsogre_encap_conf.ipv4_dst);
@@ -15731,8 +15938,8 @@ struct cmd_set_mplsoudp_encap_result {
        cmdline_ipaddr_t ip_src;
        cmdline_ipaddr_t ip_dst;
        uint16_t tci;
-       struct ether_addr eth_src;
-       struct ether_addr eth_dst;
+       struct rte_ether_addr eth_src;
+       struct rte_ether_addr eth_dst;
 };
 
 cmdline_parse_token_string_t cmd_set_mplsoudp_encap_set =
@@ -15804,10 +16011,9 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result,
        struct cmd_set_mplsoudp_encap_result *res = parsed_result;
        union {
                uint32_t mplsoudp_label;
-               uint8_t label[3];
+               uint8_t label[4];
        } id = {
-               .mplsoudp_label =
-                       rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff),
+               .mplsoudp_label = rte_cpu_to_be_32(res->label<<12),
        };
 
        if (strcmp(res->mplsoudp, "mplsoudp_encap") == 0)
@@ -15820,7 +16026,7 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result,
                mplsoudp_encap_conf.select_ipv4 = 0;
        else
                return;
-       rte_memcpy(mplsoudp_encap_conf.label, &id.label[1], 3);
+       rte_memcpy(mplsoudp_encap_conf.label, &id.label, 3);
        mplsoudp_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src);
        mplsoudp_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst);
        if (mplsoudp_encap_conf.select_ipv4) {
@@ -17627,7 +17833,7 @@ print_rx_offloads(uint64_t offloads)
        begin = __builtin_ctzll(offloads);
        end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-       single_offload = 1 << begin;
+       single_offload = 1ULL << begin;
        for (bit = begin; bit < end; bit++) {
                if (offloads & single_offload)
                        printf(" %s",
@@ -18021,7 +18227,7 @@ print_tx_offloads(uint64_t offloads)
        begin = __builtin_ctzll(offloads);
        end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-       single_offload = 1 << begin;
+       single_offload = 1ULL << begin;
        for (bit = begin; bit < end; bit++) {
                if (offloads & single_offload)
                        printf(" %s",
@@ -18198,13 +18404,13 @@ search_tx_offload(const char *name)
        single_offload = 1;
        for (bit = 0; bit < sizeof(single_offload) * CHAR_BIT; bit++) {
                single_name = rte_eth_dev_tx_offload_name(single_offload);
+               if (single_name == NULL)
+                       break;
                if (!strcasecmp(single_name, name)) {
                        found = 1;
                        break;
                } else if (!strcasecmp(single_name, "UNKNOWN"))
                        break;
-               else if (single_name == NULL)
-                       break;
                single_offload <<= 1;
        }
 
@@ -18457,7 +18663,7 @@ cmd_show_tx_metadata_parsed(void *parsed_result,
        }
        if (!strcmp(res->cmd_keyword, "tx_metadata")) {
                printf("Port %u tx_metadata: %u\n", res->cmd_pid,
-                               ports[res->cmd_pid].tx_metadata);
+                       rte_be_to_cpu_32(ports[res->cmd_pid].tx_metadata));
        }
 }
 
@@ -18499,6 +18705,7 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_showqueue,
        (cmdline_parse_inst_t *)&cmd_showportall,
        (cmdline_parse_inst_t *)&cmd_showcfg,
+       (cmdline_parse_inst_t *)&cmd_showfwdall,
        (cmdline_parse_inst_t *)&cmd_start,
        (cmdline_parse_inst_t *)&cmd_start_tx_first,
        (cmdline_parse_inst_t *)&cmd_start_tx_first_n,
@@ -18698,6 +18905,7 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_set_port_tm_hierarchy_default,
 #endif
        (cmdline_parse_inst_t *)&cmd_set_vxlan,
+       (cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
        (cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
        (cmdline_parse_inst_t *)&cmd_set_nvgre,
        (cmdline_parse_inst_t *)&cmd_set_nvgre_with_vlan,