DPDK  19.11.4
Enumerations | Functions
rte_bpf_ethdev.h File Reference
#include <rte_bpf.h>

Go to the source code of this file.

Enumerations

enum  { ,
  RTE_QDMA_MODE_HW, RTE_QDMA_MODE_VIRTUAL , RTE_MIN_ERRNO = __ELASTERROR, E_RTE_SECONDARY,
  E_RTE_NO_CONFIG, RTE_MAX_ERRNO , CFG_FLAG_GLOBAL_SECTION = 1, CFG_FLAG_EMPTY_VALUES = 2,
  IP_LAST_FRAG_IDX, IP_FIRST_FRAG_IDX, IP_MIN_FRAG_NUM, IP_MAX_FRAG_NUM = RTE_LIBRTE_IP_FRAG_MAX_FRAG ,
  RTE_RIB_GET_NXT_ALL, RTE_RIB_GET_NXT_COVER, RTE_RIB6_GET_NXT_ALL, RTE_RIB6_GET_NXT_COVER
}
 

Functions

__rte_experimental void rte_bpf_eth_rx_unload (uint16_t port, uint16_t queue)
 
__rte_experimental void rte_bpf_eth_tx_unload (uint16_t port, uint16_t queue)
 
__rte_experimental int rte_bpf_eth_rx_elf_load (uint16_t port, uint16_t queue, const struct rte_bpf_prm *prm, const char *fname, const char *sname, uint32_t flags)
 
__rte_experimental int rte_bpf_eth_tx_elf_load (uint16_t port, uint16_t queue, const struct rte_bpf_prm *prm, const char *fname, const char *sname, uint32_t flags)
 

Detailed Description

EXPERIMENTAL: this API may change without prior notice

API to install BPF filter as RX/TX callbacks for eth devices. Note that right now:

Definition in file rte_bpf_ethdev.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RTE_QDMA_MODE_HW 

Allocate a H/W queue per VQ i.e. Exclusive hardware queue for a VQ. This mode will have best performance.

RTE_QDMA_MODE_VIRTUAL 

A VQ shall not have an exclusive associated H/W queue. Rather a H/W Queue will be shared by multiple Virtual Queues. This mode will have intermediate data structures to support multi VQ to PQ mappings thus having some performance implications. Note: Even in this mode there is an option to allocate a H/W queue for a VQ. Please see 'RTE_QDMA_VQ_EXCLUSIVE_PQ' flag.

RTE_MIN_ERRNO 

Start numbering above std errno vals

E_RTE_SECONDARY 

Operation not allowed in secondary processes

E_RTE_NO_CONFIG 

Missing rte_config

RTE_MAX_ERRNO 

Max RTE error number

CFG_FLAG_GLOBAL_SECTION 

Indicates that the file supports key value entries before the first defined section. These entries can be accessed in the "GLOBAL" section.

CFG_FLAG_EMPTY_VALUES 

Indicates that file supports key value entries where the value can be zero length (e.g., "key=").

IP_LAST_FRAG_IDX 

index of last fragment

IP_FIRST_FRAG_IDX 

index of first fragment

IP_MIN_FRAG_NUM 

minimum number of fragments

IP_MAX_FRAG_NUM 

maximum number of fragments per packet

RTE_RIB_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

RTE_RIB6_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB6_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

Definition at line 34 of file rte_bpf_ethdev.h.

Function Documentation

◆ rte_bpf_eth_rx_unload()

__rte_experimental void rte_bpf_eth_rx_unload ( uint16_t  port,
uint16_t  queue 
)

Unload previously loaded BPF program (if any) from given RX port/queue and remove appropriate RX port/queue callback.

Parameters
portThe identifier of the ethernet port
queueThe identifier of the RX queue on the given port

◆ rte_bpf_eth_tx_unload()

__rte_experimental void rte_bpf_eth_tx_unload ( uint16_t  port,
uint16_t  queue 
)

Unload previously loaded BPF program (if any) from given TX port/queue and remove appropriate TX port/queue callback.

Parameters
portThe identifier of the ethernet port
queueThe identifier of the TX queue on the given port

◆ rte_bpf_eth_rx_elf_load()

__rte_experimental int rte_bpf_eth_rx_elf_load ( uint16_t  port,
uint16_t  queue,
const struct rte_bpf_prm prm,
const char *  fname,
const char *  sname,
uint32_t  flags 
)

Load BPF program from the ELF file and install callback to execute it on given RX port/queue.

Parameters
portThe identifier of the ethernet port
queueThe identifier of the RX queue on the given port
fnamePathname for a ELF file.
snameName of the executable section within the file to load.
prmParameters used to create and initialise the BPF execution context.
flagsFlags that define expected behavior of the loaded filter (i.e. jited/non-jited version to use).
Returns
Zero on successful completion or negative error code otherwise.

◆ rte_bpf_eth_tx_elf_load()

__rte_experimental int rte_bpf_eth_tx_elf_load ( uint16_t  port,
uint16_t  queue,
const struct rte_bpf_prm prm,
const char *  fname,
const char *  sname,
uint32_t  flags 
)

Load BPF program from the ELF file and install callback to execute it on given TX port/queue.

Parameters
portThe identifier of the ethernet port
queueThe identifier of the TX queue on the given port
fnamePathname for a ELF file.
snameName of the executable section within the file to load.
prmParameters used to create and initialise the BPF execution context.
flagsFlags that define expected expected behavior of the loaded filter (i.e. jited/non-jited version to use).
Returns
Zero on successful completion or negative error code otherwise.