X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fcmdline.c;h=1fb609940e46d152cbada63257a32150a2d4a8e1;hb=538da7a1cad25fbdffe298c8ca76fc4dbd262d1b;hp=ee50e456637441b8bc09408d938f19d260435913;hpb=53324971a14e02f5f710d6e73fe475650e9a9802;p=dpdk.git diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index ee50e45663..1fb609940e 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -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,26 +210,32 @@ static void cmd_help_long_parsed(void *parsed_result, "show port meter stats (port_id) (meter_id) (clear)\n" " Get meter stats on a port\n\n" - "show port tm cap (port_id)\n" - " Display the port TM capability.\n\n" - - "show port tm level cap (port_id) (level_id)\n" - " Display the port TM hierarchical level capability.\n\n" - - "show port tm node cap (port_id) (node_id)\n" - " Display the port TM node capability.\n\n" - - "show port tm node type (port_id) (node_id)\n" - " Display the port TM node type.\n\n" - - "show port tm node stats (port_id) (node_id) (clear)\n" - " Display the port TM node stats.\n\n" "show fwd stats all\n" " Display statistics for all fwd engines.\n\n" "clear fwd stats all\n" " Clear statistics for all fwd engines.\n\n" + + "show port (port_id) rx_offload capabilities\n" + " List all per queue and per port Rx offloading" + " capabilities of a port\n\n" + + "show port (port_id) rx_offload configuration\n" + " List port level and all queue level" + " Rx offloading configuration\n\n" + + "show port (port_id) tx_offload capabilities\n" + " List all per queue and per port" + " Tx offloading capabilities of a port\n\n" + + "show port (port_id) tx_offload configuration\n" + " List port level and all queue level" + " Tx offloading configuration\n\n" + + "show port (port_id) tx_metadata\n" + " Show Tx metadata value set" + " for a specific port\n\n" ); } @@ -376,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" @@ -647,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" @@ -732,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" @@ -863,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|)\n" + "ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|)\n" " Set the RSS mode.\n\n" "port config port-id rss reta (hash,queue)[,(hash,queue)]\n" @@ -929,6 +874,52 @@ static void cmd_help_long_parsed(void *parsed_result, "port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port)\n\n" " Add/remove UDP tunnel port for tunneling offload\n\n" + + "port config rx_offload vlan_strip|" + "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|" + "outer_ipv4_cksum|macsec_strip|header_split|" + "vlan_filter|vlan_extend|jumbo_frame|crc_strip|" + "scatter|timestamp|security|keep_crc on|off\n" + " Enable or disable a per port Rx offloading" + " on all Rx queues of a port\n\n" + + "port (port_id) rxq (queue_id) rx_offload vlan_strip|" + "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|" + "outer_ipv4_cksum|macsec_strip|header_split|" + "vlan_filter|vlan_extend|jumbo_frame|crc_strip|" + "scatter|timestamp|security|keep_crc on|off\n" + " Enable or disable a per queue Rx offloading" + " only on a specific Rx queue\n\n" + + "port config (port_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|sctp_cksum|tcp_tso|" + "udp_tso|outer_ipv4_cksum|qinq_insert|vxlan_tnl_tso|" + "gre_tnl_tso|ipip_tnl_tso|geneve_tnl_tso|" + "macsec_insert|mt_lockfree|multi_segs|mbuf_fast_free|" + "security|match_metadata on|off\n" + " Enable or disable a per port Tx offloading" + " on all Tx queues of a port\n\n" + + "port (port_id) txq (queue_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|sctp_cksum|tcp_tso|" + "udp_tso|outer_ipv4_cksum|qinq_insert|vxlan_tnl_tso|" + "gre_tnl_tso|ipip_tnl_tso|geneve_tnl_tso|macsec_insert" + "|mt_lockfree|multi_segs|mbuf_fast_free|security" + " on|off\n" + " Enable or disable a per queue Tx offloading" + " only on a specific Tx queue\n\n" + + "bpf-load rx|tx (port) (queue) (J|M|B) (file_name)\n" + " Load an eBPF program as a callback" + " for particular RX/TX queue\n\n" + + "bpf-unload rx|tx (port) (queue)\n" + " Unload previously loaded eBPF program" + " for particular RX/TX queue\n\n" + + "port config (port_id) tx_metadata (value)\n" + " Set Tx metadata value per port. Testpmd will add this value" + " to any Tx packet sent from this port\n\n" ); } @@ -1148,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 = @@ -1156,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, @@ -2190,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|", + "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword, @@ -6031,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, @@ -7804,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, @@ -8003,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; }; @@ -8127,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; }; @@ -8386,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, @@ -8699,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; @@ -8720,8 +8813,8 @@ cmd_tunnel_filter_parsed(void *parsed_result, memset(&tunnel_filter_conf, 0, sizeof(tunnel_filter_conf)); - ether_addr_copy(&res->outer_mac, &tunnel_filter_conf.outer_mac); - ether_addr_copy(&res->inner_mac, &tunnel_filter_conf.inner_mac); + rte_ether_addr_copy(&res->outer_mac, &tunnel_filter_conf.outer_mac); + rte_ether_addr_copy(&res->inner_mac, &tunnel_filter_conf.inner_mac); tunnel_filter_conf.inner_vlan = res->inner_vlan; if (res->ip_value.family == AF_INET) { @@ -8758,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")) @@ -8807,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, @@ -8931,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; @@ -8965,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); @@ -8973,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 udp_tunnel_port add|rm vxlan|geneve ", + .help_str = "port config udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe ", .tokens = { (void *)&cmd_config_tunnel_udp_port_port, (void *)&cmd_config_tunnel_udp_port_config, @@ -10486,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; @@ -10546,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; @@ -10625,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; @@ -10928,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 = @@ -11987,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++) { @@ -12365,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, @@ -12374,7 +12472,7 @@ static void cmd_mcast_addr_parsed(void *parsed_result, { struct cmd_mcast_addr_result *res = parsed_result; - if (!is_multicast_ether_addr(&res->mc_addr)) { + if (!rte_is_multicast_ether_addr(&res->mc_addr)) { printf("Invalid multicast addr %02X:%02X:%02X:%02X:%02X:%02X\n", res->mc_addr.addr_bytes[0], res->mc_addr.addr_bytes[1], res->mc_addr.addr_bytes[2], res->mc_addr.addr_bytes[3], @@ -13784,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; }; @@ -14089,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; }; @@ -15090,8 +15188,8 @@ struct cmd_set_vxlan_result { uint16_t tci; uint8_t tos; uint8_t ttl; - 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_vxlan_set = @@ -15313,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 = @@ -15459,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 = @@ -15616,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 = @@ -15840,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 = @@ -17735,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", @@ -18129,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", @@ -18306,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; }