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
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 {
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
949 #define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001
950 #define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002
951 #define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004
952 #define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008
953 #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010
954 #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020
955 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
956 #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080
957 #define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100
958 #define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200
959 #define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400
960 #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800
961 #define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000
962 #define DEV_RX_OFFLOAD_SCATTER 0x00002000
963 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000
964 #define DEV_RX_OFFLOAD_SECURITY 0x00008000
965 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
966 DEV_RX_OFFLOAD_UDP_CKSUM | \
967 DEV_RX_OFFLOAD_TCP_CKSUM)
968 #define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \
969 DEV_RX_OFFLOAD_VLAN_FILTER | \
970 DEV_RX_OFFLOAD_VLAN_EXTEND)
975 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001
976 #define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002
977 #define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004
978 #define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008
979 #define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010
980 #define DEV_TX_OFFLOAD_TCP_TSO 0x00000020
981 #define DEV_TX_OFFLOAD_UDP_TSO 0x00000040
982 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080
983 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100
984 #define DEV_TX_OFFLOAD_VXLAN_TNL_TSO 0x00000200
985 #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400
986 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800
987 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000
988 #define DEV_TX_OFFLOAD_MACSEC_INSERT 0x00002000
989 #define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000
993 #define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000
995 #define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000
1000 #define DEV_TX_OFFLOAD_SECURITY 0x00020000
1002 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];
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);
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];
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 nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
2901 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
2902 if (
unlikely(dev->post_rx_burst_cbs[queue_id] != NULL)) {
2903 struct rte_eth_rxtx_callback *cb =
2904 dev->post_rx_burst_cbs[queue_id];
2907 nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
2908 nb_pkts, cb->param);
2910 }
while (cb != NULL);
2932 struct rte_eth_dev *dev;
2934 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
2935 dev = &rte_eth_devices[port_id];
2936 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
2937 if (queue_id >= dev->data->nb_rx_queues)
2940 return (
int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
2961 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2962 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2963 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
2964 return (*dev->dev_ops->rx_descriptor_done)( \
2965 dev->data->rx_queues[queue_id], offset);
2968 #define RTE_ETH_RX_DESC_AVAIL 0
2969 #define RTE_ETH_RX_DESC_DONE 1
2970 #define RTE_ETH_RX_DESC_UNAVAIL 2
3009 struct rte_eth_dev *dev;
3012 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3013 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3015 dev = &rte_eth_devices[port_id];
3016 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3017 if (queue_id >= dev->data->nb_rx_queues)
3020 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
3021 rxq = dev->data->rx_queues[queue_id];
3023 return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
3026 #define RTE_ETH_TX_DESC_FULL 0
3027 #define RTE_ETH_TX_DESC_DONE 1
3028 #define RTE_ETH_TX_DESC_UNAVAIL 2
3063 static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
3064 uint16_t queue_id, uint16_t offset)
3066 struct rte_eth_dev *dev;
3069 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3070 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3072 dev = &rte_eth_devices[port_id];
3073 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3074 if (queue_id >= dev->data->nb_tx_queues)
3077 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
3078 txq = dev->data->tx_queues[queue_id];
3080 return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
3149 static inline uint16_t
3151 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3153 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
3155 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3156 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
3157 RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
3159 if (queue_id >= dev->data->nb_tx_queues) {
3160 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3165 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
3166 struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
3170 nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
3173 }
while (cb != NULL);
3177 return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
3236 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
3238 static inline uint16_t
3240 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
3242 struct rte_eth_dev *dev;
3244 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3246 RTE_PMD_DEBUG_TRACE(
"Invalid TX port_id=%d\n", port_id);
3252 dev = &rte_eth_devices[port_id];
3254 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3255 if (queue_id >= dev->data->nb_tx_queues) {
3256 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
3262 if (!dev->tx_pkt_prepare)
3265 return (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],
3280 static inline uint16_t
3290 typedef void (*buffer_tx_error_fn)(
struct rte_mbuf **unsent, uint16_t count,
3298 buffer_tx_error_fn error_callback;
3299 void *error_userdata;
3312 #define RTE_ETH_TX_BUFFER_SIZE(sz) \
3313 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
3350 static inline uint16_t
3355 uint16_t to_send = buffer->
length;
3366 buffer->error_callback(&buffer->
pkts[sent],
3367 (uint16_t)(to_send - sent),
3368 buffer->error_userdata);
3440 buffer_tx_error_fn callback,
void *
userdata);
3604 int _rte_eth_dev_callback_process(
struct rte_eth_dev *dev,
3691 int epfd,
int op,
void *data);
3840 uint16_t reta_size);
3859 uint16_t reta_size);
4202 struct rte_eth_rxtx_callback *user_cb);
4235 struct rte_eth_rxtx_callback *user_cb);
4359 uint32_t nb_mc_addr);
4405 struct timespec *timestamp, uint32_t flags);
4422 struct timespec *timestamp);
4498 uint16_t queue_id,
size_t size,
4499 unsigned align,
int socket_id);
4594 uint16_t *nb_rx_desc,
4595 uint16_t *nb_tx_desc);
int rte_eth_dev_uc_all_hash_table_set(uint16_t port, uint8_t on)
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
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)
uint8_t tc_bws[ETH_DCB_NUM_TCS]
#define ETH_VMDQ_MAX_VLAN_FILTERS
struct rte_fdir_conf fdir_conf
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)
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS]
struct rte_eth_thresh rx_thresh
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)
union rte_eth_conf::@66 tx_adv_conf
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)
enum rte_fdir_status_mode status
enum rte_eth_tx_mq_mode mq_mode
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)
struct rte_eth_rss_conf rss_conf
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
__extension__ uint16_t hw_strip_crc
#define ETH_NUM_RECEIVE_MAC_ADDR
uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
__extension__ uint16_t enable_scatter
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)
__extension__ uint16_t header_split
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)
struct rte_eth_thresh tx_thresh
struct rte_eth_desc_lim rx_desc_lim
uint16_t rte_eth_dev_count(void)
uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES]
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)
struct rte_eth_rxmode rxmode
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
enum rte_eth_nb_pools nb_queue_pools
struct rte_eth_txconf conf
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
struct rte_intr_conf intr_conf
#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)
struct rte_eth_desc_lim tx_desc_lim
int rte_eth_timesync_disable(uint16_t port_id)
struct rte_eth_conf::@65 rx_adv_conf
__extension__ uint16_t hw_vlan_strip
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)
struct rte_eth_txconf default_txconf
int rte_eth_dev_rss_reta_query(uint16_t port, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
__extension__ uint16_t hw_vlan_filter
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)
struct rte_eth_dcb_rx_conf dcb_rx_conf
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
struct rte_eth_vmdq_rx_conf::@64 pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]
char name[RTE_ETH_XSTATS_NAME_SIZE]
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)
enum rte_eth_rx_mq_mode mq_mode
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)
enum rte_eth_nb_pools nb_queue_pools
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)
struct rte_eth_dcb_tx_conf dcb_tx_conf
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)
__extension__ uint16_t hw_timestamp
struct rte_eth_dcb_tc_queue_mapping::@68 tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
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)
struct rte_eth_rxconf conf
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)
__extension__ uint16_t enable_lro
#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)
struct rte_eth_vlan_mirror vlan
__extension__ uint16_t jumbo_frame
struct rte_eth_vmdq_dcb_conf::@63 pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]
struct rte_eth_dcb_tc_queue_mapping::@67 tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
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)
__extension__ uint8_t hw_vlan_insert_pvid
uint64_t flow_type_rss_offloads
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
uint8_t prio_tc[ETH_DCB_NUM_USER_PRIORITIES]
struct rte_eth_dcb_tc_queue_mapping tc_queue
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)
__extension__ uint8_t hw_vlan_reject_untagged
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
__extension__ uint16_t hw_ip_checksum
#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)
__extension__ uint16_t hw_vlan_extend
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)
struct rte_eth_fdir_flex_conf flex_conf
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)
enum rte_fdir_pballoc_type pballoc
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]
__extension__ uint8_t hw_vlan_reject_tagged
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
__extension__ uint16_t ignore_offload_bitfield
enum rte_eth_fc_mode mode
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
__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)
struct rte_eth_fc_conf fc
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)
struct rte_eth_txmode txmode
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)
struct rte_eth_rxconf default_rxconf
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)