5 #ifndef _RTE_ETHDEV_CORE_H_ 6 #define _RTE_ETHDEV_CORE_H_ 23 struct rte_eth_dev_callback;
25 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
29 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
34 typedef uint16_t (*eth_tx_burst_t)(
void *
txq,
39 typedef uint16_t (*eth_tx_prep_t)(
void *
txq,
45 typedef uint32_t (*eth_rx_queue_count_t)(
struct rte_eth_dev *dev,
46 uint16_t rx_queue_id);
49 typedef int (*eth_rx_descriptor_done_t)(
void *rxq, uint16_t offset);
52 typedef int (*eth_rx_descriptor_status_t)(
void *rxq, uint16_t offset);
55 typedef int (*eth_tx_descriptor_status_t)(
void *txq, uint16_t offset);
64 struct rte_eth_rxtx_callback {
65 struct rte_eth_rxtx_callback *next;
84 eth_rx_burst_t rx_pkt_burst;
85 eth_tx_burst_t tx_pkt_burst;
86 eth_tx_prep_t tx_pkt_prepare;
88 eth_rx_queue_count_t rx_queue_count;
89 eth_rx_descriptor_done_t rx_descriptor_done;
90 eth_rx_descriptor_status_t rx_descriptor_status;
91 eth_tx_descriptor_status_t tx_descriptor_status;
98 struct rte_eth_dev_data *data;
99 void *process_private;
100 const struct eth_dev_ops *dev_ops;
104 struct rte_eth_dev_cb_list link_intr_cbs;
109 struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
114 struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
118 uint64_t reserved_64s[4];
119 void *reserved_ptrs[4];
122 struct rte_eth_dev_sriov;
123 struct rte_eth_dev_owner;
132 struct rte_eth_dev_data {
133 char name[RTE_ETH_NAME_MAX_LEN];
137 uint16_t nb_rx_queues;
138 uint16_t nb_tx_queues;
140 struct rte_eth_dev_sriov sriov;
150 uint32_t min_rx_buf_size;
153 uint64_t rx_mbuf_alloc_failed;
167 uint8_t promiscuous : 1,
172 uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];
174 uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];
180 struct rte_eth_dev_owner owner;
181 uint16_t representor_id;
186 pthread_mutex_t flow_ops_mutex;
187 uint64_t reserved_64s[4];
188 void *reserved_ptrs[4];
196 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)