5 #ifndef _RTE_ETHDEV_CORE_H_ 6 #define _RTE_ETHDEV_CORE_H_ 22 struct rte_eth_dev_callback;
24 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
28 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
33 typedef uint16_t (*eth_tx_burst_t)(
void *
txq,
38 typedef uint16_t (*eth_tx_prep_t)(
void *
txq,
44 typedef uint32_t (*eth_rx_queue_count_t)(
struct rte_eth_dev *dev,
45 uint16_t rx_queue_id);
48 typedef int (*eth_rx_descriptor_done_t)(
void *rxq, uint16_t offset);
51 typedef int (*eth_rx_descriptor_status_t)(
void *rxq, uint16_t offset);
54 typedef int (*eth_tx_descriptor_status_t)(
void *txq, uint16_t offset);
63 struct rte_eth_rxtx_callback {
64 struct rte_eth_rxtx_callback *next;
83 eth_rx_burst_t rx_pkt_burst;
84 eth_tx_burst_t tx_pkt_burst;
85 eth_tx_prep_t tx_pkt_prepare;
87 eth_rx_queue_count_t rx_queue_count;
88 eth_rx_descriptor_done_t rx_descriptor_done;
89 eth_rx_descriptor_status_t rx_descriptor_status;
90 eth_tx_descriptor_status_t tx_descriptor_status;
97 struct rte_eth_dev_data *data;
98 void *process_private;
99 const struct eth_dev_ops *dev_ops;
103 struct rte_eth_dev_cb_list link_intr_cbs;
108 struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
113 struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
117 uint64_t reserved_64s[4];
118 void *reserved_ptrs[4];
121 struct rte_eth_dev_sriov;
122 struct rte_eth_dev_owner;
131 struct rte_eth_dev_data {
132 char name[RTE_ETH_NAME_MAX_LEN];
136 uint16_t nb_rx_queues;
137 uint16_t nb_tx_queues;
139 struct rte_eth_dev_sriov sriov;
149 uint32_t min_rx_buf_size;
152 uint64_t rx_mbuf_alloc_failed;
166 uint8_t promiscuous : 1,
175 uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];
177 uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];
183 struct rte_eth_dev_owner owner;
184 uint16_t representor_id;
189 pthread_mutex_t flow_ops_mutex;
190 uint64_t reserved_64s[4];
191 void *reserved_ptrs[4];
199 extern struct rte_eth_dev rte_eth_devices[];
#define ETH_NUM_RECEIVE_MAC_ADDR
uint16_t(* rte_tx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
#define __rte_cache_aligned
TAILQ_HEAD(vdev_driver_list, rte_vdev_driver)
uint16_t(* rte_rx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts, void *user_param)