DPDK  18.05.1
Data Structures | Functions
rte_ethdev_driver.h File Reference
#include <rte_ethdev.h>

Go to the source code of this file.

Data Structures

struct  rte_eth_devargs

Functions

struct rte_memzonerte_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)
int __rte_experimental rte_eth_switch_domain_alloc (uint16_t *domain_id)
int __rte_experimental rte_eth_switch_domain_free (uint16_t domain_id)
int __rte_experimental rte_eth_devargs_parse (const char *devargs, struct rte_eth_devargs *eth_devargs)
int __rte_experimental 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)
int __rte_experimental rte_eth_dev_destroy (struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit)

Detailed Description

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.

Function Documentation

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 
)
read

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.

Parameters
eth_devThe eth_dev pointer is the address of the rte_eth_dev structure
nameThe name of the memory zone
queue_idThe index of the queue to add to name
sizeThe sizeof of the memory area
alignAlignment for resulting memzone. Must be a power of 2.
socket_idThe socket_id argument is the socket identifier in case of NUMA.
int __rte_experimental rte_eth_switch_domain_alloc ( uint16_t *  domain_id)
Warning
EXPERIMENTAL: this API may change without prior notice.

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.

Parameters
domain_idswitch domain identifier parameter to pass back to application
Returns
Negative errno value on error, 0 on success.
int __rte_experimental rte_eth_switch_domain_free ( uint16_t  domain_id)
Warning
EXPERIMENTAL: this API may change without prior notice.

Free switch domain.

Return a switch domain identifier to the pool of free identifiers after it is no longer in use by device.

Parameters
domain_idswitch domain identifier to free
Returns
Negative errno value on error, 0 on success.
int __rte_experimental rte_eth_devargs_parse ( const char *  devargs,
struct rte_eth_devargs eth_devargs 
)
Warning
EXPERIMENTAL: this API may change without prior notice.

PMD helper function to parse ethdev arguments

Parameters
devargsdevice arguments
eth_devargsparsed ethdev specific arguments.
Returns
Negative errno value on error, 0 on success.
int __rte_experimental 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 
)
Warning
EXPERIMENTAL: this API may change without prior notice.

PMD helper function for the creation of a new ethdev ports.

Parameters
devicerte_device handle.
nameport name.
priv_data_sizesize of private data required for port.
bus_specific_initport bus specific initialisation callback function
bus_init_paramsport bus specific initialisation parameters
ethdev_initdevice specific port initialization callback function
init_paramsport initialisation parameters
Returns
Negative errno value on error, 0 on success.
int __rte_experimental rte_eth_dev_destroy ( struct rte_eth_dev *  ethdev,
ethdev_uninit_t  ethdev_uninit 
)
Warning
EXPERIMENTAL: this API may change without prior notice.

PMD helper function for cleaing up the resources of a ethdev port on it's destruction.

Parameters
ethdevethdev handle of port.
ethdev_uninitdevice specific port un-initialise callback function
Returns
Negative errno value on error, 0 on success.