DPDK 22.11.7
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
22struct rte_eth_dev_callback;
24RTE_TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
25
26struct rte_eth_dev;
27
31typedef uint16_t (*eth_rx_burst_t)(void *rxq,
32 struct rte_mbuf **rx_pkts,
33 uint16_t nb_pkts);
34
38typedef uint16_t (*eth_tx_burst_t)(void *txq,
39 struct rte_mbuf **tx_pkts,
40 uint16_t nb_pkts);
41
45typedef uint16_t (*eth_tx_prep_t)(void *txq,
46 struct rte_mbuf **tx_pkts,
47 uint16_t nb_pkts);
48
49
51typedef uint32_t (*eth_rx_queue_count_t)(void *rxq);
52
54typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
55
57typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
58
66struct rte_ethdev_qdata {
68 void **data;
70 void **clbk;
71};
72
80struct 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
116extern struct rte_eth_fp_ops rte_eth_fp_ops[RTE_MAX_ETHPORTS];
117
118#endif /* _RTE_ETHDEV_CORE_H_ */
RTE_TAILQ_HEAD(rte_class_list, rte_class)
#define __rte_cache_aligned
Definition: rte_common.h:440
uint16_t txq