34 #ifndef _RTE_ETHDEV_H_ 35 #define _RTE_ETHDEV_H_ 176 #define RTE_ETHDEV_HAS_LRO_SUPPORT 184 #include <rte_config.h> 188 #include "rte_dev_info.h" 225 #define ETH_LINK_SPEED_AUTONEG (0 << 0) 226 #define ETH_LINK_SPEED_FIXED (1 << 0) 227 #define ETH_LINK_SPEED_10M_HD (1 << 1) 228 #define ETH_LINK_SPEED_10M (1 << 2) 229 #define ETH_LINK_SPEED_100M_HD (1 << 3) 230 #define ETH_LINK_SPEED_100M (1 << 4) 231 #define ETH_LINK_SPEED_1G (1 << 5) 232 #define ETH_LINK_SPEED_2_5G (1 << 6) 233 #define ETH_LINK_SPEED_5G (1 << 7) 234 #define ETH_LINK_SPEED_10G (1 << 8) 235 #define ETH_LINK_SPEED_20G (1 << 9) 236 #define ETH_LINK_SPEED_25G (1 << 10) 237 #define ETH_LINK_SPEED_40G (1 << 11) 238 #define ETH_LINK_SPEED_50G (1 << 12) 239 #define ETH_LINK_SPEED_56G (1 << 13) 240 #define ETH_LINK_SPEED_100G (1 << 14) 245 #define ETH_SPEED_NUM_NONE 0 246 #define ETH_SPEED_NUM_10M 10 247 #define ETH_SPEED_NUM_100M 100 248 #define ETH_SPEED_NUM_1G 1000 249 #define ETH_SPEED_NUM_2_5G 2500 250 #define ETH_SPEED_NUM_5G 5000 251 #define ETH_SPEED_NUM_10G 10000 252 #define ETH_SPEED_NUM_20G 20000 253 #define ETH_SPEED_NUM_25G 25000 254 #define ETH_SPEED_NUM_40G 40000 255 #define ETH_SPEED_NUM_50G 50000 256 #define ETH_SPEED_NUM_56G 56000 257 #define ETH_SPEED_NUM_100G 100000 268 } __attribute__((aligned(8)));
271 #define ETH_LINK_HALF_DUPLEX 0 272 #define ETH_LINK_FULL_DUPLEX 1 273 #define ETH_LINK_DOWN 0 274 #define ETH_LINK_UP 1 275 #define ETH_LINK_FIXED 0 276 #define ETH_LINK_AUTONEG 1 282 struct rte_eth_thresh { 291 #define ETH_MQ_RX_RSS_FLAG 0x1 292 #define ETH_MQ_RX_DCB_FLAG 0x2 293 #define ETH_MQ_RX_VMDQ_FLAG 0x4 324 #define ETH_RSS ETH_MQ_RX_RSS 325 #define VMDQ_DCB ETH_MQ_RX_VMDQ_DCB 326 #define ETH_DCB_RX ETH_MQ_RX_DCB 342 #define ETH_DCB_NONE ETH_MQ_TX_NONE 343 #define ETH_VMDQ_DCB_TX ETH_MQ_TX_VMDQ_DCB 344 #define ETH_DCB_TX ETH_MQ_TX_DCB 366 uint16_t header_split : 1,
386 ignore_offload_bitfield : 1;
394 ETH_VLAN_TYPE_UNKNOWN = 0,
437 #define ETH_RSS_IPV4 (1ULL << RTE_ETH_FLOW_IPV4) 438 #define ETH_RSS_FRAG_IPV4 (1ULL << RTE_ETH_FLOW_FRAG_IPV4) 439 #define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_TCP) 440 #define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_UDP) 441 #define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) 442 #define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) 443 #define ETH_RSS_IPV6 (1ULL << RTE_ETH_FLOW_IPV6) 444 #define ETH_RSS_FRAG_IPV6 (1ULL << RTE_ETH_FLOW_FRAG_IPV6) 445 #define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_TCP) 446 #define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_UDP) 447 #define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) 448 #define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_OTHER) 449 #define ETH_RSS_L2_PAYLOAD (1ULL << RTE_ETH_FLOW_L2_PAYLOAD) 450 #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX) 451 #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX) 452 #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX) 453 #define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT) 454 #define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN) 455 #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE) 456 #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE) 458 #define ETH_RSS_IP ( \ 460 ETH_RSS_FRAG_IPV4 | \ 461 ETH_RSS_NONFRAG_IPV4_OTHER | \ 463 ETH_RSS_FRAG_IPV6 | \ 464 ETH_RSS_NONFRAG_IPV6_OTHER | \ 467 #define ETH_RSS_UDP ( \ 468 ETH_RSS_NONFRAG_IPV4_UDP | \ 469 ETH_RSS_NONFRAG_IPV6_UDP | \ 472 #define ETH_RSS_TCP ( \ 473 ETH_RSS_NONFRAG_IPV4_TCP | \ 474 ETH_RSS_NONFRAG_IPV6_TCP | \ 477 #define ETH_RSS_SCTP ( \ 478 ETH_RSS_NONFRAG_IPV4_SCTP | \ 479 ETH_RSS_NONFRAG_IPV6_SCTP) 481 #define ETH_RSS_TUNNEL ( \ 488 #define ETH_RSS_PROTO_MASK ( \ 490 ETH_RSS_FRAG_IPV4 | \ 491 ETH_RSS_NONFRAG_IPV4_TCP | \ 492 ETH_RSS_NONFRAG_IPV4_UDP | \ 493 ETH_RSS_NONFRAG_IPV4_SCTP | \ 494 ETH_RSS_NONFRAG_IPV4_OTHER | \ 496 ETH_RSS_FRAG_IPV6 | \ 497 ETH_RSS_NONFRAG_IPV6_TCP | \ 498 ETH_RSS_NONFRAG_IPV6_UDP | \ 499 ETH_RSS_NONFRAG_IPV6_SCTP | \ 500 ETH_RSS_NONFRAG_IPV6_OTHER | \ 501 ETH_RSS_L2_PAYLOAD | \ 503 ETH_RSS_IPV6_TCP_EX | \ 504 ETH_RSS_IPV6_UDP_EX | \ 515 #define ETH_RSS_RETA_SIZE_64 64 516 #define ETH_RSS_RETA_SIZE_128 128 517 #define ETH_RSS_RETA_SIZE_256 256 518 #define ETH_RSS_RETA_SIZE_512 512 519 #define RTE_RETA_GROUP_SIZE 64 522 #define ETH_VMDQ_MAX_VLAN_FILTERS 64 523 #define ETH_DCB_NUM_USER_PRIORITIES 8 524 #define ETH_VMDQ_DCB_NUM_QUEUES 128 525 #define ETH_DCB_NUM_QUEUES 128 528 #define ETH_DCB_PG_SUPPORT 0x00000001 529 #define ETH_DCB_PFC_SUPPORT 0x00000002 532 #define ETH_VLAN_STRIP_OFFLOAD 0x0001 533 #define ETH_VLAN_FILTER_OFFLOAD 0x0002 534 #define ETH_VLAN_EXTEND_OFFLOAD 0x0004 537 #define ETH_VLAN_STRIP_MASK 0x0001 538 #define ETH_VLAN_FILTER_MASK 0x0002 539 #define ETH_VLAN_EXTEND_MASK 0x0004 540 #define ETH_VLAN_ID_MAX 0x0FFF 543 #define ETH_NUM_RECEIVE_MAC_ADDR 128 546 #define ETH_VMDQ_NUM_UC_HASH_ARRAY 128 549 #define ETH_VMDQ_ACCEPT_UNTAG 0x0001 550 #define ETH_VMDQ_ACCEPT_HASH_MC 0x0002 551 #define ETH_VMDQ_ACCEPT_HASH_UC 0x0004 552 #define ETH_VMDQ_ACCEPT_BROADCAST 0x0008 553 #define ETH_VMDQ_ACCEPT_MULTICAST 0x0010 556 #define ETH_MIRROR_MAX_VLANS 64 558 #define ETH_MIRROR_VIRTUAL_POOL_UP 0x01 559 #define ETH_MIRROR_UPLINK_PORT 0x02 560 #define ETH_MIRROR_DOWNLINK_PORT 0x04 561 #define ETH_MIRROR_VLAN 0x08 562 #define ETH_MIRROR_VIRTUAL_POOL_DOWN 0x10 567 struct rte_eth_vlan_mirror { 593 uint16_t reta[RTE_RETA_GROUP_SIZE];
618 struct rte_eth_dcb_rx_conf {
624 struct rte_eth_vmdq_dcb_tx_conf {
630 struct rte_eth_dcb_tx_conf {
636 struct rte_eth_vmdq_tx_conf {
710 uint8_t hw_vlan_reject_tagged : 1,
712 hw_vlan_reject_untagged : 1,
714 hw_vlan_insert_pvid : 1;
734 #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 735 #define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 736 #define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 737 #define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 738 #define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 739 #define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400 740 #define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800 741 #define ETH_TXQ_FLAGS_NOOFFLOADS \ 742 (ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \ 743 ETH_TXQ_FLAGS_NOXSUMUDP | ETH_TXQ_FLAGS_NOXSUMTCP) 744 #define ETH_TXQ_FLAGS_NOXSUMS \ 745 (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \ 746 ETH_TXQ_FLAGS_NOXSUMTCP) 754 #define ETH_TXQ_FLAGS_IGNORE 0x8000 926 struct rte_eth_dcb_rx_conf dcb_rx_conf;
932 struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
934 struct rte_eth_dcb_tx_conf dcb_tx_conf;
936 struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
955 #define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001 956 #define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002 957 #define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004 958 #define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008 959 #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010 960 #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020 961 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040 962 #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080 963 #define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100 964 #define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200 965 #define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400 966 #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 967 #define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000 968 #define DEV_RX_OFFLOAD_SCATTER 0x00002000 969 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 970 #define DEV_RX_OFFLOAD_SECURITY 0x00008000 971 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ 972 DEV_RX_OFFLOAD_UDP_CKSUM | \ 973 DEV_RX_OFFLOAD_TCP_CKSUM) 974 #define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \ 975 DEV_RX_OFFLOAD_VLAN_FILTER | \ 976 DEV_RX_OFFLOAD_VLAN_EXTEND) 981 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001 982 #define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002 983 #define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004 984 #define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008 985 #define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010 986 #define DEV_TX_OFFLOAD_TCP_TSO 0x00000020 987 #define DEV_TX_OFFLOAD_UDP_TSO 0x00000040 988 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080 989 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100 990 #define DEV_TX_OFFLOAD_VXLAN_TNL_TSO 0x00000200 991 #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400 992 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800 993 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000 994 #define DEV_TX_OFFLOAD_MACSEC_INSERT 0x00002000 995 #define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000 999 #define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000 1001 #define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000 1006 #define DEV_TX_OFFLOAD_SECURITY 0x00020000 1008 struct rte_pci_device;
1023 uint32_t max_hash_mac_addrs;
1074 #define RTE_ETH_XSTATS_NAME_SIZE 64 1101 #define ETH_DCB_NUM_TCS 8 1102 #define ETH_MAX_VMDQ_POOL 64 1113 } tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1118 } tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1128 uint8_t tc_bws[ETH_DCB_NUM_TCS];
1136 #define RTE_ETH_QUEUE_STATE_STOPPED 0 1137 #define RTE_ETH_QUEUE_STATE_STARTED 1 1141 struct rte_eth_dev_callback;
1143 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
1146 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ 1147 if (!rte_eth_dev_is_valid_port(port_id)) { \ 1148 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ 1153 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \ 1154 if (!rte_eth_dev_is_valid_port(port_id)) { \ 1155 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ 1165 #define ETH_L2_TUNNEL_ENABLE_MASK 0x00000001 1167 #define ETH_L2_TUNNEL_INSERTION_MASK 0x00000002 1169 #define ETH_L2_TUNNEL_STRIPPING_MASK 0x00000004 1171 #define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008 1179 typedef int (*eth_dev_configure_t)(
struct rte_eth_dev *dev);
1182 typedef int (*eth_dev_start_t)(
struct rte_eth_dev *dev);
1185 typedef void (*eth_dev_stop_t)(
struct rte_eth_dev *dev);
1188 typedef int (*eth_dev_set_link_up_t)(
struct rte_eth_dev *dev);
1191 typedef int (*eth_dev_set_link_down_t)(
struct rte_eth_dev *dev);
1194 typedef void (*eth_dev_close_t)(
struct rte_eth_dev *dev);
1197 typedef int (*eth_dev_reset_t)(
struct rte_eth_dev *dev);
1203 typedef void (*eth_promiscuous_disable_t)(
struct rte_eth_dev *dev);
1206 typedef void (*eth_allmulticast_enable_t)(
struct rte_eth_dev *dev);
1209 typedef void (*eth_allmulticast_disable_t)(
struct rte_eth_dev *dev);
1212 typedef int (*eth_link_update_t)(
struct rte_eth_dev *dev,
1213 int wait_to_complete);
1216 typedef int (*eth_stats_get_t)(
struct rte_eth_dev *dev,
1220 typedef void (*eth_stats_reset_t)(
struct rte_eth_dev *dev);
1223 typedef int (*eth_xstats_get_t)(
struct rte_eth_dev *dev,
1227 typedef int (*eth_xstats_get_by_id_t)(
struct rte_eth_dev *dev,
1228 const uint64_t *ids,
1233 typedef void (*eth_xstats_reset_t)(
struct rte_eth_dev *dev);
1236 typedef int (*eth_xstats_get_names_t)(
struct rte_eth_dev *dev,
1240 typedef int (*eth_xstats_get_names_by_id_t)(
struct rte_eth_dev *dev,
1245 typedef int (*eth_queue_stats_mapping_set_t)(
struct rte_eth_dev *dev,
1251 typedef void (*eth_dev_infos_get_t)(
struct rte_eth_dev *dev,
1255 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(
struct rte_eth_dev *dev);
1258 typedef int (*eth_queue_start_t)(
struct rte_eth_dev *dev,
1262 typedef int (*eth_queue_stop_t)(
struct rte_eth_dev *dev,
1266 typedef int (*eth_rx_queue_setup_t)(
struct rte_eth_dev *dev,
1267 uint16_t rx_queue_id,
1268 uint16_t nb_rx_desc,
1269 unsigned int socket_id,
1274 typedef int (*eth_tx_queue_setup_t)(
struct rte_eth_dev *dev,
1275 uint16_t tx_queue_id,
1276 uint16_t nb_tx_desc,
1277 unsigned int socket_id,
1281 typedef int (*eth_rx_enable_intr_t)(
struct rte_eth_dev *dev,
1282 uint16_t rx_queue_id);
1285 typedef int (*eth_rx_disable_intr_t)(
struct rte_eth_dev *dev,
1286 uint16_t rx_queue_id);
1289 typedef void (*eth_queue_release_t)(
void *queue);
1292 typedef uint32_t (*eth_rx_queue_count_t)(
struct rte_eth_dev *dev,
1293 uint16_t rx_queue_id);
1296 typedef int (*eth_rx_descriptor_done_t)(
void *rxq, uint16_t offset);
1299 typedef int (*eth_rx_descriptor_status_t)(
void *rxq, uint16_t offset);
1302 typedef int (*eth_tx_descriptor_status_t)(
void *txq, uint16_t offset);
1305 typedef int (*eth_fw_version_get_t)(
struct rte_eth_dev *dev,
1306 char *fw_version,
size_t fw_size);
1309 typedef int (*eth_tx_done_cleanup_t)(
void *txq, uint32_t free_cnt);
1312 typedef void (*eth_rxq_info_get_t)(
struct rte_eth_dev *dev,
1315 typedef void (*eth_txq_info_get_t)(
struct rte_eth_dev *dev,
1318 typedef int (*mtu_set_t)(
struct rte_eth_dev *dev, uint16_t mtu);
1321 typedef int (*vlan_filter_set_t)(
struct rte_eth_dev *dev,
1326 typedef int (*vlan_tpid_set_t)(
struct rte_eth_dev *dev,
1330 typedef int (*vlan_offload_set_t)(
struct rte_eth_dev *dev,
int mask);
1333 typedef int (*vlan_pvid_set_t)(
struct rte_eth_dev *dev,
1338 typedef void (*vlan_strip_queue_set_t)(
struct rte_eth_dev *dev,
1339 uint16_t rx_queue_id,
1343 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
1348 typedef uint16_t (*eth_tx_burst_t)(
void *txq,
1353 typedef uint16_t (*eth_tx_prep_t)(
void *txq,
1358 typedef int (*flow_ctrl_get_t)(
struct rte_eth_dev *dev,
1362 typedef int (*flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1366 typedef int (*priority_flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1370 typedef int (*reta_update_t)(
struct rte_eth_dev *dev,
1372 uint16_t reta_size);
1375 typedef int (*reta_query_t)(
struct rte_eth_dev *dev,
1377 uint16_t reta_size);
1380 typedef int (*rss_hash_update_t)(
struct rte_eth_dev *dev,
1384 typedef int (*rss_hash_conf_get_t)(
struct rte_eth_dev *dev,
1388 typedef int (*eth_dev_led_on_t)(
struct rte_eth_dev *dev);
1391 typedef int (*eth_dev_led_off_t)(
struct rte_eth_dev *dev);
1394 typedef void (*eth_mac_addr_remove_t)(
struct rte_eth_dev *dev, uint32_t index);
1397 typedef int (*eth_mac_addr_add_t)(
struct rte_eth_dev *dev,
1403 typedef void (*eth_mac_addr_set_t)(
struct rte_eth_dev *dev,
1407 typedef int (*eth_uc_hash_table_set_t)(
struct rte_eth_dev *dev,
1412 typedef int (*eth_uc_all_hash_table_set_t)(
struct rte_eth_dev *dev,
1416 typedef int (*eth_set_queue_rate_limit_t)(
struct rte_eth_dev *dev,
1421 typedef int (*eth_mirror_rule_set_t)(
struct rte_eth_dev *dev,
1427 typedef int (*eth_mirror_rule_reset_t)(
struct rte_eth_dev *dev,
1431 typedef int (*eth_udp_tunnel_port_add_t)(
struct rte_eth_dev *dev,
1435 typedef int (*eth_udp_tunnel_port_del_t)(
struct rte_eth_dev *dev,
1439 typedef int (*eth_set_mc_addr_list_t)(
struct rte_eth_dev *dev,
1441 uint32_t nb_mc_addr);
1444 typedef int (*eth_timesync_enable_t)(
struct rte_eth_dev *dev);
1447 typedef int (*eth_timesync_disable_t)(
struct rte_eth_dev *dev);
1450 typedef int (*eth_timesync_read_rx_timestamp_t)(
struct rte_eth_dev *dev,
1451 struct timespec *timestamp,
1455 typedef int (*eth_timesync_read_tx_timestamp_t)(
struct rte_eth_dev *dev,
1456 struct timespec *timestamp);
1459 typedef int (*eth_timesync_adjust_time)(
struct rte_eth_dev *dev, int64_t);
1462 typedef int (*eth_timesync_read_time)(
struct rte_eth_dev *dev,
1463 struct timespec *timestamp);
1466 typedef int (*eth_timesync_write_time)(
struct rte_eth_dev *dev,
1467 const struct timespec *timestamp);
1470 typedef int (*eth_get_reg_t)(
struct rte_eth_dev *dev,
1471 struct rte_dev_reg_info *info);
1474 typedef int (*eth_get_eeprom_length_t)(
struct rte_eth_dev *dev);
1477 typedef int (*eth_get_eeprom_t)(
struct rte_eth_dev *dev,
1478 struct rte_dev_eeprom_info *info);
1481 typedef int (*eth_set_eeprom_t)(
struct rte_eth_dev *dev,
1482 struct rte_dev_eeprom_info *info);
1485 typedef int (*eth_l2_tunnel_eth_type_conf_t)
1489 typedef int (*eth_l2_tunnel_offload_set_t)
1490 (
struct rte_eth_dev *dev,
1497 typedef int (*eth_filter_ctrl_t)(
struct rte_eth_dev *dev,
1503 typedef int (*eth_tm_ops_get_t)(
struct rte_eth_dev *dev,
void *ops);
1506 typedef int (*eth_mtr_ops_get_t)(
struct rte_eth_dev *dev,
void *ops);
1509 typedef int (*eth_get_dcb_info)(
struct rte_eth_dev *dev,
1513 typedef int (*eth_pool_ops_supported_t)(
struct rte_eth_dev *dev,
1520 struct eth_dev_ops {
1521 eth_dev_configure_t dev_configure;
1522 eth_dev_start_t dev_start;
1523 eth_dev_stop_t dev_stop;
1524 eth_dev_set_link_up_t dev_set_link_up;
1525 eth_dev_set_link_down_t dev_set_link_down;
1526 eth_dev_close_t dev_close;
1527 eth_dev_reset_t dev_reset;
1528 eth_link_update_t link_update;
1531 eth_promiscuous_disable_t promiscuous_disable;
1532 eth_allmulticast_enable_t allmulticast_enable;
1533 eth_allmulticast_disable_t allmulticast_disable;
1534 eth_mac_addr_remove_t mac_addr_remove;
1535 eth_mac_addr_add_t mac_addr_add;
1536 eth_mac_addr_set_t mac_addr_set;
1537 eth_set_mc_addr_list_t set_mc_addr_list;
1540 eth_stats_get_t stats_get;
1541 eth_stats_reset_t stats_reset;
1542 eth_xstats_get_t xstats_get;
1543 eth_xstats_reset_t xstats_reset;
1544 eth_xstats_get_names_t xstats_get_names;
1546 eth_queue_stats_mapping_set_t queue_stats_mapping_set;
1549 eth_dev_infos_get_t dev_infos_get;
1550 eth_rxq_info_get_t rxq_info_get;
1551 eth_txq_info_get_t txq_info_get;
1552 eth_fw_version_get_t fw_version_get;
1553 eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
1556 vlan_filter_set_t vlan_filter_set;
1557 vlan_tpid_set_t vlan_tpid_set;
1558 vlan_strip_queue_set_t vlan_strip_queue_set;
1559 vlan_offload_set_t vlan_offload_set;
1560 vlan_pvid_set_t vlan_pvid_set;
1562 eth_queue_start_t rx_queue_start;
1563 eth_queue_stop_t rx_queue_stop;
1564 eth_queue_start_t tx_queue_start;
1565 eth_queue_stop_t tx_queue_stop;
1566 eth_rx_queue_setup_t rx_queue_setup;
1567 eth_queue_release_t rx_queue_release;
1568 eth_rx_queue_count_t rx_queue_count;
1570 eth_rx_descriptor_done_t rx_descriptor_done;
1571 eth_rx_descriptor_status_t rx_descriptor_status;
1573 eth_tx_descriptor_status_t tx_descriptor_status;
1575 eth_rx_enable_intr_t rx_queue_intr_enable;
1576 eth_rx_disable_intr_t rx_queue_intr_disable;
1577 eth_tx_queue_setup_t tx_queue_setup;
1578 eth_queue_release_t tx_queue_release;
1579 eth_tx_done_cleanup_t tx_done_cleanup;
1581 eth_dev_led_on_t dev_led_on;
1582 eth_dev_led_off_t dev_led_off;
1584 flow_ctrl_get_t flow_ctrl_get;
1585 flow_ctrl_set_t flow_ctrl_set;
1586 priority_flow_ctrl_set_t priority_flow_ctrl_set;
1588 eth_uc_hash_table_set_t uc_hash_table_set;
1589 eth_uc_all_hash_table_set_t uc_all_hash_table_set;
1591 eth_mirror_rule_set_t mirror_rule_set;
1592 eth_mirror_rule_reset_t mirror_rule_reset;
1594 eth_udp_tunnel_port_add_t udp_tunnel_port_add;
1595 eth_udp_tunnel_port_del_t udp_tunnel_port_del;
1596 eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
1598 eth_l2_tunnel_offload_set_t l2_tunnel_offload_set;
1601 eth_set_queue_rate_limit_t set_queue_rate_limit;
1603 rss_hash_update_t rss_hash_update;
1604 rss_hash_conf_get_t rss_hash_conf_get;
1605 reta_update_t reta_update;
1606 reta_query_t reta_query;
1608 eth_get_reg_t get_reg;
1609 eth_get_eeprom_length_t get_eeprom_length;
1610 eth_get_eeprom_t get_eeprom;
1611 eth_set_eeprom_t set_eeprom;
1614 eth_filter_ctrl_t filter_ctrl;
1616 eth_get_dcb_info get_dcb_info;
1618 eth_timesync_enable_t timesync_enable;
1620 eth_timesync_disable_t timesync_disable;
1622 eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
1624 eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
1626 eth_timesync_adjust_time timesync_adjust_time;
1627 eth_timesync_read_time timesync_read_time;
1628 eth_timesync_write_time timesync_write_time;
1630 eth_xstats_get_by_id_t xstats_get_by_id;
1632 eth_xstats_get_names_by_id_t xstats_get_names_by_id;
1635 eth_tm_ops_get_t tm_ops_get;
1638 eth_mtr_ops_get_t mtr_ops_get;
1641 eth_pool_ops_supported_t pool_ops_supported;
1668 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
1692 struct rte_mbuf *pkts[], uint16_t nb_pkts,
void *user_param);
1699 struct rte_eth_rxtx_callback {
1700 struct rte_eth_rxtx_callback *next;
1712 RTE_ETH_DEV_UNUSED = 0,
1713 RTE_ETH_DEV_ATTACHED,
1714 RTE_ETH_DEV_DEFERRED,
1727 struct rte_eth_dev {
1728 eth_rx_burst_t rx_pkt_burst;
1729 eth_tx_burst_t tx_pkt_burst;
1730 eth_tx_prep_t tx_pkt_prepare;
1731 struct rte_eth_dev_data *data;
1732 const struct eth_dev_ops *dev_ops;
1736 struct rte_eth_dev_cb_list link_intr_cbs;
1741 struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1746 struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1752 rte_eth_dev_get_sec_ctx(uint8_t port_id);
1754 struct rte_eth_dev_sriov {
1756 uint8_t nb_q_per_pool;
1757 uint16_t def_vmdq_idx;
1758 uint16_t def_pool_q_idx;
1760 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov) 1762 #define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN 1771 struct rte_eth_dev_data {
1772 char name[RTE_ETH_NAME_MAX_LEN];
1776 uint16_t nb_rx_queues;
1777 uint16_t nb_tx_queues;
1779 struct rte_eth_dev_sriov sriov;
1789 uint32_t min_rx_buf_size;
1792 uint64_t rx_mbuf_alloc_failed;
1800 uint8_t promiscuous : 1,
1805 uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1807 uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1817 #define RTE_ETH_DEV_INTR_LSC 0x0002 1819 #define RTE_ETH_DEV_BONDED_SLAVE 0x0004 1821 #define RTE_ETH_DEV_INTR_RMV 0x0008 1828 extern struct rte_eth_dev rte_eth_devices[];
1843 #define RTE_ETH_FOREACH_DEV(p) \ 1844 for (p = rte_eth_find_next(0); \ 1845 (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \ 1846 p = rte_eth_find_next(p + 1)) 1872 struct rte_eth_dev *rte_eth_dev_allocated(
const char *name);
1884 struct rte_eth_dev *rte_eth_dev_allocate(
const char *name);
1897 struct rte_eth_dev *rte_eth_dev_attach_secondary(
const char *name);
1908 int rte_eth_dev_release_port(
struct rte_eth_dev *eth_dev);
1985 uint16_t nb_tx_queue,
const struct rte_eth_conf *eth_conf);
1998 void _rte_eth_dev_reset(
struct rte_eth_dev *dev);
2042 uint16_t nb_rx_desc,
unsigned int socket_id,
2095 uint16_t nb_tx_desc,
unsigned int socket_id,
2503 uint64_t *values,
unsigned int size);
2551 uint16_t tx_queue_id, uint8_t stat_idx);
2571 uint16_t rx_queue_id,
2615 char *fw_version,
size_t fw_size);
2656 uint32_t *ptypes,
int num);
2883 static inline uint16_t
2885 struct rte_mbuf **rx_pkts,
const uint16_t nb_pkts)
2887 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2889 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 2890 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
2891 RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);
2893 if (queue_id >= dev->data->nb_rx_queues) {
2894 RTE_PMD_DEBUG_TRACE(
"Invalid RX queue_id=%d\n", queue_id);
2898 int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
2901 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 2902 struct rte_eth_rxtx_callback *cb = dev->post_rx_burst_cbs[queue_id];
2906 nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
2907 nb_pkts, cb->param);
2909 }
while (cb != NULL);
2931 struct rte_eth_dev *dev;
2933 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
2934 dev = &rte_eth_devices[port_id];
2935 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
2936 if (queue_id >= dev->data->nb_rx_queues)
2939 return (*dev->dev_ops->rx_queue_count)(dev, queue_id);
2960 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2961 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2962 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
2963 return (*dev->dev_ops->rx_descriptor_done)( \
2964 dev->data->rx_queues[queue_id], offset);
2967 #define RTE_ETH_RX_DESC_AVAIL 0 2968 #define RTE_ETH_RX_DESC_DONE 1 2969 #define RTE_ETH_RX_DESC_UNAVAIL 2 3008 struct rte_eth_dev *dev;
3011 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3012 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3014 dev = &rte_eth_devices[port_id];
3015 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3016 if (queue_id >= dev->data->nb_rx_queues)
3019 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
3020 rxq = dev->data->rx_queues[queue_id];
3022 return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
3025 #define RTE_ETH_TX_DESC_FULL 0 3026 #define RTE_ETH_TX_DESC_DONE 1 3027 #define RTE_ETH_TX_DESC_UNAVAIL 2 3062 static inline int rte_eth_tx_descriptor_status(uint16_t port_id, 3063 uint16_t queue_id, uint16_t offset)
3065 struct rte_eth_dev *dev;
3068 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3069 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3071 dev = &rte_eth_devices[port_id];
3072 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3073 if (queue_id >= dev->data->nb_tx_queues)
3076 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
3077 txq = dev->data->tx_queues[queue_id];
3079 return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
3145 static inline uint16_t
3147 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3149 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
3151 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3152 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
3153 RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
3155 if (queue_id >= dev->data->nb_tx_queues) {
3156 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3161 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 3162 struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
3166 nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
3169 }
while (cb != NULL);
3173 return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
3232 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP 3234 static inline uint16_t
3236 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3238 struct rte_eth_dev *dev;
3240 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3242 RTE_PMD_DEBUG_TRACE(
"Invalid TX port_id=%d\n", port_id);
3248 dev = &rte_eth_devices[port_id];
3250 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3251 if (queue_id >= dev->data->nb_tx_queues) {
3252 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3258 if (!dev->tx_pkt_prepare)
3261 return (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],
3276 static inline uint16_t
3286 typedef void (*buffer_tx_error_fn)(
struct rte_mbuf **unsent, uint16_t count,
3294 buffer_tx_error_fn error_callback;
3295 void *error_userdata;
3308 #define RTE_ETH_TX_BUFFER_SIZE(sz) \ 3309 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *)) 3346 static inline uint16_t
3351 uint16_t to_send = buffer->
length;
3362 buffer->error_callback(&buffer->
pkts[sent], to_send - sent,
3363 buffer->error_userdata);
3435 buffer_tx_error_fn callback,
void *
userdata);
3599 int _rte_eth_dev_callback_process(
struct rte_eth_dev *dev,
3686 int epfd,
int op,
void *data);
3835 uint16_t reta_size);
3854 uint16_t reta_size);
4197 struct rte_eth_rxtx_callback *user_cb);
4230 struct rte_eth_rxtx_callback *user_cb);
4354 uint32_t nb_mc_addr);
4400 struct timespec *timestamp, uint32_t flags);
4417 struct timespec *timestamp);
4493 uint16_t queue_id,
size_t size,
4494 unsigned align,
int socket_id);
4589 uint16_t *nb_rx_desc,
4590 uint16_t *nb_tx_desc);
int rte_eth_dev_uc_all_hash_table_set(uint16_t port, uint8_t on)
int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)
int rte_eth_dev_mac_addr_add(uint16_t port, struct ether_addr *mac_addr, uint32_t pool)
#define ETH_VMDQ_MAX_VLAN_FILTERS
int rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel)
#define __rte_always_inline
int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time)
uint16_t(* rte_rx_callback_fn)(uint16_t port, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts, void *user_param)
int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time)
void rte_eth_dev_stop(uint16_t port_id)
int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf)
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
static uint16_t rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
int rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS]
uint16_t rte_eth_find_next(uint16_t port_id)
int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
int rte_eth_led_off(uint16_t port_id)
int rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
static int rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
static int rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
uint16_t(* rte_tx_callback_fn)(uint16_t port, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
void rte_eth_dev_close(uint16_t port_id)
int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint16_t tx_rate)
int rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
uint64_t rx_queue_offload_capa
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, unsigned int n)
const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size, unsigned align, int socket_id)
int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, int epfd, int op, void *data)
uint64_t tx_queue_offload_capa
int rte_eth_mirror_rule_set(uint16_t port_id, struct rte_eth_mirror_conf *mirror_conf, uint8_t rule_id, uint8_t on)
uint8_t enable_default_pool
uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
int rte_eth_dev_get_eeprom_length(uint16_t port_id)
void * rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id)
int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id, uint8_t stat_idx)
int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
uint32_t dcb_capability_en
#define ETH_NUM_RECEIVE_MAC_ADDR
uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
struct rte_mbuf __rte_cache_aligned
int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_dev_callback_unregister(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
void rte_eth_allmulticast_enable(uint16_t port_id)
int rte_eth_dev_set_link_up(uint16_t port_id)
int rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags)
uint16_t rte_eth_dev_count(void)
int rte_eth_dev_get_vlan_offload(uint16_t port_id)
int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
uint8_t rx_deferred_start
void(* eth_promiscuous_enable_t)(struct rte_eth_dev *dev)
int(* rte_eth_dev_cb_fn)(uint16_t port_id, enum rte_eth_event_type event, void *cb_arg, void *ret_param)
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
#define RTE_ETH_XSTATS_NAME_SIZE
int rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
int rte_eth_timesync_disable(uint16_t port_id)
int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type, enum rte_filter_op filter_op, void *arg)
int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxtx_callback *user_cb)
struct rte_pci_device * pci_dev
int rte_eth_stats_reset(uint16_t port_id)
int rte_eth_dev_rss_reta_query(uint16_t port, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
int rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
void rte_eth_promiscuous_enable(uint16_t port_id)
int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxtx_callback *user_cb)
int rte_eth_dev_callback_register(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)
static uint16_t rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)
int rte_eth_dev_start(uint16_t port_id)
int rte_eth_dev_mac_addr_remove(uint16_t port, struct ether_addr *mac_addr)
int rte_eth_dev_reset(uint16_t port_id)
int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, uint64_t *values, unsigned int size)
void * rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, rte_tx_callback_fn fn, void *user_param)
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id)
int rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, buffer_tx_error_fn callback, void *userdata)
void rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
int rte_eth_dev_attach(const char *devargs, uint16_t *port_id)
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link)
int rte_eth_dev_default_mac_addr_set(uint16_t port, struct ether_addr *mac_addr)
#define ETH_DCB_NUM_USER_PRIORITIES
void rte_eth_promiscuous_disable(uint16_t port_id)
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id)
int rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
uint64_t flow_type_rss_offloads
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
int rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel, uint32_t mask, uint8_t en)
static __rte_always_inline uint16_t rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
struct rte_mempool * pool
int rte_eth_dev_detach(uint16_t port_id, char *devname)
int rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info)
#define __rte_cache_min_aligned
#define ETH_MQ_RX_RSS_FLAG
void rte_eth_xstats_reset(uint16_t port_id)
#define ETH_MIRROR_MAX_VLANS
int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id, uint8_t stat_idx)
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
int rte_eth_dev_rss_reta_update(uint16_t port, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
static int rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
int rte_eth_dev_socket_id(uint16_t port_id)
uint8_t enable_default_pool
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, enum rte_vlan_type vlan_type, uint16_t tag_type)
int rte_eth_dev_filter_supported(uint16_t port_id, enum rte_filter_type filter_type)
int rte_eth_xstats_get_names_by_id(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size, uint64_t *ids)
int rte_eth_promiscuous_get(uint16_t port_id)
int rte_eth_led_on(uint16_t port_id)
int rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp)
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num)
char name[RTE_MEMZONE_NAMESIZE]
int rte_eth_dev_uc_hash_table_set(uint16_t port, struct ether_addr *addr, uint8_t on)
int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
void rte_eth_allmulticast_disable(uint16_t port_id)
uint8_t mac_ctrl_frame_fwd
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
__extension__ uint16_t security
uint8_t tx_deferred_start
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
int rte_eth_xstats_get_names(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size)
int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
int rte_eth_allmulticast_get(uint16_t port_id)
int rte_eth_dev_is_valid_port(uint16_t port_id)
int rte_eth_timesync_enable(uint16_t port_id)
void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link)
static uint16_t rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_set_link_down(uint16_t port_id)
int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
void * rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
static uint16_t rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer)
int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mb_pool)