Lines Matching refs:bpf

44 #define BPF_DIV_ZERO_CHECK(bpf, reg, ins, type) do { \  argument
48 __func__, bpf, \
49 (uintptr_t)(ins) - (uintptr_t)(bpf)->prm.ins); \
75 #define BPF_LD_ABS(bpf, reg, ins, type, op) do { \ argument
76 const type *p = bpf_ld_mbuf(bpf, reg, ins, (ins)->imm, sizeof(type)); \
82 #define BPF_LD_IND(bpf, reg, ins, type, op) do { \ argument
84 const type *p = bpf_ld_mbuf(bpf, reg, ins, ofs, sizeof(type)); \
130 bpf_ld_mbuf(const struct rte_bpf *bpf, uint64_t reg[EBPF_REG_NUM], in bpf_ld_mbuf() argument
141 __func__, bpf, mb, off, len, in bpf_ld_mbuf()
142 (uintptr_t)(ins) - (uintptr_t)(bpf)->prm.ins); in bpf_ld_mbuf()
147 bpf_exec(const struct rte_bpf *bpf, uint64_t reg[EBPF_REG_NUM]) in bpf_exec() argument
151 for (ins = bpf->prm.ins; ; ins++) { in bpf_exec()
213 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
217 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
298 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint64_t); in bpf_exec()
302 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint64_t); in bpf_exec()
332 BPF_LD_ABS(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
335 BPF_LD_ABS(bpf, reg, ins, uint16_t, rte_be_to_cpu_16); in bpf_exec()
338 BPF_LD_ABS(bpf, reg, ins, uint32_t, rte_be_to_cpu_32); in bpf_exec()
342 BPF_LD_IND(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
345 BPF_LD_IND(bpf, reg, ins, uint16_t, rte_be_to_cpu_16); in bpf_exec()
348 BPF_LD_IND(bpf, reg, ins, uint32_t, rte_be_to_cpu_32); in bpf_exec()
456 reg[EBPF_REG_0] = bpf->prm.xsym[ins->imm].func.val( in bpf_exec()
467 __func__, bpf, ins->code, in bpf_exec()
468 (uintptr_t)ins - (uintptr_t)bpf->prm.ins); in bpf_exec()
479 rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[], in rte_bpf_exec_burst() argument
491 rc[i] = bpf_exec(bpf, reg); in rte_bpf_exec_burst()
498 rte_bpf_exec(const struct rte_bpf *bpf, void *ctx) in rte_bpf_exec() argument
502 rte_bpf_exec_burst(bpf, &ctx, &rc, 1); in rte_bpf_exec()