DPDK
20.05.0
|
#include <rte_ethdev.h>
Go to the source code of this file.
Data Structures | |
struct | rte_eth_devargs |
Macros | |
#define | RTE_ETH_QUEUE_STATE_STOPPED 0 |
Functions | |
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) |
__rte_experimental int | rte_eth_switch_domain_alloc (uint16_t *domain_id) |
__rte_experimental int | rte_eth_switch_domain_free (uint16_t domain_id) |
__rte_experimental int | rte_eth_devargs_parse (const char *devargs, struct rte_eth_devargs *eth_devargs) |
__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) |
RTE Ethernet Device PMD API
These APIs for the use from Ethernet drivers, user applications shouldn't use them.
Definition in file rte_ethdev_driver.h.
#define RTE_ETH_QUEUE_STATE_STOPPED 0 |
RX/TX queue states
Definition at line 27 of file rte_ethdev_driver.h.
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 | ||
) |
Create memzone for HW rings. malloc can't be used as the physical address is needed. If the memzone is already created, then this function returns a ptr to the old one.
eth_dev | The eth_dev pointer is the address of the rte_eth_dev structure |
name | The name of the memory zone |
queue_id | The index of the queue to add to name |
size | The sizeof of the memory area |
align | Alignment for resulting memzone. Must be a power of 2. |
socket_id | The socket_id argument is the socket identifier in case of NUMA. |
__rte_experimental int rte_eth_switch_domain_alloc | ( | uint16_t * | domain_id | ) |
Allocate an unique switch domain identifier.
A pool of switch domain identifiers which can be allocated on request. This will enabled devices which support the concept of switch domains to request a switch domain id which is guaranteed to be unique from other devices running in the same process.
domain_id | switch domain identifier parameter to pass back to application |
__rte_experimental int rte_eth_switch_domain_free | ( | uint16_t | domain_id | ) |
Free switch domain.
Return a switch domain identifier to the pool of free identifiers after it is no longer in use by device.
domain_id | switch domain identifier to free |
__rte_experimental int rte_eth_devargs_parse | ( | const char * | devargs, |
struct rte_eth_devargs * | eth_devargs | ||
) |
PMD helper function to parse ethdev arguments
devargs | device arguments |
eth_devargs | parsed ethdev specific arguments. |
__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 | ||
) |
PMD helper function for the creation of a new ethdev ports.
device | rte_device handle. |
name | port name. |
priv_data_size | size of private data required for port. |
bus_specific_init | port bus specific initialisation callback function |
bus_init_params | port bus specific initialisation parameters |
ethdev_init | device specific port initialization callback function |
init_params | port initialisation parameters |
__rte_experimental int rte_eth_dev_destroy | ( | struct rte_eth_dev * | ethdev, |
ethdev_uninit_t | ethdev_uninit | ||
) |
PMD helper function for cleaning up the resources of a ethdev port on it's destruction.
ethdev | ethdev handle of port. |
ethdev_uninit | device specific port un-initialise callback function |