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)
44 RTE_BPF_VALIDATE_DEBUG_EVENT_STEP,
46 RTE_BPF_VALIDATE_DEBUG_EVENT_INVALID_STATE,
48 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_START,
50 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_SUCCESS,
52 RTE_BPF_VALIDATE_DEBUG_EVENT_VALIDATION_FAILURE,
54 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_ENTER,
56 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_PRUNE,
58 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_RETURN,
60 RTE_BPF_VALIDATE_DEBUG_EVENT_BRANCH_UNREACHABLE,
62 RTE_BPF_VALIDATE_DEBUG_EVENT_JUMP_ALWAYS,
64 RTE_BPF_VALIDATE_DEBUG_EVENT_JUMP_CONDITIONAL,
66 RTE_BPF_VALIDATE_DEBUG_EVENT_END,
69struct rte_bpf_validate_debug;
70struct rte_bpf_validate_debug_point;
74 int (*fn)(
struct rte_bpf_validate_debug *debug,
void *ctx);
90struct rte_bpf_validate_debug *
124struct rte_bpf_validate_debug_point *
146struct rte_bpf_validate_debug_point *
195 const struct rte_ebpf_insn **
ins, uint32_t *
nb_ins);
226struct rte_bpf_validate_debug_point *
276 const struct rte_ebpf_insn *access, uint64_t off64);
296 const struct rte_ebpf_insn *jump, uint64_t imm64);
317 char *buffer,
size_t bufsz, uint8_t reg);
339 char *buffer,
size_t bufsz, int32_t offset);
395 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 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 void rte_bpf_validate_debug_destroy(struct rte_bpf_validate_debug *debug)
__rte_experimental int rte_bpf_validate_debug_can_access(const struct rte_bpf_validate_debug *debug, const struct rte_ebpf_insn *access, uint64_t off64)
rte_bpf_validate_debug_event
__rte_experimental enum rte_bpf_validate_debug_event rte_bpf_validate_debug_get_event(const struct rte_bpf_validate_debug *debug)
__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 int rte_bpf_validate_debug_may_jump(const struct rte_bpf_validate_debug *debug, const struct rte_ebpf_insn *jump, uint64_t imm64)
__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 int rte_bpf_validate_debug_get_ins(const struct rte_bpf_validate_debug *debug, const struct rte_ebpf_insn **ins, uint32_t *nb_ins)
__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)
const struct rte_ebpf_insn * ins