5 #ifndef _RTE_ETHDEV_DRIVER_H_
6 #define _RTE_ETHDEV_DRIVER_H_
27 #define RTE_ETH_QUEUE_STATE_STOPPED 0
28 #define RTE_ETH_QUEUE_STATE_STARTED 1
29 #define RTE_ETH_QUEUE_STATE_HAIRPIN 2
43 int rte_eth_dev_is_rx_hairpin_queue(
struct rte_eth_dev *dev, uint16_t queue_id);
57 int rte_eth_dev_is_tx_hairpin_queue(
struct rte_eth_dev *dev, uint16_t queue_id);
68 struct rte_eth_dev *rte_eth_dev_allocated(
const char *name);
79 struct rte_eth_dev *rte_eth_dev_allocate(
const char *name);
92 struct rte_eth_dev *rte_eth_dev_attach_secondary(
const char *name);
110 int rte_eth_dev_release_port(
struct rte_eth_dev *eth_dev);
123 void _rte_eth_dev_reset(
struct rte_eth_dev *dev);
142 int _rte_eth_dev_callback_process(
struct rte_eth_dev *dev,
157 void rte_eth_dev_probing_finish(
struct rte_eth_dev *dev);
180 uint16_t queue_id,
size_t size,
199 rte_eth_linkstatus_set(
struct rte_eth_dev *dev,
202 volatile uint64_t *dev_link
203 = (
volatile uint64_t *)&(dev->data->dev_link);
212 *(
const uint64_t *)new_link);
214 return (orig.link.link_status == new_link->
link_status) ? -1 : 0;
227 rte_eth_linkstatus_get(
const struct rte_eth_dev *dev,
230 volatile uint64_t *src = (uint64_t *)&(dev->data->dev_link);
231 uint64_t *dst = (uint64_t *)link;
288 uint16_t ports[RTE_MAX_ETHPORTS];
317 typedef int (*ethdev_init_t)(
struct rte_eth_dev *ethdev,
void *init_params);
318 typedef int (*ethdev_bus_specific_init)(
struct rte_eth_dev *ethdev,
319 void *bus_specific_init_params);
348 size_t priv_data_size,
349 ethdev_bus_specific_init bus_specific_init,
void *bus_init_params,
350 ethdev_init_t ethdev_init,
void *init_params);
353 typedef int (*ethdev_uninit_t)(
struct rte_eth_dev *ethdev);
const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size, unsigned align, int socket_id)
uint16_t nb_representor_ports
__rte_experimental int rte_eth_switch_domain_free(uint16_t domain_id)
__rte_experimental int rte_eth_switch_domain_alloc(uint16_t *domain_id)
#define RTE_BUILD_BUG_ON(condition)
static int rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t exp, uint64_t src)
__rte_experimental int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size, ethdev_bus_specific_init bus_specific_init, void *bus_init_params, ethdev_init_t ethdev_init, void *init_params)
__rte_experimental int rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit)
char name[RTE_MEMZONE_NAMESIZE]
__rte_experimental int rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs)
static uint64_t rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
uint16_t representor_ports[RTE_MAX_ETHPORTS]