DPDK  23.07.0
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 
21 struct rte_eth_dev_callback;
23 RTE_TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
24 
25 struct rte_eth_dev;
26 
30 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
31  struct rte_mbuf **rx_pkts,
32  uint16_t nb_pkts);
33 
37 typedef uint16_t (*eth_tx_burst_t)(void *txq,
38  struct rte_mbuf **tx_pkts,
39  uint16_t nb_pkts);
40 
44 typedef uint16_t (*eth_tx_prep_t)(void *txq,
45  struct rte_mbuf **tx_pkts,
46  uint16_t nb_pkts);
47 
48 
50 typedef uint32_t (*eth_rx_queue_count_t)(void *rxq);
51 
53 typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
54 
56 typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
57 
65 struct rte_ethdev_qdata {
67  void **data;
69  void **clbk;
70 };
71 
79 struct rte_eth_fp_ops {
80 
87  eth_rx_burst_t rx_pkt_burst;
89  eth_rx_queue_count_t rx_queue_count;
91  eth_rx_descriptor_status_t rx_descriptor_status;
93  struct rte_ethdev_qdata rxq;
94  uintptr_t reserved1[3];
103  eth_tx_burst_t tx_pkt_burst;
105  eth_tx_prep_t tx_pkt_prepare;
107  eth_tx_descriptor_status_t tx_descriptor_status;
109  struct rte_ethdev_qdata txq;
110  uintptr_t reserved2[3];
114 
115 extern struct rte_eth_fp_ops rte_eth_fp_ops[RTE_MAX_ETHPORTS];
116 
117 #endif /* _RTE_ETHDEV_CORE_H_ */
uint16_t txq
RTE_TAILQ_HEAD(rte_class_list, rte_class)
#define __rte_cache_aligned
Definition: rte_common.h:440