rte_bpf_ethdev.h(3)
πΈ NAME πΈ
okay bestie, this is rte_bpf_ethdev.h(3) from the Library Functions Manual β the header for the API that installs a BPF filter as RX/TX callbacks for eth devices. it's giving low-level filter energy β¨
π SYNOPSIS π
#include <rte_bpf.h>
Enumerations
enum { }
Functions
void rte_bpf_eth_rx_unload (uint16_t port, uint16_t queue)
void rte_bpf_eth_tx_unload (uint16_t port, uint16_t queue)
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)
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 π«Ά
okay so this is the API to install a BPF filter as RX/TX callbacks for eth devices. But bestie, note that right now:
- it is not MT safe β i.e. it is not allowed to do load/unload for the same port/queue from different threads in parallel. π
- though it allows to do load/unload at runtime (while RX/TX is ongoing on the given port/queue). β¨
- it allows only one BPF program per port/queue, i.e. a new load will replace the previously loaded BPF program for that port/queue. π
Filter behaviour, bestie: if the BPF program returns zero value for a given packet, then it will be dropped inside the callback and no further processing on RX β it will be dropped inside the callback and no further processing for that packet will happen. On TX, the packet will remain unsent, and it is the responsibility of the user to handle such situation (drop, try to send again, etc.). π
Definition in file rte_bpf_ethdev.h.
π¦ Enumeration Type Documentation π¦
anonymous enum
Enumerator
RTE_BPF_ETH_F_JITβ use compiled into native ISA code. π₯
Definition at line 33 of file rte_bpf_ethdev.h.
π Function Documentation π
rte_bpf_eth_rx_unload
void rte_bpf_eth_rx_unload (uint16_t port, uint16_t queue)
Unload a previously loaded BPF program (if any) from the given RX port/queue and remove the appropriate RX port/queue callback. π«Ά
Parameters
portβ the identifier of the ethernet port.queueβ the identifier of the RX queue on the given port.
rte_bpf_eth_tx_unload
void rte_bpf_eth_tx_unload (uint16_t port, uint16_t queue)
Unload a previously loaded BPF program (if any) from the given TX port/queue and remove the appropriate TX port/queue callback. π«Ά
Parameters
portβ the identifier of the ethernet port.queueβ the identifier of the TX queue on the given port.
rte_bpf_eth_rx_elf_load
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 a BPF program from the ELF file and install a callback to execute it on the given RX port/queue. β¨
Parameters
portβ the identifier of the ethernet port.queueβ the identifier of the RX queue on the given port.fnameβ pathname for a ELF file.snameβ name of the executable section within the file to load.prmβ parameters used to create and initialise the BPF execution context.flagsβ flags 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
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 a BPF program from the ELF file and install a callback to execute it on the given TX port/queue. β¨
Parameters
portβ the identifier of the ethernet port.queueβ the identifier of the TX queue on the given port.fnameβ pathname for a ELF file.snameβ name of the executable section within the file to load.prmβ parameters used to create and initialise the BPF execution context.flagsβ flags 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. π
π Author π
Generated automatically by Doxygen for DPDK from the source code. (yes bestie, the robots wrote this one π€)
mwah π β signing off with DPDK Version 26.03.0 and page rte_bpf_ethdev.h(3). periodt. π
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms