34 #ifndef _RTE_ETHDEV_H_
35 #define _RTE_ETHDEV_H_
178 #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
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
370 ETH_VLAN_TYPE_UNKNOWN = 0,
405 #define ETH_RSS_IPV4 (1ULL << RTE_ETH_FLOW_IPV4)
406 #define ETH_RSS_FRAG_IPV4 (1ULL << RTE_ETH_FLOW_FRAG_IPV4)
407 #define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_TCP)
408 #define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_UDP)
409 #define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP)
410 #define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER)
411 #define ETH_RSS_IPV6 (1ULL << RTE_ETH_FLOW_IPV6)
412 #define ETH_RSS_FRAG_IPV6 (1ULL << RTE_ETH_FLOW_FRAG_IPV6)
413 #define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_TCP)
414 #define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_UDP)
415 #define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP)
416 #define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_OTHER)
417 #define ETH_RSS_L2_PAYLOAD (1ULL << RTE_ETH_FLOW_L2_PAYLOAD)
418 #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX)
419 #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX)
420 #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX)
421 #define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT)
422 #define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN)
423 #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE)
424 #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE)
426 #define ETH_RSS_IP ( \
428 ETH_RSS_FRAG_IPV4 | \
429 ETH_RSS_NONFRAG_IPV4_OTHER | \
431 ETH_RSS_FRAG_IPV6 | \
432 ETH_RSS_NONFRAG_IPV6_OTHER | \
435 #define ETH_RSS_UDP ( \
436 ETH_RSS_NONFRAG_IPV4_UDP | \
437 ETH_RSS_NONFRAG_IPV6_UDP | \
440 #define ETH_RSS_TCP ( \
441 ETH_RSS_NONFRAG_IPV4_TCP | \
442 ETH_RSS_NONFRAG_IPV6_TCP | \
445 #define ETH_RSS_SCTP ( \
446 ETH_RSS_NONFRAG_IPV4_SCTP | \
447 ETH_RSS_NONFRAG_IPV6_SCTP)
449 #define ETH_RSS_TUNNEL ( \
456 #define ETH_RSS_PROTO_MASK ( \
458 ETH_RSS_FRAG_IPV4 | \
459 ETH_RSS_NONFRAG_IPV4_TCP | \
460 ETH_RSS_NONFRAG_IPV4_UDP | \
461 ETH_RSS_NONFRAG_IPV4_SCTP | \
462 ETH_RSS_NONFRAG_IPV4_OTHER | \
464 ETH_RSS_FRAG_IPV6 | \
465 ETH_RSS_NONFRAG_IPV6_TCP | \
466 ETH_RSS_NONFRAG_IPV6_UDP | \
467 ETH_RSS_NONFRAG_IPV6_SCTP | \
468 ETH_RSS_NONFRAG_IPV6_OTHER | \
469 ETH_RSS_L2_PAYLOAD | \
471 ETH_RSS_IPV6_TCP_EX | \
472 ETH_RSS_IPV6_UDP_EX | \
483 #define ETH_RSS_RETA_SIZE_64 64
484 #define ETH_RSS_RETA_SIZE_128 128
485 #define ETH_RSS_RETA_SIZE_256 256
486 #define ETH_RSS_RETA_SIZE_512 512
487 #define RTE_RETA_GROUP_SIZE 64
490 #define ETH_VMDQ_MAX_VLAN_FILTERS 64
491 #define ETH_DCB_NUM_USER_PRIORITIES 8
492 #define ETH_VMDQ_DCB_NUM_QUEUES 128
493 #define ETH_DCB_NUM_QUEUES 128
496 #define ETH_DCB_PG_SUPPORT 0x00000001
497 #define ETH_DCB_PFC_SUPPORT 0x00000002
500 #define ETH_VLAN_STRIP_OFFLOAD 0x0001
501 #define ETH_VLAN_FILTER_OFFLOAD 0x0002
502 #define ETH_VLAN_EXTEND_OFFLOAD 0x0004
505 #define ETH_VLAN_STRIP_MASK 0x0001
506 #define ETH_VLAN_FILTER_MASK 0x0002
507 #define ETH_VLAN_EXTEND_MASK 0x0004
508 #define ETH_VLAN_ID_MAX 0x0FFF
511 #define ETH_NUM_RECEIVE_MAC_ADDR 128
514 #define ETH_VMDQ_NUM_UC_HASH_ARRAY 128
517 #define ETH_VMDQ_ACCEPT_UNTAG 0x0001
518 #define ETH_VMDQ_ACCEPT_HASH_MC 0x0002
519 #define ETH_VMDQ_ACCEPT_HASH_UC 0x0004
520 #define ETH_VMDQ_ACCEPT_BROADCAST 0x0008
521 #define ETH_VMDQ_ACCEPT_MULTICAST 0x0010
524 #define ETH_MIRROR_MAX_VLANS 64
526 #define ETH_MIRROR_VIRTUAL_POOL_UP 0x01
527 #define ETH_MIRROR_UPLINK_PORT 0x02
528 #define ETH_MIRROR_DOWNLINK_PORT 0x04
529 #define ETH_MIRROR_VLAN 0x08
530 #define ETH_MIRROR_VIRTUAL_POOL_DOWN 0x10
535 struct rte_eth_vlan_mirror {
561 uint16_t
reta[RTE_RETA_GROUP_SIZE];
586 struct rte_eth_dcb_rx_conf {
592 struct rte_eth_vmdq_dcb_tx_conf {
598 struct rte_eth_dcb_tx_conf {
604 struct rte_eth_vmdq_tx_conf {
632 struct rte_eth_vmdq_rx_conf {
634 uint8_t enable_default_pool;
635 uint8_t default_pool;
636 uint8_t enable_loop_back;
637 uint8_t nb_pool_maps;
672 #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001
673 #define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002
674 #define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004
675 #define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100
676 #define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200
677 #define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400
678 #define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800
679 #define ETH_TXQ_FLAGS_NOOFFLOADS \
680 (ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \
681 ETH_TXQ_FLAGS_NOXSUMUDP | ETH_TXQ_FLAGS_NOXSUMTCP)
682 #define ETH_TXQ_FLAGS_NOXSUMS \
683 (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \
684 ETH_TXQ_FLAGS_NOXSUMTCP)
847 #define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001
848 #define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002
849 #define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004
850 #define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008
851 #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010
852 #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020
853 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
858 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001
859 #define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002
860 #define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004
861 #define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008
862 #define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010
863 #define DEV_TX_OFFLOAD_TCP_TSO 0x00000020
864 #define DEV_TX_OFFLOAD_UDP_TSO 0x00000040
865 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080
866 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100
867 #define DEV_TX_OFFLOAD_VXLAN_TNL_TSO 0x00000200
868 #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400
869 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800
870 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000
881 struct rte_eth_dev_info {
891 uint32_t max_hash_mac_addrs;
936 #define RTE_ETH_XSTATS_NAME_SIZE 64
960 #define ETH_DCB_NUM_TCS 8
961 #define ETH_MAX_VMDQ_POOL 64
972 }
tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
977 }
tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
995 #define RTE_ETH_QUEUE_STATE_STOPPED 0
996 #define RTE_ETH_QUEUE_STATE_STARTED 1
1000 struct rte_eth_dev_callback;
1002 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
1005 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
1006 if (!rte_eth_dev_is_valid_port(port_id)) { \
1007 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \
1012 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \
1013 if (!rte_eth_dev_is_valid_port(port_id)) { \
1014 RTE_PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \
1024 #define ETH_L2_TUNNEL_ENABLE_MASK 0x00000001
1026 #define ETH_L2_TUNNEL_INSERTION_MASK 0x00000002
1028 #define ETH_L2_TUNNEL_STRIPPING_MASK 0x00000004
1030 #define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008
1038 typedef int (*eth_dev_configure_t)(
struct rte_eth_dev *dev);
1041 typedef int (*eth_dev_start_t)(
struct rte_eth_dev *dev);
1044 typedef void (*eth_dev_stop_t)(
struct rte_eth_dev *dev);
1047 typedef int (*eth_dev_set_link_up_t)(
struct rte_eth_dev *dev);
1050 typedef int (*eth_dev_set_link_down_t)(
struct rte_eth_dev *dev);
1053 typedef void (*eth_dev_close_t)(
struct rte_eth_dev *dev);
1056 typedef void (*eth_promiscuous_enable_t)(
struct rte_eth_dev *dev);
1059 typedef void (*eth_promiscuous_disable_t)(
struct rte_eth_dev *dev);
1062 typedef void (*eth_allmulticast_enable_t)(
struct rte_eth_dev *dev);
1065 typedef void (*eth_allmulticast_disable_t)(
struct rte_eth_dev *dev);
1068 typedef int (*eth_link_update_t)(
struct rte_eth_dev *dev,
1069 int wait_to_complete);
1072 typedef void (*eth_stats_get_t)(
struct rte_eth_dev *dev,
1076 typedef void (*eth_stats_reset_t)(
struct rte_eth_dev *dev);
1079 typedef int (*eth_xstats_get_t)(
struct rte_eth_dev *dev,
1083 typedef void (*eth_xstats_reset_t)(
struct rte_eth_dev *dev);
1086 typedef int (*eth_xstats_get_names_t)(
struct rte_eth_dev *dev,
1090 typedef int (*eth_queue_stats_mapping_set_t)(
struct rte_eth_dev *dev,
1096 typedef void (*eth_dev_infos_get_t)(
struct rte_eth_dev *dev,
1100 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(
struct rte_eth_dev *dev);
1103 typedef int (*eth_queue_start_t)(
struct rte_eth_dev *dev,
1107 typedef int (*eth_queue_stop_t)(
struct rte_eth_dev *dev,
1111 typedef int (*eth_rx_queue_setup_t)(
struct rte_eth_dev *dev,
1112 uint16_t rx_queue_id,
1113 uint16_t nb_rx_desc,
1114 unsigned int socket_id,
1119 typedef int (*eth_tx_queue_setup_t)(
struct rte_eth_dev *dev,
1120 uint16_t tx_queue_id,
1121 uint16_t nb_tx_desc,
1122 unsigned int socket_id,
1126 typedef int (*eth_rx_enable_intr_t)(
struct rte_eth_dev *dev,
1127 uint16_t rx_queue_id);
1130 typedef int (*eth_rx_disable_intr_t)(
struct rte_eth_dev *dev,
1131 uint16_t rx_queue_id);
1134 typedef void (*eth_queue_release_t)(
void *queue);
1137 typedef uint32_t (*eth_rx_queue_count_t)(
struct rte_eth_dev *dev,
1138 uint16_t rx_queue_id);
1141 typedef int (*eth_rx_descriptor_done_t)(
void *rxq, uint16_t offset);
1144 typedef void (*eth_rxq_info_get_t)(
struct rte_eth_dev *dev,
1147 typedef void (*eth_txq_info_get_t)(
struct rte_eth_dev *dev,
1150 typedef int (*mtu_set_t)(
struct rte_eth_dev *dev, uint16_t mtu);
1153 typedef int (*vlan_filter_set_t)(
struct rte_eth_dev *dev,
1158 typedef int (*vlan_tpid_set_t)(
struct rte_eth_dev *dev,
1162 typedef void (*vlan_offload_set_t)(
struct rte_eth_dev *dev,
int mask);
1165 typedef int (*vlan_pvid_set_t)(
struct rte_eth_dev *dev,
1170 typedef void (*vlan_strip_queue_set_t)(
struct rte_eth_dev *dev,
1171 uint16_t rx_queue_id,
1175 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
1180 typedef uint16_t (*eth_tx_burst_t)(
void *txq,
1185 typedef int (*flow_ctrl_get_t)(
struct rte_eth_dev *dev,
1189 typedef int (*flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1193 typedef int (*priority_flow_ctrl_set_t)(
struct rte_eth_dev *dev,
1197 typedef int (*reta_update_t)(
struct rte_eth_dev *dev,
1199 uint16_t reta_size);
1202 typedef int (*reta_query_t)(
struct rte_eth_dev *dev,
1204 uint16_t reta_size);
1207 typedef int (*rss_hash_update_t)(
struct rte_eth_dev *dev,
1211 typedef int (*rss_hash_conf_get_t)(
struct rte_eth_dev *dev,
1215 typedef int (*eth_dev_led_on_t)(
struct rte_eth_dev *dev);
1218 typedef int (*eth_dev_led_off_t)(
struct rte_eth_dev *dev);
1221 typedef void (*eth_mac_addr_remove_t)(
struct rte_eth_dev *dev, uint32_t index);
1224 typedef void (*eth_mac_addr_add_t)(
struct rte_eth_dev *dev,
1230 typedef void (*eth_mac_addr_set_t)(
struct rte_eth_dev *dev,
1234 typedef int (*eth_uc_hash_table_set_t)(
struct rte_eth_dev *dev,
1239 typedef int (*eth_uc_all_hash_table_set_t)(
struct rte_eth_dev *dev,
1243 typedef int (*eth_set_vf_rx_mode_t)(
struct rte_eth_dev *dev,
1249 typedef int (*eth_set_vf_rx_t)(
struct rte_eth_dev *dev,
1254 typedef int (*eth_set_vf_tx_t)(
struct rte_eth_dev *dev,
1259 typedef int (*eth_set_vf_vlan_filter_t)(
struct rte_eth_dev *dev,
1265 typedef int (*eth_set_queue_rate_limit_t)(
struct rte_eth_dev *dev,
1270 typedef int (*eth_set_vf_rate_limit_t)(
struct rte_eth_dev *dev,
1276 typedef int (*eth_mirror_rule_set_t)(
struct rte_eth_dev *dev,
1282 typedef int (*eth_mirror_rule_reset_t)(
struct rte_eth_dev *dev,
1286 typedef int (*eth_udp_tunnel_port_add_t)(
struct rte_eth_dev *dev,
1290 typedef int (*eth_udp_tunnel_port_del_t)(
struct rte_eth_dev *dev,
1294 typedef int (*eth_set_mc_addr_list_t)(
struct rte_eth_dev *dev,
1296 uint32_t nb_mc_addr);
1299 typedef int (*eth_timesync_enable_t)(
struct rte_eth_dev *dev);
1302 typedef int (*eth_timesync_disable_t)(
struct rte_eth_dev *dev);
1305 typedef int (*eth_timesync_read_rx_timestamp_t)(
struct rte_eth_dev *dev,
1306 struct timespec *timestamp,
1310 typedef int (*eth_timesync_read_tx_timestamp_t)(
struct rte_eth_dev *dev,
1311 struct timespec *timestamp);
1314 typedef int (*eth_timesync_adjust_time)(
struct rte_eth_dev *dev, int64_t);
1317 typedef int (*eth_timesync_read_time)(
struct rte_eth_dev *dev,
1318 struct timespec *timestamp);
1321 typedef int (*eth_timesync_write_time)(
struct rte_eth_dev *dev,
1322 const struct timespec *timestamp);
1325 typedef int (*eth_get_reg_t)(
struct rte_eth_dev *dev,
1326 struct rte_dev_reg_info *info);
1329 typedef int (*eth_get_eeprom_length_t)(
struct rte_eth_dev *dev);
1332 typedef int (*eth_get_eeprom_t)(
struct rte_eth_dev *dev,
1333 struct rte_dev_eeprom_info *info);
1336 typedef int (*eth_set_eeprom_t)(
struct rte_eth_dev *dev,
1337 struct rte_dev_eeprom_info *info);
1340 typedef int (*eth_l2_tunnel_eth_type_conf_t)
1344 typedef int (*eth_l2_tunnel_offload_set_t)
1345 (
struct rte_eth_dev *dev,
1351 #ifdef RTE_NIC_BYPASS
1354 RTE_BYPASS_MODE_NONE,
1355 RTE_BYPASS_MODE_NORMAL,
1356 RTE_BYPASS_MODE_BYPASS,
1357 RTE_BYPASS_MODE_ISOLATE,
1358 RTE_BYPASS_MODE_NUM,
1361 #define RTE_BYPASS_MODE_VALID(x) \
1362 ((x) > RTE_BYPASS_MODE_NONE && (x) < RTE_BYPASS_MODE_NUM)
1365 RTE_BYPASS_EVENT_NONE,
1366 RTE_BYPASS_EVENT_START,
1367 RTE_BYPASS_EVENT_OS_ON = RTE_BYPASS_EVENT_START,
1368 RTE_BYPASS_EVENT_POWER_ON,
1369 RTE_BYPASS_EVENT_OS_OFF,
1370 RTE_BYPASS_EVENT_POWER_OFF,
1371 RTE_BYPASS_EVENT_TIMEOUT,
1372 RTE_BYPASS_EVENT_NUM
1375 #define RTE_BYPASS_EVENT_VALID(x) \
1376 ((x) > RTE_BYPASS_EVENT_NONE && (x) < RTE_BYPASS_MODE_NUM)
1380 RTE_BYPASS_TMT_1_5_SEC,
1381 RTE_BYPASS_TMT_2_SEC,
1382 RTE_BYPASS_TMT_3_SEC,
1383 RTE_BYPASS_TMT_4_SEC,
1384 RTE_BYPASS_TMT_8_SEC,
1385 RTE_BYPASS_TMT_16_SEC,
1386 RTE_BYPASS_TMT_32_SEC,
1390 #define RTE_BYPASS_TMT_VALID(x) \
1391 ((x) == RTE_BYPASS_TMT_OFF || \
1392 ((x) > RTE_BYPASS_TMT_OFF && (x) < RTE_BYPASS_TMT_NUM))
1394 typedef void (*bypass_init_t)(
struct rte_eth_dev *dev);
1395 typedef int32_t (*bypass_state_set_t)(
struct rte_eth_dev *dev, uint32_t *new_state);
1396 typedef int32_t (*bypass_state_show_t)(
struct rte_eth_dev *dev, uint32_t *state);
1397 typedef int32_t (*bypass_event_set_t)(
struct rte_eth_dev *dev, uint32_t state, uint32_t event);
1398 typedef int32_t (*bypass_event_show_t)(
struct rte_eth_dev *dev, uint32_t event_shift, uint32_t *event);
1399 typedef int32_t (*bypass_wd_timeout_set_t)(
struct rte_eth_dev *dev, uint32_t timeout);
1400 typedef int32_t (*bypass_wd_timeout_show_t)(
struct rte_eth_dev *dev, uint32_t *wd_timeout);
1401 typedef int32_t (*bypass_ver_show_t)(
struct rte_eth_dev *dev, uint32_t *ver);
1402 typedef int32_t (*bypass_wd_reset_t)(
struct rte_eth_dev *dev);
1405 typedef int (*eth_filter_ctrl_t)(
struct rte_eth_dev *dev,
1411 typedef int (*eth_get_dcb_info)(
struct rte_eth_dev *dev,
1418 struct eth_dev_ops {
1419 eth_dev_configure_t dev_configure;
1420 eth_dev_start_t dev_start;
1421 eth_dev_stop_t dev_stop;
1422 eth_dev_set_link_up_t dev_set_link_up;
1423 eth_dev_set_link_down_t dev_set_link_down;
1424 eth_dev_close_t dev_close;
1425 eth_promiscuous_enable_t promiscuous_enable;
1426 eth_promiscuous_disable_t promiscuous_disable;
1427 eth_allmulticast_enable_t allmulticast_enable;
1428 eth_allmulticast_disable_t allmulticast_disable;
1429 eth_link_update_t link_update;
1430 eth_stats_get_t stats_get;
1431 eth_stats_reset_t stats_reset;
1432 eth_xstats_get_t xstats_get;
1433 eth_xstats_reset_t xstats_reset;
1434 eth_xstats_get_names_t xstats_get_names;
1436 eth_queue_stats_mapping_set_t queue_stats_mapping_set;
1438 eth_dev_infos_get_t dev_infos_get;
1439 eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
1442 vlan_filter_set_t vlan_filter_set;
1443 vlan_tpid_set_t vlan_tpid_set;
1444 vlan_strip_queue_set_t vlan_strip_queue_set;
1445 vlan_offload_set_t vlan_offload_set;
1446 vlan_pvid_set_t vlan_pvid_set;
1447 eth_queue_start_t rx_queue_start;
1448 eth_queue_stop_t rx_queue_stop;
1449 eth_queue_start_t tx_queue_start;
1450 eth_queue_stop_t tx_queue_stop;
1451 eth_rx_queue_setup_t rx_queue_setup;
1452 eth_queue_release_t rx_queue_release;
1453 eth_rx_queue_count_t rx_queue_count;
1454 eth_rx_descriptor_done_t rx_descriptor_done;
1456 eth_rx_enable_intr_t rx_queue_intr_enable;
1458 eth_rx_disable_intr_t rx_queue_intr_disable;
1459 eth_tx_queue_setup_t tx_queue_setup;
1460 eth_queue_release_t tx_queue_release;
1461 eth_dev_led_on_t dev_led_on;
1462 eth_dev_led_off_t dev_led_off;
1463 flow_ctrl_get_t flow_ctrl_get;
1464 flow_ctrl_set_t flow_ctrl_set;
1465 priority_flow_ctrl_set_t priority_flow_ctrl_set;
1466 eth_mac_addr_remove_t mac_addr_remove;
1467 eth_mac_addr_add_t mac_addr_add;
1468 eth_mac_addr_set_t mac_addr_set;
1469 eth_uc_hash_table_set_t uc_hash_table_set;
1470 eth_uc_all_hash_table_set_t uc_all_hash_table_set;
1471 eth_mirror_rule_set_t mirror_rule_set;
1472 eth_mirror_rule_reset_t mirror_rule_reset;
1473 eth_set_vf_rx_mode_t set_vf_rx_mode;
1474 eth_set_vf_rx_t set_vf_rx;
1475 eth_set_vf_tx_t set_vf_tx;
1476 eth_set_vf_vlan_filter_t set_vf_vlan_filter;
1478 eth_udp_tunnel_port_add_t udp_tunnel_port_add;
1480 eth_udp_tunnel_port_del_t udp_tunnel_port_del;
1481 eth_set_queue_rate_limit_t set_queue_rate_limit;
1482 eth_set_vf_rate_limit_t set_vf_rate_limit;
1484 reta_update_t reta_update;
1486 reta_query_t reta_query;
1488 eth_get_reg_t get_reg;
1490 eth_get_eeprom_length_t get_eeprom_length;
1492 eth_get_eeprom_t get_eeprom;
1494 eth_set_eeprom_t set_eeprom;
1497 #ifdef RTE_NIC_BYPASS
1498 bypass_init_t bypass_init;
1499 bypass_state_set_t bypass_state_set;
1500 bypass_state_show_t bypass_state_show;
1501 bypass_event_set_t bypass_event_set;
1502 bypass_event_show_t bypass_event_show;
1503 bypass_wd_timeout_set_t bypass_wd_timeout_set;
1504 bypass_wd_timeout_show_t bypass_wd_timeout_show;
1505 bypass_ver_show_t bypass_ver_show;
1506 bypass_wd_reset_t bypass_wd_reset;
1510 rss_hash_update_t rss_hash_update;
1512 rss_hash_conf_get_t rss_hash_conf_get;
1513 eth_filter_ctrl_t filter_ctrl;
1515 eth_set_mc_addr_list_t set_mc_addr_list;
1516 eth_rxq_info_get_t rxq_info_get;
1518 eth_txq_info_get_t txq_info_get;
1521 eth_timesync_enable_t timesync_enable;
1523 eth_timesync_disable_t timesync_disable;
1525 eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
1527 eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
1530 eth_get_dcb_info get_dcb_info;
1532 eth_timesync_adjust_time timesync_adjust_time;
1534 eth_timesync_read_time timesync_read_time;
1536 eth_timesync_write_time timesync_write_time;
1538 eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
1540 eth_l2_tunnel_offload_set_t l2_tunnel_offload_set;
1566 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
1590 struct rte_mbuf *pkts[], uint16_t nb_pkts,
void *user_param);
1597 struct rte_eth_rxtx_callback {
1598 struct rte_eth_rxtx_callback *next;
1616 struct rte_eth_dev {
1617 eth_rx_burst_t rx_pkt_burst;
1618 eth_tx_burst_t tx_pkt_burst;
1619 struct rte_eth_dev_data *data;
1620 const struct eth_driver *driver;
1621 const struct eth_dev_ops *dev_ops;
1624 struct rte_eth_dev_cb_list link_intr_cbs;
1629 struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1634 struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
1638 struct rte_eth_dev_sriov {
1640 uint8_t nb_q_per_pool;
1641 uint16_t def_vmdq_idx;
1642 uint16_t def_pool_q_idx;
1644 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov)
1646 #define RTE_ETH_NAME_MAX_LEN (32)
1655 struct rte_eth_dev_data {
1656 char name[RTE_ETH_NAME_MAX_LEN];
1660 uint16_t nb_rx_queues;
1661 uint16_t nb_tx_queues;
1663 struct rte_eth_dev_sriov sriov;
1673 uint32_t min_rx_buf_size;
1676 uint64_t rx_mbuf_alloc_failed;
1684 uint8_t promiscuous : 1,
1689 uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1691 uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];
1694 enum rte_kernel_driver kdrv;
1696 const char *drv_name;
1700 #define RTE_ETH_DEV_DETACHABLE 0x0001
1702 #define RTE_ETH_DEV_INTR_LSC 0x0002
1704 #define RTE_ETH_DEV_BONDED_SLAVE 0x0004
1711 extern struct rte_eth_dev rte_eth_devices[];
1737 struct rte_eth_dev *rte_eth_dev_allocated(
const char *name);
1748 struct rte_eth_dev *rte_eth_dev_allocate(
const char *name);
1759 int rte_eth_dev_release_port(
struct rte_eth_dev *eth_dev);
1820 typedef int (*eth_dev_init_t)(
struct rte_eth_dev *eth_dev);
1837 typedef int (*eth_dev_uninit_t)(
struct rte_eth_dev *eth_dev);
1856 eth_dev_init_t eth_dev_init;
1857 eth_dev_uninit_t eth_dev_uninit;
1858 unsigned int dev_private_size;
1904 uint16_t nb_tx_queue,
const struct rte_eth_conf *eth_conf);
1946 uint16_t nb_rx_desc,
unsigned int socket_id,
1994 uint16_t nb_tx_desc,
unsigned int socket_id,
2332 uint16_t tx_queue_id, uint8_t stat_idx);
2352 uint16_t rx_queue_id,
2416 uint32_t *ptypes,
int num);
2643 static inline uint16_t
2645 struct rte_mbuf **rx_pkts,
const uint16_t nb_pkts)
2647 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2650 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
2651 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
2652 RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);
2654 if (queue_id >= dev->data->nb_rx_queues) {
2655 RTE_PMD_DEBUG_TRACE(
"Invalid RX queue_id=%d\n", queue_id);
2659 nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
2662 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
2663 if (
unlikely(dev->post_rx_burst_cbs[queue_id] != NULL)) {
2664 struct rte_eth_rxtx_callback *cb =
2665 dev->post_rx_burst_cbs[queue_id];
2668 nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
2669 nb_pkts, cb->param);
2671 }
while (cb != NULL);
2693 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2694 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
2695 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
2696 return (
int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
2717 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2718 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2719 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
2720 return (*dev->dev_ops->rx_descriptor_done)( \
2721 dev->data->rx_queues[queue_id], offset);
2783 static inline uint16_t
2785 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
2787 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
2789 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
2790 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
2791 RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
2793 if (queue_id >= dev->data->nb_tx_queues) {
2794 RTE_PMD_DEBUG_TRACE(
"Invalid TX queue_id=%d\n", queue_id);
2799 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
2800 struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
2804 nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
2807 }
while (cb != NULL);
2811 return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
2814 typedef void (*buffer_tx_error_fn)(
struct rte_mbuf **unsent, uint16_t count,
2822 buffer_tx_error_fn error_callback;
2823 void *error_userdata;
2836 #define RTE_ETH_TX_BUFFER_SIZE(sz) \
2837 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
2874 static inline uint16_t
2879 uint16_t to_send = buffer->
length;
2890 buffer->error_callback(&buffer->
pkts[sent],
2891 (uint16_t)(to_send - sent),
2892 buffer->error_userdata);
2927 static inline uint16_t __attribute__((always_inline))
2931 buffer->pkts[buffer->length++] = tx_pkt;
2932 if (buffer->length < buffer->size)
2964 buffer_tx_error_fn callback,
void *
userdata);
3102 void _rte_eth_dev_callback_process(
struct rte_eth_dev *dev,
3189 int epfd,
int op,
void *data);
3338 uint16_t reta_size);
3357 uint16_t reta_size);
3564 uint16_t tx_rate, uint64_t q_msk);
3910 void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
3971 struct rte_eth_rxtx_callback *user_cb);
4004 struct rte_eth_rxtx_callback *user_cb);
4128 uint32_t nb_mc_addr);
4174 struct timespec *timestamp, uint32_t flags);
4191 struct timespec *timestamp);
4281 uint16_t queue_id,
size_t size,
int rte_eth_dev_get_vlan_offload(uint8_t port_id)
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
int rte_eth_dev_bypass_state_show(uint8_t port, uint32_t *state)
int rte_eth_dev_set_vlan_ether_type(uint8_t port_id, enum rte_vlan_type vlan_type, uint16_t tag_type)
int rte_eth_dev_udp_tunnel_port_add(uint8_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
uint8_t tc_bws[ETH_DCB_NUM_TCS]
#define ETH_VMDQ_MAX_VLAN_FILTERS
int rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
struct rte_fdir_conf fdir_conf
uint16_t(* rte_rx_callback_fn)(uint8_t port, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts, void *user_param)
int rte_eth_dev_bypass_event_show(uint8_t port, uint32_t event, uint32_t *state)
int rte_eth_dev_bypass_ver_show(uint8_t port, uint32_t *ver)
int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
int rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
void rte_eth_stats_reset(uint8_t port_id)
int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
void rte_eth_allmulticast_disable(uint8_t port_id)
int rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
int rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS]
int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id, struct rte_eth_rxtx_callback *user_cb)
int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type, enum rte_filter_op filter_op, void *arg)
struct rte_eth_thresh rx_thresh
int rte_eth_dev_bypass_event_store(uint8_t port, uint32_t event, uint32_t state)
int rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf)
int rte_eth_dev_callback_unregister(uint8_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
int rte_eth_dev_bypass_state_set(uint8_t port, uint32_t *new_state)
int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc_conf)
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_rx_queue_info_get(uint8_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
void rte_eth_dev_stop(uint8_t port_id)
int rte_eth_dev_rss_reta_update(uint8_t port, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
void rte_eth_xstats_reset(uint8_t port_id)
enum rte_fdir_status_mode status
void rte_eth_promiscuous_disable(uint8_t port_id)
enum rte_eth_tx_mq_mode mq_mode
int rte_eth_dev_start(uint8_t port_id)
uint8_t enable_default_pool
int rte_eth_dev_rss_hash_conf_get(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
int rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *time)
int rte_eth_mirror_rule_set(uint8_t port_id, struct rte_eth_mirror_conf *mirror_conf, uint8_t rule_id, uint8_t on)
int rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id)
int rte_eth_allmulticast_get(uint8_t port_id)
struct rte_eth_rss_conf rss_conf
int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time)
int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
static int rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
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
uint16_t(* rte_tx_callback_fn)(uint8_t port, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
void * rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id, rte_tx_callback_fn fn, void *user_param)
int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
int rte_eth_dev_get_dcb_info(uint8_t port_id, struct rte_eth_dcb_info *dcb_info)
__extension__ uint16_t header_split
int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate, uint64_t q_msk)
int rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
union rte_eth_conf::@48 tx_adv_conf
struct rte_eth_thresh tx_thresh
int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num)
uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES]
int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats, unsigned n)
int rte_eth_promiscuous_get(uint8_t port_id)
int rte_eth_dev_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mode, uint8_t on)
uint8_t rx_deferred_start
void rte_eth_promiscuous_enable(uint8_t port_id)
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_vmdq_dcb_conf::@45 pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]
struct rte_eth_txconf conf
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
struct rte_intr_conf intr_conf
int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
#define RTE_ETH_XSTATS_NAME_SIZE
int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
int rte_eth_timesync_disable(uint8_t port_id)
__extension__ uint16_t hw_vlan_strip
struct rte_pci_device * pci_dev
int rte_eth_dev_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout)
__extension__ uint16_t hw_vlan_filter
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
struct rte_eth_dcb_rx_conf dcb_rx_conf
struct rte_eth_dcb_tc_queue_mapping::@50 tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
int rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp, uint32_t flags)
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
int rte_eth_xstats_get_names(uint8_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned size)
enum rte_eth_rx_mq_mode mq_mode
void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link)
int rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
void rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_dev)
int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr, uint32_t pool)
int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
int rte_eth_dev_set_link_down(uint8_t port_id)
int rte_eth_dev_socket_id(uint8_t port_id)
struct rte_eth_dcb_tx_conf dcb_tx_conf
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_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
int rte_eth_dev_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
int rte_eth_led_off(uint8_t port_id)
int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr)
int rte_eth_dev_is_valid_port(uint8_t port_id)
int rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel, uint32_t mask, uint8_t en)
int rte_eth_dev_bypass_init(uint8_t port)
int rte_eth_dev_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link)
struct rte_eth_rxconf conf
int rte_eth_rx_queue_setup(uint8_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)
__extension__ uint16_t enable_lro
#define ETH_DCB_NUM_USER_PRIORITIES
int rte_eth_dev_uc_all_hash_table_set(uint8_t port, uint8_t on)
struct rte_eth_vlan_mirror vlan
int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
__extension__ uint16_t jumbo_frame
int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id, uint8_t stat_idx)
struct rte_eth_conf::@47 rx_adv_conf
int rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
static uint16_t rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
uint8_t rte_eth_dev_count(void)
__extension__ uint8_t hw_vlan_insert_pvid
uint64_t flow_type_rss_offloads
TAILQ_HEAD(rte_driver_list, rte_driver)
static uint16_t rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
int rte_eth_dev_wd_timeout_store(uint8_t port, uint32_t timeout)
int rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_timesync_enable(uint8_t port_id)
int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_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_set_link_up(uint8_t port_id)
__extension__ uint8_t hw_vlan_reject_untagged
struct rte_mempool * pool
int rte_eth_dev_detach(uint8_t port_id, char *devname)
#define __rte_cache_min_aligned
__extension__ uint16_t hw_ip_checksum
#define ETH_MQ_RX_RSS_FLAG
struct rte_eth_dcb_tc_queue_mapping::@49 tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
int rte_eth_dev_set_mc_addr_list(uint8_t port_id, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id, struct rte_eth_rxtx_callback *user_cb)
static uint16_t rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer)
int rte_eth_led_on(uint8_t port_id)
#define ETH_MIRROR_MAX_VLANS
int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx, uint16_t tx_rate)
__extension__ uint16_t hw_vlan_extend
int rte_eth_dev_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id, uint64_t vf_mask, uint8_t vlan_on)
#define __rte_cache_aligned
struct rte_eth_fdir_flex_conf flex_conf
void(* rte_eth_dev_cb_fn)(uint8_t port_id, enum rte_eth_event_type event, void *cb_arg)
static int rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
void rte_eth_allmulticast_enable(uint8_t port_id)
void rte_eth_dev_close(uint8_t port_id)
int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
int rte_eth_dev_rss_reta_query(uint8_t port, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int on)
enum rte_fdir_pballoc_type pballoc
char name[RTE_MEMZONE_NAMESIZE]
__extension__ uint8_t hw_vlan_reject_tagged
int rte_eth_dev_uc_hash_table_set(uint8_t port, struct ether_addr *addr, uint8_t on)
static uint16_t rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id, struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id)
int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)
uint8_t mac_ctrl_frame_fwd
int rte_eth_dev_get_eeprom_length(uint8_t port_id)
enum rte_eth_fc_mode mode
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
uint8_t tx_deferred_start
int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
int rte_eth_dev_bypass_wd_reset(uint8_t port)
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
struct rte_eth_fc_conf fc
struct rte_eth_txmode txmode
void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id, uint8_t stat_idx)
int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)
int rte_eth_dev_callback_register(uint8_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
int rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel)
void * rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr)