DPDK 23.11.2
Loading...
Searching...
No Matches
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
19struct rte_eth_dev_callback;
21RTE_TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
22
23struct rte_eth_dev;
24
28typedef uint16_t (*eth_rx_burst_t)(void *rxq,
29 struct rte_mbuf **rx_pkts,
30 uint16_t nb_pkts);
31
35typedef uint16_t (*eth_tx_burst_t)(void *txq,
36 struct rte_mbuf **tx_pkts,
37 uint16_t nb_pkts);
38
42typedef uint16_t (*eth_tx_prep_t)(void *txq,
43 struct rte_mbuf **tx_pkts,
44 uint16_t nb_pkts);
45
46
48typedef uint32_t (*eth_rx_queue_count_t)(void *rxq);
49
51typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
52
54typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
55
57typedef uint16_t (*eth_recycle_tx_mbufs_reuse_t)(void *txq,
58 struct rte_eth_recycle_rxq_info *recycle_rxq_info);
59
61typedef void (*eth_recycle_rx_descriptors_refill_t)(void *rxq, uint16_t nb);
62
70struct rte_ethdev_qdata {
72 void **data;
74 RTE_ATOMIC(void *) *clbk;
75};
76
84struct rte_eth_fp_ops {
85
92 struct rte_ethdev_qdata rxq;
94 eth_rx_burst_t rx_pkt_burst;
96 eth_rx_queue_count_t rx_queue_count;
98 eth_rx_descriptor_status_t rx_descriptor_status;
100 eth_recycle_rx_descriptors_refill_t recycle_rx_descriptors_refill;
101 uintptr_t reserved1[2];
110 struct rte_ethdev_qdata txq;
112 eth_tx_burst_t tx_pkt_burst;
114 eth_tx_prep_t tx_pkt_prepare;
116 eth_tx_descriptor_status_t tx_descriptor_status;
118 eth_recycle_tx_mbufs_reuse_t recycle_tx_mbufs_reuse;
119 uintptr_t reserved2[2];
123
124extern struct rte_eth_fp_ops rte_eth_fp_ops[RTE_MAX_ETHPORTS];
125
126#endif /* _RTE_ETHDEV_CORE_H_ */
RTE_TAILQ_HEAD(rte_class_list, rte_class)
#define __rte_cache_aligned
Definition rte_common.h:524
uint16_t txq