28 #define RTE_BPF_EXEC_FLAG_JIT RTE_BIT64(0) 31 #define RTE_BPF_EXEC_FLAG_MASK RTE_BPF_EXEC_FLAG_JIT 34 #define RTE_BPF_FORMAT_FLAG_DISASSEMBLY 0 36 #define RTE_BPF_FORMAT_FLAG_HEXADECIMAL RTE_BIT32(0) 40 #define RTE_BPF_FORMAT_FLAG_RELATIVE_JUMPS 0 42 #define RTE_BPF_FORMAT_FLAG_ABSOLUTE_JUMPS RTE_BIT32(1) 46 #define RTE_BPF_FORMAT_FLAG_AUTO_WIDE 0 48 #define RTE_BPF_FORMAT_FLAG_NEVER_WIDE RTE_BIT32(2) 78 #define RTE_BPF_ARG_PTR_TYPE(x) ((x) & RTE_BPF_ARG_PTR) 96 uint64_t (*val)(uint64_t, uint64_t, uint64_t,
121 struct rte_bpf_validate_debug;
138 const struct ebpf_insn *
ins;
142 const struct bpf_insn *
ins;
164 struct rte_bpf_validate_debug *debug;
171 const struct ebpf_insn *
ins;
187 union rte_bpf_func_arg {
192 typedef uint64_t (*rte_bpf_jit_func0_t)(void);
193 typedef uint64_t (*rte_bpf_jit_func1_t)(
union rte_bpf_func_arg);
194 typedef uint64_t (*rte_bpf_jit_func2_t)(
union rte_bpf_func_arg, union rte_bpf_func_arg);
195 typedef uint64_t (*rte_bpf_jit_func3_t)(
union rte_bpf_func_arg, union rte_bpf_func_arg,
196 union rte_bpf_func_arg);
197 typedef uint64_t (*rte_bpf_jit_func4_t)(
union rte_bpf_func_arg, union rte_bpf_func_arg,
198 union rte_bpf_func_arg, union rte_bpf_func_arg);
199 typedef uint64_t (*rte_bpf_jit_func5_t)(
union rte_bpf_func_arg, union rte_bpf_func_arg,
200 union rte_bpf_func_arg, union rte_bpf_func_arg, union rte_bpf_func_arg);
208 rte_bpf_jit_func0_t func0;
209 rte_bpf_jit_func1_t func1;
210 rte_bpf_jit_func2_t func2;
211 rte_bpf_jit_func3_t func3;
212 rte_bpf_jit_func4_t func4;
213 rte_bpf_jit_func5_t func5;
219 struct rte_bpf_prog_ctx {
220 union rte_bpf_func_arg arg[EBPF_FUNC_MAX_ARGS];
333 rte_bpf_exec_ex(
const struct rte_bpf *bpf,
const struct rte_bpf_prog_ctx *ctx,
379 uint64_t rc[], uint32_t num, uint64_t flags);
446 rte_bpf_format(
char *buffer,
size_t bufsz,
const struct ebpf_insn *ins,
447 uint32_t pc, uint32_t flags);
460 rte_bpf_dump(FILE *f,
const struct ebpf_insn *buf, uint32_t len);
__rte_experimental int rte_bpf_format(char *buffer, size_t bufsz, const struct ebpf_insn *ins, uint32_t pc, uint32_t flags)
#define __rte_dealloc_free
__rte_experimental struct rte_bpf struct rte_bpf struct rte_bpf uint64_t rte_bpf_exec(const struct rte_bpf *bpf, void *ctx)
__rte_experimental uint32_t rte_bpf_exec_burst_ex(const struct rte_bpf *bpf, const struct rte_bpf_prog_ctx *ctx, uint64_t rc[], uint32_t num, uint64_t flags)
struct rte_bpf_arg args[EBPF_FUNC_MAX_ARGS]
struct rte_bpf_xsym::@70::@73 var
const struct ebpf_insn * ins
void rte_bpf_dump(FILE *f, const struct ebpf_insn *buf, uint32_t len)
const struct bpf_insn * ins
const struct ebpf_insn * ins
int rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit)
const struct rte_bpf_xsym * xsym
#define __rte_dealloc(dealloc, argno)
__rte_experimental uint64_t rte_bpf_exec_ex(const struct rte_bpf *bpf, const struct rte_bpf_prog_ctx *ctx, uint64_t flags)
struct rte_bpf_prm * rte_bpf_convert(const struct bpf_program *prog) __rte_malloc __rte_dealloc_free
__rte_experimental struct rte_bpf * rte_bpf_load_ex(const struct rte_bpf_prm_ex *prm) __rte_malloc __rte_dealloc(rte_bpf_destroy
__rte_experimental bool rte_bpf_insn_is_wide(const struct ebpf_insn *ins)
uint32_t rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[], uint32_t num)
__rte_experimental struct rte_bpf struct rte_bpf struct rte_bpf * rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname, const char *sname) __rte_malloc __rte_dealloc(rte_bpf_destroy
__rte_experimental int rte_bpf_get_jit_ex(const struct rte_bpf *bpf, struct rte_bpf_jit_ex *jit)
struct rte_bpf_arg prog_arg
void rte_bpf_destroy(struct rte_bpf *bpf)
const struct rte_bpf_xsym * xsym
__rte_experimental struct rte_bpf struct rte_bpf * rte_bpf_load(const struct rte_bpf_prm *prm) __rte_malloc __rte_dealloc(rte_bpf_destroy
enum rte_bpf_origin origin
struct rte_bpf_arg prog_arg[EBPF_FUNC_MAX_ARGS]