DPDK  20.05.0
Functions
rte_bpf_ethdev.h File Reference
#include <rte_bpf.h>

Go to the source code of this file.

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.

Function Documentation

__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_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_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_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.