Lines Matching refs:prog
575 struct bpf_prog *prog; member
587 extern bool arch_bpf_jit_check_func(const struct bpf_prog *prog);
589 static inline unsigned int __bpf_call_func(const struct bpf_prog *prog, in __bpf_call_func() argument
593 return prog->bpf_func(ctx, prog->insnsi); in __bpf_call_func()
599 static inline unsigned int __nocfi bpf_call_func(const struct bpf_prog *prog, in bpf_call_func() argument
602 const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(prog); in bpf_call_func()
604 if (!IS_ENABLED(CONFIG_BPF_JIT_ALWAYS_ON) && !prog->jited) in bpf_call_func()
605 return __bpf_call_func(prog, ctx); in bpf_call_func()
613 !arch_bpf_jit_check_func(prog)); in bpf_call_func()
616 return prog->bpf_func(ctx, prog->insnsi); in bpf_call_func()
624 static inline unsigned int bpf_call_func(const struct bpf_prog *prog, in bpf_call_func() argument
627 return prog->bpf_func(ctx, prog->insnsi); in bpf_call_func()
635 #define BPF_PROG_RUN(prog, ctx) ({ \ argument
641 ret = bpf_call_func(prog, ctx); \
642 stats = this_cpu_ptr(prog->aux->stats); \
648 ret = bpf_call_func(prog, ctx); \
729 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb() argument
736 if (unlikely(prog->cb_access)) { in __bpf_prog_run_save_cb()
741 res = BPF_PROG_RUN(prog, skb); in __bpf_prog_run_save_cb()
743 if (unlikely(prog->cb_access)) in __bpf_prog_run_save_cb()
749 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb() argument
755 res = __bpf_prog_run_save_cb(prog, skb); in bpf_prog_run_save_cb()
760 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb() argument
766 if (unlikely(prog->cb_access)) in bpf_prog_run_clear_cb()
770 res = BPF_PROG_RUN(prog, skb); in bpf_prog_run_clear_cb()
775 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in bpf_prog_run_xdp() argument
784 return BPF_PROG_RUN(prog, xdp); in bpf_prog_run_xdp()
787 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size() argument
789 return prog->len * sizeof(struct bpf_insn); in bpf_prog_insn_size()
792 static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) in bpf_prog_tag_scratch_size() argument
794 return round_up(bpf_prog_insn_size(prog) + in bpf_prog_tag_scratch_size()
804 static inline bool bpf_prog_was_classic(const struct bpf_prog *prog) in bpf_prog_was_classic() argument
811 return prog->type == BPF_PROG_TYPE_UNSPEC; in bpf_prog_was_classic()
887 void bpf_prog_free_linfo(struct bpf_prog *prog);
888 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog,
890 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog);
891 void bpf_prog_free_jited_linfo(struct bpf_prog *prog);
892 void bpf_prog_free_unused_jited_linfo(struct bpf_prog *prog);
917 void sk_reuseport_prog_free(struct bpf_prog *prog);
930 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog);
931 void bpf_jit_compile(struct bpf_prog *prog);
943 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
945 int bpf_remove_insns(struct bpf_prog *prog, u32 off, u32 cnt);
992 struct xdp_buff *xdp, struct bpf_prog *prog);
995 struct bpf_prog *prog);
1002 struct bpf_prog *prog, struct sk_buff *skb,
1007 struct bpf_prog *prog, struct sk_buff *skb, in bpf_run_sk_reuseport() argument
1033 int bpf_jit_get_func_addr(const struct bpf_prog *prog,
1070 static inline bool bpf_jit_blinding_enabled(struct bpf_prog *prog) in bpf_jit_blinding_enabled() argument
1078 if (!prog->jit_requested) in bpf_jit_blinding_enabled()
1122 void bpf_get_prog_name(const struct bpf_prog *prog, char *sym);
1179 static inline void bpf_get_prog_name(const struct bpf_prog *prog, char *sym) in bpf_get_prog_name() argument