DPDK  20.11.10
Data Structures | Macros | Typedefs | Enumerations | 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
 
struct  rte_eth_ethertype_filter
 
struct  rte_eth_syn_filter
 
struct  rte_eth_tunnel_filter_conf
 

Macros

#define RTE_ETHTYPE_FLAGS_MAC   0x0001
 
#define RTE_ETHTYPE_FLAGS_DROP   0x0002
 
#define ETH_TUNNEL_FILTER_OMAC   0x01
 
#define ETH_TUNNEL_FILTER_OIP   0x02
 
#define ETH_TUNNEL_FILTER_TENID   0x04
 
#define ETH_TUNNEL_FILTER_IMAC   0x08
 
#define ETH_TUNNEL_FILTER_IVLAN   0x10
 
#define ETH_TUNNEL_FILTER_IIP   0x20
 

Typedefs

typedef int(* eth_is_removed_t) (struct rte_eth_dev *dev)
 

Enumerations

enum  rte_filter_type
 
enum  rte_filter_op { RTE_ETH_FILTER_GET }
 
enum  rte_tunnel_iptype { RTE_TUNNEL_IPTYPE_IPV4 = 0, RTE_TUNNEL_IPTYPE_IPV6 }
 

Functions

__rte_internal const 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)
 
__rte_internal int rte_eth_dma_zone_free (const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id)
 
__rte_internal int rte_eth_switch_domain_alloc (uint16_t *domain_id)
 
__rte_internal int rte_eth_switch_domain_free (uint16_t domain_id)
 
__rte_internal int rte_eth_devargs_parse (const char *devargs, struct rte_eth_devargs *eth_devargs)
 
__rte_internal 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_internal int 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.

Macro Definition Documentation

◆ RTE_ETHTYPE_FLAGS_MAC

#define RTE_ETHTYPE_FLAGS_MAC   0x0001

Define all structures for Ethertype Filter type.If set, compare mac

Definition at line 1376 of file rte_ethdev_driver.h.

◆ RTE_ETHTYPE_FLAGS_DROP

#define RTE_ETHTYPE_FLAGS_DROP   0x0002

If set, drop packet when match

Definition at line 1377 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_OMAC

#define ETH_TUNNEL_FILTER_OMAC   0x01

filter type of tunneling packetfilter by outer MAC addr

Definition at line 1403 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_OIP

#define ETH_TUNNEL_FILTER_OIP   0x02

filter by outer IP Addr

Definition at line 1404 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_TENID

#define ETH_TUNNEL_FILTER_TENID   0x04

filter by tenant ID

Definition at line 1405 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_IMAC

#define ETH_TUNNEL_FILTER_IMAC   0x08

filter by inner MAC addr

Definition at line 1406 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_IVLAN

#define ETH_TUNNEL_FILTER_IVLAN   0x10

filter by inner VLAN ID

Definition at line 1407 of file rte_ethdev_driver.h.

◆ ETH_TUNNEL_FILTER_IIP

#define ETH_TUNNEL_FILTER_IIP   0x20

filter by inner IP addr

Definition at line 1408 of file rte_ethdev_driver.h.

Typedef Documentation

◆ eth_is_removed_t

typedef int(* eth_is_removed_t) (struct rte_eth_dev *dev)

<

Definition at line 58 of file rte_ethdev_driver.h.

Enumeration Type Documentation

◆ rte_filter_type

Feature filter types

Definition at line 475 of file rte_ethdev_driver.h.

◆ rte_filter_op

Generic operations on filters

Enumerator
RTE_ETH_FILTER_GET 

get flow API ops

Definition at line 491 of file rte_ethdev_driver.h.

◆ rte_tunnel_iptype

Select IPv4 or IPv6 for tunnel filters.

Enumerator
RTE_TUNNEL_IPTYPE_IPV4 

IPv4.

RTE_TUNNEL_IPTYPE_IPV6 

IPv6.

Definition at line 1424 of file rte_ethdev_driver.h.

Function Documentation

◆ rte_eth_dma_zone_reserve()

__rte_internal 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.

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.

◆ rte_eth_dma_zone_free()

__rte_internal int rte_eth_dma_zone_free ( const struct rte_eth_dev *  eth_dev,
const char *  name,
uint16_t  queue_id 
)

Free previously allocated memzone for HW rings.

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
Returns
Negative errno value on error, 0 on success.

◆ rte_eth_switch_domain_alloc()

__rte_internal 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.

Parameters
domain_idswitch domain identifier parameter to pass back to application
Returns
Negative errno value on error, 0 on success.

◆ rte_eth_switch_domain_free()

__rte_internal 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.

Parameters
domain_idswitch domain identifier to free
Returns
Negative errno value on error, 0 on success.

◆ rte_eth_devargs_parse()

__rte_internal int rte_eth_devargs_parse ( const char *  devargs,
struct rte_eth_devargs eth_devargs 
)

PMD helper function to parse ethdev arguments

Parameters
devargsdevice arguments
eth_devargsparsed ethdev specific arguments.
Returns
Negative errno value on error, 0 on success.

◆ rte_eth_dev_create()

__rte_internal 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.

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.

◆ rte_eth_dev_destroy()

__rte_internal 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.

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