DPDK  21.11.8
rte_ethdev_core.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
5 #ifndef _RTE_ETHDEV_CORE_H_
6 #define _RTE_ETHDEV_CORE_H_
7 
8 #include <pthread.h>
9 
22 struct rte_eth_dev_callback;
24 RTE_TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
25 
26 struct rte_eth_dev;
27 
31 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
32  struct rte_mbuf **rx_pkts,
33  uint16_t nb_pkts);
34 
38 typedef uint16_t (*eth_tx_burst_t)(void *txq,
39  struct rte_mbuf **tx_pkts,
40  uint16_t nb_pkts);
41 
45 typedef uint16_t (*eth_tx_prep_t)(void *txq,
46  struct rte_mbuf **tx_pkts,
47  uint16_t nb_pkts);
48 
49 
51 typedef uint32_t (*eth_rx_queue_count_t)(void *rxq);
52 
54 typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
55 
57 typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
58 
66 struct rte_ethdev_qdata {
68  void **data;
70  void **clbk;
71 };
72 
80 struct rte_eth_fp_ops {
81 
88  eth_rx_burst_t rx_pkt_burst;
90  eth_rx_queue_count_t rx_queue_count;
92  eth_rx_descriptor_status_t rx_descriptor_status;
94  struct rte_ethdev_qdata rxq;
95  uintptr_t reserved1[3];
104  eth_tx_burst_t tx_pkt_burst;
106  eth_tx_prep_t tx_pkt_prepare;
108  eth_tx_descriptor_status_t tx_descriptor_status;
110  struct rte_ethdev_qdata txq;
111  uintptr_t reserved2[3];
115 
116 extern struct rte_eth_fp_ops rte_eth_fp_ops[RTE_MAX_ETHPORTS];
117 
118 #endif /* _RTE_ETHDEV_CORE_H_ */
uint16_t txq
RTE_TAILQ_HEAD(vdev_driver_list, rte_vdev_driver)
#define __rte_cache_aligned
Definition: rte_common.h:420