X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fcmdline.c;h=d1e0d4402c94d24053005687bad217a19cc3efdf;hb=35b2d13fd6fdcbd191f2a30d74648faeb1186c65;hp=0558bc58a818fcf33626fa02ed151f27c7bf10ee;hpb=b7ed955a20eee5979eaecc9fab500a176e2741c5;p=dpdk.git diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 0558bc58a8..d1e0d4402c 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -93,14 +93,15 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result, cl, "\n" "Help is available for the following sections:\n\n" - " help control : Start and stop forwarding.\n" - " help display : Displaying port, stats and config " + " help control : Start and stop forwarding.\n" + " help display : Displaying port, stats and config " "information.\n" - " help config : Configuration information.\n" - " help ports : Configuring ports.\n" - " help registers : Reading and setting port registers.\n" - " help filters : Filters configuration help.\n" - " help all : All of the above sections.\n\n" + " help config : Configuration information.\n" + " help ports : Configuring ports.\n" + " help registers : Reading and setting port registers.\n" + " help filters : Filters configuration help.\n" + " help traffic_management : Traffic Management commmands.\n" + " help all : All of the above sections.\n\n" ); } @@ -209,26 +210,32 @@ static void cmd_help_long_parsed(void *parsed_result, "show port meter stats (port_id) (meter_id) (clear)\n" " Get meter stats on a port\n\n" - "show port tm cap (port_id)\n" - " Display the port TM capability.\n\n" - - "show port tm level cap (port_id) (level_id)\n" - " Display the port TM hierarchical level capability.\n\n" - - "show port tm node cap (port_id) (node_id)\n" - " Display the port TM node capability.\n\n" - - "show port tm node type (port_id) (node_id)\n" - " Display the port TM node type.\n\n" - - "show port tm node stats (port_id) (node_id) (clear)\n" - " Display the port TM node stats.\n\n" "show fwd stats all\n" " Display statistics for all fwd engines.\n\n" "clear fwd stats all\n" " Clear statistics for all fwd engines.\n\n" + + "show port (port_id) rx_offload capabilities\n" + " List all per queue and per port Rx offloading" + " capabilities of a port\n\n" + + "show port (port_id) rx_offload configuration\n" + " List port level and all queue level" + " Rx offloading configuration\n\n" + + "show port (port_id) tx_offload capabilities\n" + " List all per queue and per port" + " Tx offloading capabilities of a port\n\n" + + "show port (port_id) tx_offload configuration\n" + " List port level and all queue level" + " Tx offloading configuration\n\n" + + "show port (port_id) tx_metadata\n" + " Show Tx metadata value set" + " for a specific port\n\n" ); } @@ -646,11 +653,6 @@ static void cmd_help_long_parsed(void *parsed_result, "E-tag set filter del e-tag-id (value) port (port_id)\n" " Delete an E-tag forwarding filter on a port\n\n" -#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED - "set port tm hierarchy default (port_id)\n" - " Set default traffic Management hierarchy on a port\n\n" - -#endif "ddp add (port_id) (profile_path[,backup_profile_path])\n" " Load a profile package on a port\n\n" @@ -731,62 +733,6 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) queue-region\n" " show all queue region related configuration info\n\n" - "add port tm node shaper profile (port_id) (shaper_profile_id)" - " (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)" - " (packet_length_adjust)\n" - " Add port tm node private shaper profile.\n\n" - - "del port tm node shaper profile (port_id) (shaper_profile_id)\n" - " Delete port tm node private shaper profile.\n\n" - - "add port tm node shared shaper (port_id) (shared_shaper_id)" - " (shaper_profile_id)\n" - " Add/update port tm node shared shaper.\n\n" - - "del port tm node shared shaper (port_id) (shared_shaper_id)\n" - " Delete port tm node shared shaper.\n\n" - - "set port tm node shaper profile (port_id) (node_id)" - " (shaper_profile_id)\n" - " Set port tm node shaper profile.\n\n" - - "add port tm node wred profile (port_id) (wred_profile_id)" - " (color_g) (min_th_g) (max_th_g) (maxp_inv_g) (wq_log2_g)" - " (color_y) (min_th_y) (max_th_y) (maxp_inv_y) (wq_log2_y)" - " (color_r) (min_th_r) (max_th_r) (maxp_inv_r) (wq_log2_r)\n" - " Add port tm node wred profile.\n\n" - - "del port tm node wred profile (port_id) (wred_profile_id)\n" - " Delete port tm node wred profile.\n\n" - - "add port tm nonleaf node (port_id) (node_id) (parent_node_id)" - " (priority) (weight) (level_id) (shaper_profile_id)" - " (n_sp_priorities) (stats_mask) (n_shared_shapers)" - " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" - " Add port tm nonleaf node.\n\n" - - "add port tm leaf node (port_id) (node_id) (parent_node_id)" - " (priority) (weight) (level_id) (shaper_profile_id)" - " (cman_mode) (wred_profile_id) (stats_mask) (n_shared_shapers)" - " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" - " Add port tm leaf node.\n\n" - - "del port tm node (port_id) (node_id)\n" - " Delete port tm node.\n\n" - - "set port tm node parent (port_id) (node_id) (parent_node_id)" - " (priority) (weight)\n" - " Set port tm node parent.\n\n" - - "suspend port tm node (port_id) (node_id)" - " Suspend tm node.\n\n" - - "resume port tm node (port_id) (node_id)" - " Resume tm node.\n\n" - - "port tm hierarchy commit (port_id) (clean_on_fail)\n" - " Commit tm hierarchy.\n\n" - "vxlan ip-version (ipv4|ipv6) vni (vni) udp-src" " (udp-src) udp-dst (udp-dst) ip-src (ip-src) ip-dst" " (ip-dst) eth-src (eth-src) eth-dst (eth-dst)\n" @@ -928,6 +874,52 @@ static void cmd_help_long_parsed(void *parsed_result, "port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port)\n\n" " Add/remove UDP tunnel port for tunneling offload\n\n" + + "port config rx_offload vlan_strip|" + "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|" + "outer_ipv4_cksum|macsec_strip|header_split|" + "vlan_filter|vlan_extend|jumbo_frame|crc_strip|" + "scatter|timestamp|security|keep_crc on|off\n" + " Enable or disable a per port Rx offloading" + " on all Rx queues of a port\n\n" + + "port (port_id) rxq (queue_id) rx_offload vlan_strip|" + "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|" + "outer_ipv4_cksum|macsec_strip|header_split|" + "vlan_filter|vlan_extend|jumbo_frame|crc_strip|" + "scatter|timestamp|security|keep_crc on|off\n" + " Enable or disable a per queue Rx offloading" + " only on a specific Rx queue\n\n" + + "port config (port_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|sctp_cksum|tcp_tso|" + "udp_tso|outer_ipv4_cksum|qinq_insert|vxlan_tnl_tso|" + "gre_tnl_tso|ipip_tnl_tso|geneve_tnl_tso|" + "macsec_insert|mt_lockfree|multi_segs|mbuf_fast_free|" + "security|match_metadata on|off\n" + " Enable or disable a per port Tx offloading" + " on all Tx queues of a port\n\n" + + "port (port_id) txq (queue_id) tx_offload vlan_insert|" + "ipv4_cksum|udp_cksum|tcp_cksum|sctp_cksum|tcp_tso|" + "udp_tso|outer_ipv4_cksum|qinq_insert|vxlan_tnl_tso|" + "gre_tnl_tso|ipip_tnl_tso|geneve_tnl_tso|macsec_insert" + "|mt_lockfree|multi_segs|mbuf_fast_free|security" + " on|off\n" + " Enable or disable a per queue Tx offloading" + " only on a specific Tx queue\n\n" + + "bpf-load rx|tx (port) (queue) (J|M|B) (file_name)\n" + " Load an eBPF program as a callback" + " for particular RX/TX queue\n\n" + + "bpf-unload rx|tx (port) (queue)\n" + " Unload previously loaded eBPF program" + " for particular RX/TX queue\n\n" + + "port config (port_id) tx_metadata (value)\n" + " Set Tx metadata value per port. Testpmd will add this value" + " to any Tx packet sent from this port\n\n" ); } @@ -1147,6 +1139,107 @@ static void cmd_help_long_parsed(void *parsed_result, " flow rules\n\n" ); } + + if (show_all || !strcmp(res->section, "traffic_management")) { + cmdline_printf( + cl, + "\n" + "Traffic Management:\n" + "--------------\n" + "show port tm cap (port_id)\n" + " Display the port TM capability.\n\n" + + "show port tm level cap (port_id) (level_id)\n" + " Display the port TM hierarchical level capability.\n\n" + + "show port tm node cap (port_id) (node_id)\n" + " Display the port TM node capability.\n\n" + + "show port tm node type (port_id) (node_id)\n" + " Display the port TM node type.\n\n" + + "show port tm node stats (port_id) (node_id) (clear)\n" + " Display the port TM node stats.\n\n" + +#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED + "set port tm hierarchy default (port_id)\n" + " Set default traffic Management hierarchy on a port\n\n" +#endif + + "add port tm node shaper profile (port_id) (shaper_profile_id)" + " (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)" + " (packet_length_adjust)\n" + " Add port tm node private shaper profile.\n\n" + + "del port tm node shaper profile (port_id) (shaper_profile_id)\n" + " Delete port tm node private shaper profile.\n\n" + + "add port tm node shared shaper (port_id) (shared_shaper_id)" + " (shaper_profile_id)\n" + " Add/update port tm node shared shaper.\n\n" + + "del port tm node shared shaper (port_id) (shared_shaper_id)\n" + " Delete port tm node shared shaper.\n\n" + + "set port tm node shaper profile (port_id) (node_id)" + " (shaper_profile_id)\n" + " Set port tm node shaper profile.\n\n" + + "add port tm node wred profile (port_id) (wred_profile_id)" + " (color_g) (min_th_g) (max_th_g) (maxp_inv_g) (wq_log2_g)" + " (color_y) (min_th_y) (max_th_y) (maxp_inv_y) (wq_log2_y)" + " (color_r) (min_th_r) (max_th_r) (maxp_inv_r) (wq_log2_r)\n" + " Add port tm node wred profile.\n\n" + + "del port tm node wred profile (port_id) (wred_profile_id)\n" + " Delete port tm node wred profile.\n\n" + + "add port tm nonleaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (n_sp_priorities) (stats_mask) (n_shared_shapers)" + " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" + " Add port tm nonleaf node.\n\n" + + "add port tm leaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (cman_mode) (wred_profile_id) (stats_mask) (n_shared_shapers)" + " [(shared_shaper_id_0) (shared_shaper_id_1)...]\n" + " Add port tm leaf node.\n\n" + + "del port tm node (port_id) (node_id)\n" + " Delete port tm node.\n\n" + + "set port tm node parent (port_id) (node_id) (parent_node_id)" + " (priority) (weight)\n" + " Set port tm node parent.\n\n" + + "suspend port tm node (port_id) (node_id)" + " Suspend tm node.\n\n" + + "resume port tm node (port_id) (node_id)" + " Resume tm node.\n\n" + + "port tm hierarchy commit (port_id) (clean_on_fail)\n" + " Commit tm hierarchy.\n\n" + + "set port tm mark ip_ecn (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " for IP ECN (Explicit Congestion Notification)" + " packets on a given port\n\n" + + "set port tm mark ip_dscp (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " on the port for IP dscp packets\n\n" + + "set port tm mark vlan_dei (port) (green) (yellow)" + " (red)\n" + " Enables/Disables the traffic management marking" + " on the port for VLAN packets with DEI enabled\n\n" + ); + } + } cmdline_parse_token_string_t cmd_help_long_help = @@ -1155,12 +1248,13 @@ cmdline_parse_token_string_t cmd_help_long_help = cmdline_parse_token_string_t cmd_help_long_section = TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section, "all#control#display#config#" - "ports#registers#filters"); + "ports#registers#filters#traffic_management"); cmdline_parse_inst_t cmd_help_long = { .f = cmd_help_long_parsed, .data = NULL, - .help_str = "help all|control|display|config|ports|register|filters: " + .help_str = "help all|control|display|config|ports|register|" + "filters|traffic_management: " "Show help", .tokens = { (void *)&cmd_help_long_help, @@ -1439,17 +1533,17 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) return -1; } if (!strcmp(speedstr, "1000")) { - *speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_1G; } else if (!strcmp(speedstr, "10000")) { - *speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_10G; } else if (!strcmp(speedstr, "25000")) { - *speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_25G; } else if (!strcmp(speedstr, "40000")) { - *speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_40G; } else if (!strcmp(speedstr, "50000")) { - *speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_50G; } else if (!strcmp(speedstr, "100000")) { - *speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED; + *speed = ETH_LINK_SPEED_100G; } else if (!strcmp(speedstr, "auto")) { *speed = ETH_LINK_SPEED_AUTONEG; } else { @@ -1831,16 +1925,16 @@ cmd_config_max_pkt_len_parsed(void *parsed_result, uint64_t rx_offloads = port->dev_conf.rxmode.offloads; if (!strcmp(res->name, "max-pkt-len")) { - if (res->value < ETHER_MIN_LEN) { + if (res->value < RTE_ETHER_MIN_LEN) { printf("max-pkt-len can not be less than %d\n", - ETHER_MIN_LEN); + RTE_ETHER_MIN_LEN); return; } if (res->value == port->dev_conf.rxmode.max_rx_pkt_len) return; port->dev_conf.rxmode.max_rx_pkt_len = res->value; - if (res->value > ETHER_MAX_LEN) + if (res->value > RTE_ETHER_MAX_LEN) rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; else rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; @@ -1902,8 +1996,8 @@ cmd_config_mtu_parsed(void *parsed_result, { struct cmd_config_mtu_result *res = parsed_result; - if (res->value < ETHER_MIN_LEN) { - printf("mtu cannot be less than %d\n", ETHER_MIN_LEN); + if (res->value < RTE_ETHER_MIN_LEN) { + printf("mtu cannot be less than %d\n", RTE_ETHER_MIN_LEN); return; } port_mtu_set(res->port_id, res->value); @@ -6030,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, @@ -7803,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, @@ -8002,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; }; @@ -8126,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; }; @@ -8142,7 +8236,7 @@ cmd_set_vf_macvlan_parsed(void *parsed_result, memset(&filter, 0, sizeof(struct rte_eth_mac_filter)); - rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN); + rte_memcpy(&filter.mac_addr, &res->address, RTE_ETHER_ADDR_LEN); /* set VF MAC filter */ filter.is_vf = 1; @@ -8385,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, @@ -8698,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; @@ -8719,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) { @@ -9116,7 +9210,7 @@ cmd_set_mirror_mask_parsed(void *parsed_result, return; for (i = 0; i < nb_item; i++) { - if (vlan_list[i] > ETHER_MAX_VLAN_ID) { + if (vlan_list[i] > RTE_ETHER_MAX_VLAN_ID) { printf("Invalid vlan_id: must be < 4096\n"); return; } @@ -10489,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; @@ -10549,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; @@ -10628,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; @@ -10931,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 = @@ -12369,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, @@ -12378,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], @@ -13788,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; }; @@ -14093,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; }; @@ -15094,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 = @@ -15207,9 +15301,9 @@ static void cmd_set_vxlan_parsed(void *parsed_result, if (vxlan_encap_conf.select_vlan) vxlan_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); rte_memcpy(vxlan_encap_conf.eth_src, res->eth_src.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(vxlan_encap_conf.eth_dst, res->eth_dst.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); } cmdline_parse_inst_t cmd_set_vxlan = { @@ -15317,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 = @@ -15398,9 +15492,9 @@ static void cmd_set_nvgre_parsed(void *parsed_result, if (nvgre_encap_conf.select_vlan) nvgre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); rte_memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); } cmdline_parse_inst_t cmd_set_nvgre = { @@ -15463,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 = @@ -15515,9 +15609,9 @@ static void cmd_set_l2_encap_parsed(void *parsed_result, if (l2_encap_conf.select_vlan) l2_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); rte_memcpy(l2_encap_conf.eth_src, res->eth_src.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(l2_encap_conf.eth_dst, res->eth_dst.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); } cmdline_parse_inst_t cmd_set_l2_encap = { @@ -15620,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 = @@ -15707,9 +15801,9 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result, if (mplsogre_encap_conf.select_vlan) mplsogre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); rte_memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); } cmdline_parse_inst_t cmd_set_mplsogre_encap = { @@ -15844,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 = @@ -15945,9 +16039,9 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, if (mplsoudp_encap_conf.select_vlan) mplsoudp_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); rte_memcpy(mplsoudp_encap_conf.eth_src, res->eth_src.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(mplsoudp_encap_conf.eth_dst, res->eth_dst.addr_bytes, - ETHER_ADDR_LEN); + RTE_ETHER_ADDR_LEN); } cmdline_parse_inst_t cmd_set_mplsoudp_encap = { @@ -17739,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", @@ -18133,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", @@ -18310,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; }