- add EXPERIMENTAL tag for the section in MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute __rte_experimental to BPF public API declarations.
Fixes:
94972f35a02e ("bpf: add BPF loading and execution framework")
Fixes:
5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF object file")
Fixes:
a93ff62a8938 ("bpf: introduce basic Rx/Tx filters")
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
M: Reshma Pattan <reshma.pattan@intel.com>
F: lib/librte_latencystats/
M: Reshma Pattan <reshma.pattan@intel.com>
F: lib/librte_latencystats/
M: Konstantin Ananyev <konstantin.ananyev@intel.com>
F: lib/librte_bpf/
F: test/bpf/
M: Konstantin Ananyev <konstantin.ananyev@intel.com>
F: lib/librte_bpf/
F: test/bpf/
+ * @file rte_bpf.h
+ * @b EXPERIMENTAL: this API may change without prior notice
*
* RTE BPF support.
* librte_bpf provides a framework to load and execute eBPF bytecode
*
* RTE BPF support.
* librte_bpf provides a framework to load and execute eBPF bytecode
* @param bpf
* BPF handle to destroy.
*/
* @param bpf
* BPF handle to destroy.
*/
-void rte_bpf_destroy(struct rte_bpf *bpf);
+void __rte_experimental
+rte_bpf_destroy(struct rte_bpf *bpf);
/**
* Create a new eBPF execution context and load given BPF code into it.
/**
* Create a new eBPF execution context and load given BPF code into it.
* - EINVAL - invalid parameter passed to function
* - ENOMEM - can't reserve enough memory
*/
* - EINVAL - invalid parameter passed to function
* - ENOMEM - can't reserve enough memory
*/
-struct rte_bpf *rte_bpf_load(const struct rte_bpf_prm *prm);
+struct rte_bpf * __rte_experimental
+rte_bpf_load(const struct rte_bpf_prm *prm);
/**
* Create a new eBPF execution context and load BPF code from given ELF
/**
* Create a new eBPF execution context and load BPF code from given ELF
* - EINVAL - invalid parameter passed to function
* - ENOMEM - can't reserve enough memory
*/
* - EINVAL - invalid parameter passed to function
* - ENOMEM - can't reserve enough memory
*/
-struct rte_bpf *rte_bpf_elf_load(const struct rte_bpf_prm *prm,
- const char *fname, const char *sname);
-
+struct rte_bpf * __rte_experimental
+rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname,
+ const char *sname);
/**
* Execute given BPF bytecode.
*
/**
* Execute given BPF bytecode.
*
* @return
* BPF execution return value.
*/
* @return
* BPF execution return value.
*/
-uint64_t rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
+uint64_t __rte_experimental
+rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
/**
* Execute given BPF bytecode over a set of input contexts.
/**
* Execute given BPF bytecode over a set of input contexts.
* @return
* number of successfully processed inputs.
*/
* @return
* number of successfully processed inputs.
*/
-uint32_t rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[],
- uint64_t rc[], uint32_t num);
+uint32_t __rte_experimental
+rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[],
+ uint32_t num);
/**
* Provide information about natively compield code for given BPF handle.
/**
* Provide information about natively compield code for given BPF handle.
* - -EINVAL if the parameters are invalid.
* - Zero if operation completed successfully.
*/
* - -EINVAL if the parameters are invalid.
* - Zero if operation completed successfully.
*/
-int rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit);
+int __rte_experimental
+rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit);
#define _RTE_BPF_ETHDEV_H_
/**
#define _RTE_BPF_ETHDEV_H_
/**
+ * @file rte_bpf_ethdev.h
+ * @b EXPERIMENTAL: this API may change without prior notice
*
* API to install BPF filter as RX/TX callbacks for eth devices.
* Note that right now:
*
* API to install BPF filter as RX/TX callbacks for eth devices.
* Note that right now:
* @param queue
* The identifier of the RX queue on the given port
*/
* @param queue
* The identifier of the RX queue on the given port
*/
-void rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue);
+void __rte_experimental
+rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue);
/**
* Unload previously loaded BPF program (if any) from given TX port/queue
/**
* Unload previously loaded BPF program (if any) from given TX port/queue
* @param queue
* The identifier of the TX queue on the given port
*/
* @param queue
* The identifier of the TX queue on the given port
*/
-void rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue);
+void __rte_experimental
+rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue);
/**
* Load BPF program from the ELF file and install callback to execute it
/**
* Load BPF program from the ELF file and install callback to execute it
* @return
* Zero on successful completion or negative error code otherwise.
*/
* @return
* Zero on successful completion or negative error code otherwise.
*/
-int rte_bpf_eth_rx_elf_load(uint16_t port, uint16_t queue,
+int __rte_experimental
+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);
const struct rte_bpf_prm *prm, const char *fname, const char *sname,
uint32_t flags);
* @return
* Zero on successful completion or negative error code otherwise.
*/
* @return
* Zero on successful completion or negative error code otherwise.
*/
-int rte_bpf_eth_tx_elf_load(uint16_t port, uint16_t queue,
+int __rte_experimental
+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);
const struct rte_bpf_prm *prm, const char *fname, const char *sname,
uint32_t flags);