doc: add patch dependency syntax to contributing guide
[dpdk.git] / lib / librte_bpf / rte_bpf.h
index ab92af8..e2d419b 100644 (file)
@@ -7,9 +7,13 @@
 
 /**
  * @file rte_bpf.h
- * @b EXPERIMENTAL: this API may change without prior notice
  *
  * RTE BPF support.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * librte_bpf provides a framework to load and execute eBPF bytecode
  * inside user-space dpdk based applications.
  * It supports basic set of features from eBPF spec
@@ -32,7 +36,7 @@ enum rte_bpf_arg_type {
        RTE_BPF_ARG_RAW,        /**< scalar value */
        RTE_BPF_ARG_PTR = 0x10, /**< pointer to data buffer */
        RTE_BPF_ARG_PTR_MBUF,   /**< pointer to rte_mbuf */
-       RTE_BPF_ARG_PTR_STACK,
+       RTE_BPF_ARG_RESERVED,   /**< reserved for internal use */
 };
 
 /**
@@ -113,7 +117,8 @@ struct rte_bpf;
  * @param bpf
  *   BPF handle to destroy.
  */
-void __rte_experimental
+__rte_experimental
+void
 rte_bpf_destroy(struct rte_bpf *bpf);
 
 /**
@@ -128,12 +133,16 @@ rte_bpf_destroy(struct rte_bpf *bpf);
  *   - EINVAL - invalid parameter passed to function
  *   - ENOMEM - can't reserve enough memory
  */
-struct rte_bpf * __rte_experimental
+__rte_experimental
+struct rte_bpf *
 rte_bpf_load(const struct rte_bpf_prm *prm);
 
 /**
  * Create a new eBPF execution context and load BPF code from given ELF
  * file into it.
+ * Note that if the function will encounter EBPF_PSEUDO_CALL instruction
+ * that references external symbol, it will treat is as standard BPF_CALL
+ * to the external helper function.
  *
  * @param prm
  *  Parameters used to create and initialise the BPF execution context.
@@ -148,7 +157,8 @@ rte_bpf_load(const struct rte_bpf_prm *prm);
  *   - EINVAL - invalid parameter passed to function
  *   - ENOMEM - can't reserve enough memory
  */
-struct rte_bpf * __rte_experimental
+__rte_experimental
+struct rte_bpf *
 rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname,
                const char *sname);
 /**
@@ -161,7 +171,8 @@ rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname,
  * @return
  *   BPF execution return value.
  */
-uint64_t __rte_experimental
+__rte_experimental
+uint64_t
 rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
 
 /**
@@ -178,7 +189,8 @@ rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
  * @return
  *   number of successfully processed inputs.
  */
-uint32_t __rte_experimental
+__rte_experimental
+uint32_t
 rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[],
                uint32_t num);
 
@@ -193,7 +205,8 @@ rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[],
  *   - -EINVAL if the parameters are invalid.
  *   - Zero if operation completed successfully.
  */
-int __rte_experimental
+__rte_experimental
+int
 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit);
 
 #ifdef __cplusplus