34 #ifndef _RTE_ETHDEV_H_ 35 #define _RTE_ETHDEV_H_ 176 #define RTE_ETHDEV_HAS_LRO_SUPPORT 187 #include "rte_dev_info.h" 224 #define ETH_LINK_SPEED_AUTONEG (0 << 0) 225 #define ETH_LINK_SPEED_FIXED (1 << 0) 226 #define ETH_LINK_SPEED_10M_HD (1 << 1) 227 #define ETH_LINK_SPEED_10M (1 << 2) 228 #define ETH_LINK_SPEED_100M_HD (1 << 3) 229 #define ETH_LINK_SPEED_100M (1 << 4) 230 #define ETH_LINK_SPEED_1G (1 << 5) 231 #define ETH_LINK_SPEED_2_5G (1 << 6) 232 #define ETH_LINK_SPEED_5G (1 << 7) 233 #define ETH_LINK_SPEED_10G (1 << 8) 234 #define ETH_LINK_SPEED_20G (1 << 9) 235 #define ETH_LINK_SPEED_25G (1 << 10) 236 #define ETH_LINK_SPEED_40G (1 << 11) 237 #define ETH_LINK_SPEED_50G (1 << 12) 238 #define ETH_LINK_SPEED_56G (1 << 13) 239 #define ETH_LINK_SPEED_100G (1 << 14) 244 #define ETH_SPEED_NUM_NONE 0 245 #define ETH_SPEED_NUM_10M 10 246 #define ETH_SPEED_NUM_100M 100 247 #define ETH_SPEED_NUM_1G 1000 248 #define ETH_SPEED_NUM_2_5G 2500 249 #define ETH_SPEED_NUM_5G 5000 250 #define ETH_SPEED_NUM_10G 10000 251 #define ETH_SPEED_NUM_20G 20000 252 #define ETH_SPEED_NUM_25G 25000 253 #define ETH_SPEED_NUM_40G 40000 254 #define ETH_SPEED_NUM_50G 50000 255 #define ETH_SPEED_NUM_56G 56000 256 #define ETH_SPEED_NUM_100G 100000 264 uint16_t link_duplex : 1;
265 uint16_t link_autoneg : 1;
266 uint16_t link_status : 1;
267 } __attribute__((aligned(8)));
270 #define ETH_LINK_HALF_DUPLEX 0 271 #define ETH_LINK_FULL_DUPLEX 1 272 #define ETH_LINK_DOWN 0 273 #define ETH_LINK_UP 1 274 #define ETH_LINK_FIXED 0 275 #define ETH_LINK_AUTONEG 1 281 struct rte_eth_thresh { 290 #define ETH_MQ_RX_RSS_FLAG 0x1 291 #define ETH_MQ_RX_DCB_FLAG 0x2 292 #define ETH_MQ_RX_VMDQ_FLAG 0x4 323 #define ETH_RSS ETH_MQ_RX_RSS 324 #define VMDQ_DCB ETH_MQ_RX_VMDQ_DCB 325 #define ETH_DCB_RX ETH_MQ_RX_DCB 341 #define ETH_DCB_NONE ETH_MQ_TX_NONE 342 #define ETH_VMDQ_DCB_TX ETH_MQ_TX_VMDQ_DCB 343 #define ETH_DCB_TX ETH_MQ_TX_DCB 365 uint16_t header_split : 1,
385 ignore_offload_bitfield : 1;
393 ETH_VLAN_TYPE_UNKNOWN = 0,
436 #define ETH_RSS_IPV4 (1ULL << RTE_ETH_FLOW_IPV4) 437 #define ETH_RSS_FRAG_IPV4 (1ULL << RTE_ETH_FLOW_FRAG_IPV4) 438 #define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_TCP) 439 #define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_UDP) 440 #define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) 441 #define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) 442 #define ETH_RSS_IPV6 (1ULL << RTE_ETH_FLOW_IPV6) 443 #define ETH_RSS_FRAG_IPV6 (1ULL << RTE_ETH_FLOW_FRAG_IPV6) 444 #define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_TCP) 445 #define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_UDP) 446 #define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) 447 #define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_OTHER) 448 #define ETH_RSS_L2_PAYLOAD (1ULL << RTE_ETH_FLOW_L2_PAYLOAD) 449 #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX) 450 #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX) 451 #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX) 452 #define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT) 453 #define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN) 454 #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE) 455 #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE) 457 #define ETH_RSS_IP ( \ 459 ETH_RSS_FRAG_IPV4 | \ 460 ETH_RSS_NONFRAG_IPV4_OTHER | \ 462 ETH_RSS_FRAG_IPV6 | \ 463 ETH_RSS_NONFRAG_IPV6_OTHER | \ 466 #define ETH_RSS_UDP ( \ 467 ETH_RSS_NONFRAG_IPV4_UDP | \ 468 ETH_RSS_NONFRAG_IPV6_UDP | \ 471 #define ETH_RSS_TCP ( \ 472 ETH_RSS_NONFRAG_IPV4_TCP | \ 473 ETH_RSS_NONFRAG_IPV6_TCP | \ 476 #define ETH_RSS_SCTP ( \ 477 ETH_RSS_NONFRAG_IPV4_SCTP | \ 478 ETH_RSS_NONFRAG_IPV6_SCTP) 480 #define ETH_RSS_TUNNEL ( \ 487 #define ETH_RSS_PROTO_MASK ( \ 489 ETH_RSS_FRAG_IPV4 | \ 490 ETH_RSS_NONFRAG_IPV4_TCP | \ 491 ETH_RSS_NONFRAG_IPV4_UDP | \ 492 ETH_RSS_NONFRAG_IPV4_SCTP | \ 493 ETH_RSS_NONFRAG_IPV4_OTHER | \ 495 ETH_RSS_FRAG_IPV6 | \ 496 ETH_RSS_NONFRAG_IPV6_TCP | \ 497 ETH_RSS_NONFRAG_IPV6_UDP | \ 498 ETH_RSS_NONFRAG_IPV6_SCTP | \ 499 ETH_RSS_NONFRAG_IPV6_OTHER | \ 500 ETH_RSS_L2_PAYLOAD | \ 502 ETH_RSS_IPV6_TCP_EX | \ 503 ETH_RSS_IPV6_UDP_EX | \ 514 #define ETH_RSS_RETA_SIZE_64 64 515 #define ETH_RSS_RETA_SIZE_128 128 516 #define ETH_RSS_RETA_SIZE_256 256 517 #define ETH_RSS_RETA_SIZE_512 512 518 #define RTE_RETA_GROUP_SIZE 64 521 #define ETH_VMDQ_MAX_VLAN_FILTERS 64 522 #define ETH_DCB_NUM_USER_PRIORITIES 8 523 #define ETH_VMDQ_DCB_NUM_QUEUES 128 524 #define ETH_DCB_NUM_QUEUES 128 527 #define ETH_DCB_PG_SUPPORT 0x00000001 528 #define ETH_DCB_PFC_SUPPORT 0x00000002 531 #define ETH_VLAN_STRIP_OFFLOAD 0x0001 532 #define ETH_VLAN_FILTER_OFFLOAD 0x0002 533 #define ETH_VLAN_EXTEND_OFFLOAD 0x0004 536 #define ETH_VLAN_STRIP_MASK 0x0001 537 #define ETH_VLAN_FILTER_MASK 0x0002 538 #define ETH_VLAN_EXTEND_MASK 0x0004 539 #define ETH_VLAN_ID_MAX 0x0FFF 542 #define ETH_NUM_RECEIVE_MAC_ADDR 128 545 #define ETH_VMDQ_NUM_UC_HASH_ARRAY 128 548 #define ETH_VMDQ_ACCEPT_UNTAG 0x0001 549 #define ETH_VMDQ_ACCEPT_HASH_MC 0x0002 550 #define ETH_VMDQ_ACCEPT_HASH_UC 0x0004 551 #define ETH_VMDQ_ACCEPT_BROADCAST 0x0008 552 #define ETH_VMDQ_ACCEPT_MULTICAST 0x0010 555 #define ETH_MIRROR_MAX_VLANS 64 557 #define ETH_MIRROR_VIRTUAL_POOL_UP 0x01 558 #define ETH_MIRROR_UPLINK_PORT 0x02 559 #define ETH_MIRROR_DOWNLINK_PORT 0x04 560 #define ETH_MIRROR_VLAN 0x08 561 #define ETH_MIRROR_VIRTUAL_POOL_DOWN 0x10 566 struct rte_eth_vlan_mirror { 592 uint16_t reta[RTE_RETA_GROUP_SIZE];
617 struct rte_eth_dcb_rx_conf {
623 struct rte_eth_vmdq_dcb_tx_conf {
629 struct rte_eth_dcb_tx_conf {
635 struct rte_eth_vmdq_tx_conf {
709 uint8_t hw_vlan_reject_tagged : 1,
711 hw_vlan_reject_untagged : 1,
713 hw_vlan_insert_pvid : 1;
733 #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 734 #define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 735 #define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 736 #define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 737 #define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 738 #define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400 739 #define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800 740 #define ETH_TXQ_FLAGS_NOOFFLOADS \ 741 (ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \ 742 ETH_TXQ_FLAGS_NOXSUMUDP | ETH_TXQ_FLAGS_NOXSUMTCP) 743 #define ETH_TXQ_FLAGS_NOXSUMS \ 744 (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \ 745 ETH_TXQ_FLAGS_NOXSUMTCP) 753 #define ETH_TXQ_FLAGS_IGNORE 0x8000 925 struct rte_eth_dcb_rx_conf dcb_rx_conf;
931 struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
933 struct rte_eth_dcb_tx_conf dcb_tx_conf;
935 struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
954 #define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001 955 #define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002 956 #define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004 957 #define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008 958 #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010 959 #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020 960 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040 961 #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080 962 #define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100 963 #define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200 964 #define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400 965 #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 966 #define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000 967 #define DEV_RX_OFFLOAD_SCATTER 0x00002000 968 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 969 #define DEV_RX_OFFLOAD_SECURITY 0x00008000 970 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ 971 DEV_RX_OFFLOAD_UDP_CKSUM | \ 972 DEV_RX_OFFLOAD_TCP_CKSUM) 973 #define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \ 974 DEV_RX_OFFLOAD_VLAN_FILTER | \ 975 DEV_RX_OFFLOAD_VLAN_EXTEND) 980 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001 981 #define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002 982 #define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004 983 #define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008 984 #define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010 985 #define DEV_TX_OFFLOAD_TCP_TSO 0x00000020 986 #define DEV_TX_OFFLOAD_UDP_TSO 0x00000040 987 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080 988 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100 989 #define DEV_TX_OFFLOAD_VXLAN_TNL_TSO 0x00000200 990 #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400 991 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800 992 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000 993 #define DEV_TX_OFFLOAD_MACSEC_INSERT 0x00002000 994 #define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000 998 #define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000 1000 #define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000 1005 #define DEV_TX_OFFLOAD_SECURITY 0x00020000 1007 struct rte_pci_device;
1022 uint32_t max_hash_mac_addrs;
1073 #define RTE_ETH_XSTATS_NAME_SIZE 64 1100 #define ETH_DCB_NUM_TCS 8 1101 #define ETH_MAX_VMDQ_POOL 64 1112 } tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1117 } tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1127 uint8_t tc_bws[ETH_DCB_NUM_TCS];
1135 #define RTE_ETH_QUEUE_STATE_STOPPED 0 1136 #define RTE_ETH_QUEUE_STATE_STARTED 1 1140 struct rte_eth_dev_callback;
1142 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
1145 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ 1146 if (!rte_eth_dev_is_valid_port(port_id)) { \ 1147 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ 1152 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \ 1153 if (!rte_eth_dev_is_valid_port(port_id)) { \ 1154 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ 1164 #define ETH_L2_TUNNEL_ENABLE_MASK 0x00000001 1166 #define ETH_L2_TUNNEL_INSERTION_MASK 0x00000002 1168 #define ETH_L2_TUNNEL_STRIPPING_MASK 0x00000004 1170 #define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008 1178 typedef int (*eth_dev_configure_t)(
struct rte_eth_dev *dev);
1181 typedef int (*eth_dev_start_t)(
struct rte_eth_dev *dev);
1184 typedef void (*eth_dev_stop_t)(
struct rte_eth_dev *dev);
1187 typedef int (*eth_dev_set_link_up_t)(
struct rte_eth_dev *dev);
1190 typedef int (*eth_dev_set_link_down_t)(
struct rte_eth_dev *dev);
1193 typedef void (*eth_dev_close_t)(
struct rte_eth_dev *dev);
1196 typedef int (*eth_dev_reset_t)(
struct rte_eth_dev *dev);
1202 typedef void (*eth_promiscuous_disable_t)(
struct rte_eth_dev *dev);
1205 typedef void (*eth_allmulticast_enable_t)(
struct rte_eth_dev *dev);
1208 typedef void (*eth_allmulticast_disable_t)(
struct rte_eth_dev *dev);
1211 typedef int (*eth_link_update_t)(
struct rte_eth_dev *dev,
1212 int wait_to_complete);
1215 typedef int (*eth_stats_get_t)(
struct rte_eth_dev *dev,
1219 typedef void (*eth_stats_reset_t)(
struct rte_eth_dev *dev);
1222 typedef int (*eth_xstats_get_t)(
struct rte_eth_dev *dev,
1226 typedef int (*eth_xstats_get_by_id_t)(
struct rte_eth_dev *dev,
1227 const uint64_t *ids,
1232 typedef void (*eth_xstats_reset_t)(
struct rte_eth_dev *dev);
1235 typedef int (*eth_xstats_get_names_t)(
struct rte_eth_dev *dev,
1239 typedef int (*eth_xstats_get_names_by_id_t)(
struct rte_eth_dev *dev,
1244 typedef int (*eth_queue_stats_mapping_set_t)(
struct rte_eth_dev *dev,
1250 typedef void (*eth_dev_infos_get_t)(
struct rte_eth_dev *dev,
1254 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(
struct rte_eth_dev *dev);
1257 typedef int (*eth_queue_start_t)(
struct rte_eth_dev *dev,
1261 typedef int (*eth_queue_stop_t)(
struct rte_eth_dev *dev,
1265 typedef int (*eth_rx_queue_setup_t)(
struct rte_eth_dev *dev,
1266 uint16_t rx_queue_id,
1267 uint16_t nb_rx_desc,
1268 unsigned int socket_id,
1273 typedef int (*eth_tx_queue_setup_t)(
struct rte_eth_dev *dev,
1274 uint16_t tx_queue_id,
1275 uint16_t nb_tx_desc,
1276 unsigned int socket_id,
1280 typedef int (*eth_rx_enable_intr_t)(
struct rte_eth_dev *dev,
1281 uint16_t rx_queue_id);
1284 typedef int (*eth_rx_disable_intr_t)(
struct rte_eth_dev *dev,
1285 uint16_t rx_queue_id);
1288 typedef void (*eth_queue_release_t)(
void *queue);
1291 typedef uint32_t (*eth_rx_queue_count_t)(
struct rte_eth_dev *dev,
1292 uint16_t rx_queue_id);
1295 typedef int (*eth_rx_descriptor_done_t)(
void *rxq, uint16_t offset);
1298 typedef int (*eth_rx_descriptor_status_t)(
void *rxq, uint16_t offset);
1301 typedef int (*eth_tx_descriptor_status_t)(
void *txq, uint16_t offset);
1304 typedef int (*eth_fw_version_get_t)(
struct rte_eth_dev *dev,
1305 char *fw_version,
size_t fw_size);
1308 typedef int (*eth_tx_done_cleanup_t)(
void *txq, uint32_t free_cnt);
1311 typedef void (*eth_rxq_info_get_t)(
struct rte_eth_dev *dev,
1314 typedef void (*eth_txq_info_get_t)(
struct rte_eth_dev *dev,
1317 typedef int (*mtu_set_t)(
struct rte_eth_dev *dev, uint16_t mtu);
1320 typedef int (*vlan_filter_set_t)(
struct rte_eth_dev *dev,
1325 typedef int (*vlan_tpid_set_t)(
struct rte_eth_dev *dev,
1329 typedef int (*vlan_offload_set_t)(
struct rte_eth_dev *dev,
int mask);
1332 typedef int (*vlan_pvid_set_t)(
struct rte_eth_dev *dev,
1337 typedef void (*vlan_strip_queue_set_t)(
struct rte_eth_dev *dev,
1338 uint16_t rx_queue_id,
1342 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
1347 typedef uint16_t (*eth_tx_burst_t)(
void *txq,
1352 typedef uint16_t (*eth_tx_prep_t)(
void *txq,
1357 typedef int (*flow_ctrl_get_t)(
struct rte_eth_dev *dev,
1361 typedef int (*flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1365 typedef int (*priority_flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1369 typedef int (*reta_update_t)(
struct rte_eth_dev *dev,
1371 uint16_t reta_size);
1374 typedef int (*reta_query_t)(
struct rte_eth_dev *dev,
1376 uint16_t reta_size);
1379 typedef int (*rss_hash_update_t)(
struct rte_eth_dev *dev,
1383 typedef int (*rss_hash_conf_get_t)(
struct rte_eth_dev *dev,
1387 typedef int (*eth_dev_led_on_t)(
struct rte_eth_dev *dev);
1390 typedef int (*eth_dev_led_off_t)(
struct rte_eth_dev *dev);
1393 typedef void (*eth_mac_addr_remove_t)(
struct rte_eth_dev *dev, uint32_t index);
1396 typedef int (*eth_mac_addr_add_t)(
struct rte_eth_dev *dev,
1402 typedef void (*eth_mac_addr_set_t)(
struct rte_eth_dev *dev,
1406 typedef int (*eth_uc_hash_table_set_t)(
struct rte_eth_dev *dev,
1411 typedef int (*eth_uc_all_hash_table_set_t)(
struct rte_eth_dev *dev,
1415 typedef int (*eth_set_queue_rate_limit_t)(
struct rte_eth_dev *dev,
1420 typedef int (*eth_mirror_rule_set_t)(
struct rte_eth_dev *dev,
1426 typedef int (*eth_mirror_rule_reset_t)(
struct rte_eth_dev *dev,
1430 typedef int (*eth_udp_tunnel_port_add_t)(
struct rte_eth_dev *dev,
1434 typedef int (*eth_udp_tunnel_port_del_t)(
struct rte_eth_dev *dev,
1438 typedef int (*eth_set_mc_addr_list_t)(
struct rte_eth_dev *dev,
1440 uint32_t nb_mc_addr);
1443 typedef int (*eth_timesync_enable_t)(
struct rte_eth_dev *dev);
1446 typedef int (*eth_timesync_disable_t)(
struct rte_eth_dev *dev);
1449 typedef int (*eth_timesync_read_rx_timestamp_t)(
struct rte_eth_dev *dev,
1450 struct timespec *timestamp,
1454 typedef int (*eth_timesync_read_tx_timestamp_t)(
struct rte_eth_dev *dev,
1455 struct timespec *timestamp);
1458 typedef int (*eth_timesync_adjust_time)(
struct rte_eth_dev *dev, int64_t);
1461 typedef int (*eth_timesync_read_time)(
struct rte_eth_dev *dev,
1462 struct timespec *timestamp);
1465 typedef int (*eth_timesync_write_time)(
struct rte_eth_dev *dev,
1466 const struct timespec *timestamp);
1469 typedef int (*eth_get_reg_t)(
struct rte_eth_dev *dev,
1470 struct rte_dev_reg_info *info);
1473 typedef int (*eth_get_eeprom_length_t)(
struct rte_eth_dev *dev);
1476 typedef int (*eth_get_eeprom_t)(
struct rte_eth_dev *dev,
1477 struct rte_dev_eeprom_info *info);
1480 typedef int (*eth_set_eeprom_t)(
struct rte_eth_dev *dev,
1481 struct rte_dev_eeprom_info *info);
1484 typedef int (*eth_l2_tunnel_eth_type_conf_t)
1488 typedef int (*eth_l2_tunnel_offload_set_t)
1489 (
struct rte_eth_dev *dev,
1496 typedef int (*eth_filter_ctrl_t)(
struct rte_eth_dev *dev,
1502 typedef int (*eth_tm_ops_get_t)(
struct rte_eth_dev *dev,
void *ops);
1505 typedef int (*eth_mtr_ops_get_t)(
struct rte_eth_dev *dev,
void *ops);
1508 typedef int (*eth_get_dcb_info)(
struct rte_eth_dev *dev,
1512 typedef int (*eth_pool_ops_supported_t)(
struct rte_eth_dev *dev,
1519 struct eth_dev_ops {
1520 eth_dev_configure_t dev_configure;
1521 eth_dev_start_t dev_start;
1522 eth_dev_stop_t dev_stop;
1523 eth_dev_set_link_up_t dev_set_link_up;
1524 eth_dev_set_link_down_t dev_set_link_down;
1525 eth_dev_close_t dev_close;
1526 eth_dev_reset_t dev_reset;
1527 eth_link_update_t link_update;
1530 eth_promiscuous_disable_t promiscuous_disable;
1531 eth_allmulticast_enable_t allmulticast_enable;
1532 eth_allmulticast_disable_t allmulticast_disable;
1533 eth_mac_addr_remove_t mac_addr_remove;
1534 eth_mac_addr_add_t mac_addr_add;
1535 eth_mac_addr_set_t mac_addr_set;
1536 eth_set_mc_addr_list_t set_mc_addr_list;
1539 eth_stats_get_t stats_get;
1540 eth_stats_reset_t stats_reset;
1541 eth_xstats_get_t xstats_get;
1542 eth_xstats_reset_t xstats_reset;
1543 eth_xstats_get_names_t xstats_get_names;
1545 eth_queue_stats_mapping_set_t queue_stats_mapping_set;
1548 eth_dev_infos_get_t dev_infos_get;
1549 eth_rxq_info_get_t rxq_info_get;
1550 eth_txq_info_get_t txq_info_get;
1551 eth_fw_version_get_t fw_version_get;
1552 eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
1555 vlan_filter_set_t vlan_filter_set;
1556 vlan_tpid_set_t vlan_tpid_set;
1557 vlan_strip_queue_set_t vlan_strip_queue_set;
1558 vlan_offload_set_t vlan_offload_set;
1559 vlan_pvid_set_t vlan_pvid_set;
1561 eth_queue_start_t rx_queue_start;
1562 eth_queue_stop_t rx_queue_stop;
1563 eth_queue_start_t tx_queue_start;
1564 eth_queue_stop_t tx_queue_stop;
1565 eth_rx_queue_setup_t rx_queue_setup;
1566 eth_queue_release_t rx_queue_release;
1567 eth_rx_queue_count_t rx_queue_count;
1569 eth_rx_descriptor_done_t rx_descriptor_done;
1570 eth_rx_descriptor_status_t rx_descriptor_status;
1572 eth_tx_descriptor_status_t tx_descriptor_status;
1574 eth_rx_enable_intr_t rx_queue_intr_enable;
1575 eth_rx_disable_intr_t rx_queue_intr_disable;
1576 eth_tx_queue_setup_t tx_queue_setup;
1577 eth_queue_release_t tx_queue_release;
1578 eth_tx_done_cleanup_t tx_done_cleanup;
1580 eth_dev_led_on_t dev_led_on;
1581 eth_dev_led_off_t dev_led_off;
1583 flow_ctrl_get_t flow_ctrl_get;
1584 flow_ctrl_set_t flow_ctrl_set;
1585 priority_flow_ctrl_set_t priority_flow_ctrl_set;
1587 eth_uc_hash_table_set_t uc_hash_table_set;
1588 eth_uc_all_hash_table_set_t uc_all_hash_table_set;
1590 eth_mirror_rule_set_t mirror_rule_set;
1591 eth_mirror_rule_reset_t mirror_rule_reset;
1593 eth_udp_tunnel_port_add_t udp_tunnel_port_add;
1594 eth_udp_tunnel_port_del_t udp_tunnel_port_del;
1595 eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
1597 eth_l2_tunnel_offload_set_t l2_tunnel_offload_set;
1600 eth_set_queue_rate_limit_t set_queue_rate_limit;
1602 rss_hash_update_t rss_hash_update;
1603 rss_hash_conf_get_t rss_hash_conf_get;
1604 reta_update_t reta_update;
1605 reta_query_t reta_query;
1607 eth_get_reg_t get_reg;
1608 eth_get_eeprom_length_t get_eeprom_length;
1609 eth_get_eeprom_t get_eeprom;
1610 eth_set_eeprom_t set_eeprom;
1613 eth_filter_ctrl_t filter_ctrl;
1615 eth_get_dcb_info get_dcb_info;
1617 eth_timesync_enable_t timesync_enable;
1619 eth_timesync_disable_t timesync_disable;
1621 eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
1623 eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
1625 eth_timesync_adjust_time timesync_adjust_time;
1626 eth_timesync_read_time timesync_read_time;
1627 eth_timesync_write_time timesync_write_time;
1629 eth_xstats_get_by_id_t xstats_get_by_id;
1631 eth_xstats_get_names_by_id_t xstats_get_names_by_id;
1634 eth_tm_ops_get_t tm_ops_get;
1637 eth_mtr_ops_get_t mtr_ops_get;
1640 eth_pool_ops_supported_t pool_ops_supported;
1667 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
1691 struct rte_mbuf *pkts[], uint16_t nb_pkts,
void *user_param);
1698 struct rte_eth_rxtx_callback {
1699 struct rte_eth_rxtx_callback *next;
1711 RTE_ETH_DEV_UNUSED = 0,
1712 RTE_ETH_DEV_ATTACHED,
1713 RTE_ETH_DEV_DEFERRED,
1726 struct rte_eth_dev {
1727 eth_rx_burst_t rx_pkt_burst;
1728 eth_tx_burst_t tx_pkt_burst;
1729 eth_tx_prep_t tx_pkt_prepare;
1730 struct rte_eth_dev_data *data;
1731 const struct eth_dev_ops *dev_ops;
1735 struct rte_eth_dev_cb_list link_intr_cbs;
1740 struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1745 struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1751 rte_eth_dev_get_sec_ctx(uint8_t port_id);
1753 struct rte_eth_dev_sriov {
1755 uint8_t nb_q_per_pool;
1756 uint16_t def_vmdq_idx;
1757 uint16_t def_pool_q_idx;
1759 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov) 1761 #define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN 1770 struct rte_eth_dev_data {
1771 char name[RTE_ETH_NAME_MAX_LEN];
1775 uint16_t nb_rx_queues;
1776 uint16_t nb_tx_queues;
1778 struct rte_eth_dev_sriov sriov;
1788 uint32_t min_rx_buf_size;
1791 uint64_t rx_mbuf_alloc_failed;
1799 uint8_t promiscuous : 1,
1804 uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1806 uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1816 #define RTE_ETH_DEV_INTR_LSC 0x0002 1818 #define RTE_ETH_DEV_BONDED_SLAVE 0x0004 1820 #define RTE_ETH_DEV_INTR_RMV 0x0008 1827 extern struct rte_eth_dev rte_eth_devices[];
1842 #define RTE_ETH_FOREACH_DEV(p) \ 1843 for (p = rte_eth_find_next(0); \ 1844 (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \ 1845 p = rte_eth_find_next(p + 1)) 1871 struct rte_eth_dev *rte_eth_dev_allocated(
const char *name);
1883 struct rte_eth_dev *rte_eth_dev_allocate(
const char *name);
1896 struct rte_eth_dev *rte_eth_dev_attach_secondary(
const char *name);
1907 int rte_eth_dev_release_port(
struct rte_eth_dev *eth_dev);
1984 uint16_t nb_tx_queue,
const struct rte_eth_conf *eth_conf);
1997 void _rte_eth_dev_reset(
struct rte_eth_dev *dev);
2041 uint16_t nb_rx_desc,
unsigned int socket_id,
2094 uint16_t nb_tx_desc,
unsigned int socket_id,
2502 uint64_t *values,
unsigned int size);
2550 uint16_t tx_queue_id, uint8_t stat_idx);
2570 uint16_t rx_queue_id,
2614 char *fw_version,
size_t fw_size);
2655 uint32_t *ptypes,
int num);
2882 static inline uint16_t
2884 struct rte_mbuf **rx_pkts,
const uint16_t nb_pkts)
2886 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2888 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 2889 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
2890 RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);
2892 if (queue_id >= dev->data->nb_rx_queues) {
2893 RTE_PMD_DEBUG_TRACE(
"Invalid RX queue_id=%d\n", queue_id);
2897 int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
2900 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 2901 struct rte_eth_rxtx_callback *cb = dev->post_rx_burst_cbs[queue_id];
2905 nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
2906 nb_pkts, cb->param);
2908 }
while (cb != NULL);
2930 struct rte_eth_dev *dev;
2932 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
2933 dev = &rte_eth_devices[port_id];
2934 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
2935 if (queue_id >= dev->data->nb_rx_queues)
2938 return (*dev->dev_ops->rx_queue_count)(dev, queue_id);
2959 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2960 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2961 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
2962 return (*dev->dev_ops->rx_descriptor_done)( \
2963 dev->data->rx_queues[queue_id], offset);
2966 #define RTE_ETH_RX_DESC_AVAIL 0 2967 #define RTE_ETH_RX_DESC_DONE 1 2968 #define RTE_ETH_RX_DESC_UNAVAIL 2 3007 struct rte_eth_dev *dev;
3010 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3011 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3013 dev = &rte_eth_devices[port_id];
3014 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3015 if (queue_id >= dev->data->nb_rx_queues)
3018 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
3019 rxq = dev->data->rx_queues[queue_id];
3021 return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
3024 #define RTE_ETH_TX_DESC_FULL 0 3025 #define RTE_ETH_TX_DESC_DONE 1 3026 #define RTE_ETH_TX_DESC_UNAVAIL 2 3061 static inline int rte_eth_tx_descriptor_status(uint16_t port_id, 3062 uint16_t queue_id, uint16_t offset)
3064 struct rte_eth_dev *dev;
3067 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3068 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3070 dev = &rte_eth_devices[port_id];
3071 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3072 if (queue_id >= dev->data->nb_tx_queues)
3075 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
3076 txq = dev->data->tx_queues[queue_id];
3078 return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
3144 static inline uint16_t
3146 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3148 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
3150 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3151 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
3152 RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
3154 if (queue_id >= dev->data->nb_tx_queues) {
3155 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3160 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 3161 struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
3165 nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
3168 }
while (cb != NULL);
3172 return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
3231 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP 3233 static inline uint16_t
3235 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3237 struct rte_eth_dev *dev;
3239 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3241 RTE_PMD_DEBUG_TRACE(
"Invalid TX port_id=%d\n", port_id);
3247 dev = &rte_eth_devices[port_id];
3249 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 3250 if (queue_id >= dev->data->nb_tx_queues) {
3251 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3257 if (!dev->tx_pkt_prepare)
3260 return (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],
3275 static inline uint16_t
3285 typedef void (*buffer_tx_error_fn)(
struct rte_mbuf **unsent, uint16_t count,
3293 buffer_tx_error_fn error_callback;
3294 void *error_userdata;
3307 #define RTE_ETH_TX_BUFFER_SIZE(sz) \ 3308 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *)) 3345 static inline uint16_t
3350 uint16_t to_send = buffer->
length;
3361 buffer->error_callback(&buffer->
pkts[sent], to_send - sent,
3362 buffer->error_userdata);
3434 buffer_tx_error_fn callback,
void *
userdata);
3598 int _rte_eth_dev_callback_process(
struct rte_eth_dev *dev,
3685 int epfd,
int op,
void *data);
3834 uint16_t reta_size);
3853 uint16_t reta_size);
4196 struct rte_eth_rxtx_callback *user_cb);
4229 struct rte_eth_rxtx_callback *user_cb);
4353 uint32_t nb_mc_addr);
4399 struct timespec *timestamp, uint32_t flags);
4416 struct timespec *timestamp);
4492 uint16_t queue_id,
size_t size,
4493 unsigned align,
int socket_id);
4588 uint16_t *nb_rx_desc,
4589 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)
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)