5#ifndef _RTE_BPF_VALIDATE_DEBUG_H_
6#define _RTE_BPF_VALIDATE_DEBUG_H_
17#include <rte_compat.h>
27#define RTE_BPF_VALIDATE_DEBUG_MAY_BE_FALSE RTE_BIT32(0)
28#define RTE_BPF_VALIDATE_DEBUG_MAY_BE_TRUE RTE_BIT32(1)
37 RTE_BPF_VALIDATE_DEBUG_EVENT_STEP,
39 RTE_BPF_VALIDATE_DEBUG_EVENT_INVALID_STATE,
41 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_START,
43 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_SUCCESS,
45 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_FAILURE,
47 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_ENTER,
49 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_PRUNE,
51 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_RETURN,
53 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_UNREACHABLE,
55 RTE_BPF_VALIDATE_DEBUG_EVENT_END,
58struct rte_bpf_validate_debug;
59struct rte_bpf_validate_debug_point;
63 int (*fn)(
struct rte_bpf_validate_debug *debug,
void *ctx);
79struct rte_bpf_validate_debug *
113struct rte_bpf_validate_debug_point *
135struct rte_bpf_validate_debug_point *
184 const struct ebpf_insn **
ins, uint32_t *
nb_ins);
202struct rte_bpf_validate_debug_point *
252 const struct ebpf_insn *access, uint64_t off64);
272 const struct ebpf_insn *jump, uint64_t imm64);
293 char *buffer,
size_t bufsz, uint8_t reg);
315 char *buffer,
size_t bufsz, int32_t offset);
371 uint64_t min, uint64_t max);
__rte_experimental int rte_bpf_validate_debug_format_frame_info(const struct rte_bpf_validate_debug *debug, char *buffer, size_t bufsz, int32_t offset)
__rte_experimental int rte_bpf_validate_debug_format_interval(char *buffer, size_t bufsz, char format, uint64_t min, uint64_t max)
int(* rte_bpf_validate_debug_point_process_t)(struct rte_bpf_validate_debug_point *point, void *ctx)
__rte_experimental const struct rte_bpf_prm_ex * rte_bpf_validate_debug_get_bpf_param(const struct rte_bpf_validate_debug *debug)
__rte_experimental int rte_bpf_validate_debug_get_validation_result(const struct rte_bpf_validate_debug *debug, int *result)
__rte_experimental uint32_t rte_bpf_validate_debug_get_pc(const struct rte_bpf_validate_debug *debug)
__rte_experimental int32_t rte_bpf_validate_debug_get_frame_size(const struct rte_bpf_validate_debug *debug)
__rte_experimental int rte_bpf_validate_debug_can_access(const struct rte_bpf_validate_debug *debug, const struct ebpf_insn *access, uint64_t off64)
__rte_experimental struct rte_bpf_validate_debug_point * rte_bpf_validate_debug_catch(struct rte_bpf_validate_debug *debug, enum rte_bpf_validate_debug_event event, const struct rte_bpf_validate_debug_callback *callback)
__rte_experimental int rte_bpf_validate_debug_may_jump(const struct rte_bpf_validate_debug *debug, const struct ebpf_insn *jump, uint64_t imm64)
__rte_experimental void rte_bpf_validate_debug_destroy(struct rte_bpf_validate_debug *debug)
rte_bpf_validate_debug_event
__rte_experimental struct rte_bpf_validate_debug * rte_bpf_validate_debug_create(void)
__rte_experimental int rte_bpf_validate_debug_format_value(char *buffer, size_t bufsz, char format, uint64_t value)
__rte_experimental struct rte_bpf_validate_debug_point * rte_bpf_validate_debug_break(struct rte_bpf_validate_debug *debug, uint32_t pc, const struct rte_bpf_validate_debug_callback *callback)
__rte_experimental void rte_bpf_validate_debug_point_destroy(struct rte_bpf_validate_debug_point *point)
__rte_experimental int rte_bpf_validate_debug_format_register_info(const struct rte_bpf_validate_debug *debug, char *buffer, size_t bufsz, uint8_t reg)
__rte_experimental struct rte_bpf_validate_debug_point * rte_bpf_validate_debug_get_last_point(const struct rte_bpf_validate_debug *debug)
__rte_experimental int rte_bpf_validate_debug_get_ins(const struct rte_bpf_validate_debug *debug, const struct ebpf_insn **ins, uint32_t *nb_ins)
const struct ebpf_insn * ins