Home
last modified time | relevance | path

Searched refs:prog (Results 1 – 25 of 413) sorted by relevance

12345678910>>...17

/linux-5.19.10/net/sched/
Dcls_bpf.c85 struct cls_bpf_prog *prog; in cls_bpf_classify() local
88 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify()
91 qdisc_skb_cb(skb)->tc_classid = prog->res.classid; in cls_bpf_classify()
93 if (tc_skip_sw(prog->gen_flags)) { in cls_bpf_classify()
94 filter_res = prog->exts_integrated ? TC_ACT_UNSPEC : 0; in cls_bpf_classify()
99 filter_res = bpf_prog_run(prog->filter, skb); in cls_bpf_classify()
103 filter_res = bpf_prog_run(prog->filter, skb); in cls_bpf_classify()
108 if (prog->exts_integrated) { in cls_bpf_classify()
110 res->classid = TC_H_MAJ(prog->res.classid) | in cls_bpf_classify()
125 *res = prog->res; in cls_bpf_classify()
[all …]
Dact_bpf.c39 struct tcf_bpf *prog = to_bpf(act); in tcf_bpf_act() local
43 tcf_lastuse_update(&prog->tcf_tm); in tcf_bpf_act()
44 bstats_update(this_cpu_ptr(prog->common.cpu_bstats), skb); in tcf_bpf_act()
46 filter = rcu_dereference(prog->filter); in tcf_bpf_act()
80 qstats_drop_inc(this_cpu_ptr(prog->common.cpu_qstats)); in tcf_bpf_act()
83 action = prog->tcf_action; in tcf_bpf_act()
93 static bool tcf_bpf_is_ebpf(const struct tcf_bpf *prog) in tcf_bpf_is_ebpf() argument
95 return !prog->bpf_ops; in tcf_bpf_is_ebpf()
98 static int tcf_bpf_dump_bpf_info(const struct tcf_bpf *prog, in tcf_bpf_dump_bpf_info() argument
103 if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog->bpf_num_ops)) in tcf_bpf_dump_bpf_info()
[all …]
/linux-5.19.10/arch/x86/net/
Dbpf_jit_comp.c33 do { prog = emit_code(prog, bytes, len); } while (0)
259 u8 *prog = *pprog; in push_callee_regs() local
269 *pprog = prog; in push_callee_regs()
274 u8 *prog = *pprog; in pop_callee_regs() local
284 *pprog = prog; in pop_callee_regs()
295 u8 *prog = *pprog; in emit_prologue() local
301 memcpy(prog, x86_nops[5], X86_PATCH_SIZE); in emit_prologue()
302 prog += X86_PATCH_SIZE; in emit_prologue()
320 *pprog = prog; in emit_prologue()
325 u8 *prog = *pprog; in emit_patch() local
[all …]
Dbpf_jit_comp32.c65 do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
209 u8 *prog = *pprog; in emit_ia32_mov_i() local
230 *pprog = prog; in emit_ia32_mov_i()
237 u8 *prog = *pprog; in emit_ia32_mov_r() local
251 *pprog = prog; in emit_ia32_mov_r()
288 u8 *prog = *pprog; in emit_ia32_mul_r() local
314 *pprog = prog; in emit_ia32_mul_r()
321 u8 *prog = *pprog; in emit_ia32_to_le_r64() local
362 *pprog = prog; in emit_ia32_to_le_r64()
369 u8 *prog = *pprog; in emit_ia32_to_be_r64() local
[all …]
/linux-5.19.10/drivers/clk/at91/
Dclk-programmable.c35 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_recalc_rate() local
36 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate()
40 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_recalc_rate()
53 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_determine_rate() local
54 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate()
105 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_set_parent() local
106 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_set_parent()
113 if (prog->mux_table) in clk_programmable_set_parent()
114 pckr = clk_mux_index_to_val(prog->mux_table, 0, index); in clk_programmable_set_parent()
123 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), mask, pckr); in clk_programmable_set_parent()
[all …]
/linux-5.19.10/arch/riscv/net/
Dbpf_jit_core.c18 const struct bpf_prog *prog = ctx->prog; in build_body() local
21 for (i = 0; i < prog->len; i++) { in build_body()
22 const struct bpf_insn *insn = &prog->insnsi[i]; in build_body()
42 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() argument
46 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile()
51 if (!prog->jit_requested) in bpf_int_jit_compile()
54 tmp = bpf_jit_blind_constants(prog); in bpf_int_jit_compile()
57 if (tmp != prog) { in bpf_int_jit_compile()
59 prog = tmp; in bpf_int_jit_compile()
62 jit_data = prog->aux->jit_data; in bpf_int_jit_compile()
[all …]
/linux-5.19.10/tools/testing/selftests/bpf/prog_tests/
Dtailcalls.c13 struct bpf_program *prog; in test_tailcall_1() local
28 prog = bpf_object__find_program_by_name(obj, "entry"); in test_tailcall_1()
29 if (CHECK_FAIL(!prog)) in test_tailcall_1()
32 main_fd = bpf_program__fd(prog); in test_tailcall_1()
47 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
48 if (CHECK_FAIL(!prog)) in test_tailcall_1()
51 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
77 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
78 if (CHECK_FAIL(!prog)) in test_tailcall_1()
81 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
[all …]
Dtrampoline_count.c15 struct bpf_program *prog; in load_prog() local
28 prog = bpf_object__find_program_by_name(obj, name); in load_prog()
29 if (!ASSERT_OK_PTR(prog, "obj_find_prog")) in load_prog()
32 return prog; in load_prog()
41 struct bpf_program *prog; in serial_test_trampoline_count() local
48 prog = load_prog(file, progs[i % ARRAY_SIZE(progs)], &inst[i]); in serial_test_trampoline_count()
49 if (!prog) in serial_test_trampoline_count()
52 link = bpf_program__attach(prog); in serial_test_trampoline_count()
60 prog = load_prog(file, "fmod_ret_test", &inst[i]); in serial_test_trampoline_count()
61 if (!prog) in serial_test_trampoline_count()
[all …]
Dfexit_bpf2bpf.c63 struct bpf_program **prog = NULL, *p; in test_fexit_bpf2bpf_common() local
90 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common()
91 if (!ASSERT_OK_PTR(prog, "prog_ptr")) in test_fexit_bpf2bpf_common()
119 prog[i] = NULL; in test_fexit_bpf2bpf_common()
123 prog[i] = pos; in test_fexit_bpf2bpf_common()
127 if (!ASSERT_OK_PTR(prog[i], prog_name[i])) in test_fexit_bpf2bpf_common()
130 link[i] = bpf_program__attach_trace(prog[i]); in test_fexit_bpf2bpf_common()
140 bpf_program__expected_attach_type(prog[i]), in test_fexit_bpf2bpf_common()
168 free(prog); in test_fexit_bpf2bpf_common()
230 struct bpf_program *prog = NULL; in test_second_attach() local
[all …]
Dtrace_ext.c24 struct bpf_program *prog; in test_trace_ext() local
42 prog = skel_pkt->progs.test_pkt_md_access; in test_trace_ext()
43 pkt_fd = bpf_program__fd(prog); in test_trace_ext()
51 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext()
52 bpf_program__set_attach_target(prog, pkt_fd, "test_pkt_md_access"); in test_trace_ext()
66 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext()
67 ext_fd = bpf_program__fd(prog); in test_trace_ext()
75 prog = skel_trace->progs.fentry; in test_trace_ext()
76 bpf_program__set_attach_target(prog, ext_fd, "test_pkt_md_access_new"); in test_trace_ext()
79 prog = skel_trace->progs.fexit; in test_trace_ext()
[all …]
/linux-5.19.10/tools/lib/bpf/
Dlibbpf.h253 LIBBPF_API void *bpf_object__priv(const struct bpf_object *prog);
266 struct bpf_program *bpf_program__next(struct bpf_program *prog,
269 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prog);
277 struct bpf_program *bpf_program__prev(struct bpf_program *prog,
280 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *prog);
285 LIBBPF_API int bpf_program__set_priv(struct bpf_program *prog, void *priv,
288 LIBBPF_API void *bpf_program__priv(const struct bpf_program *prog);
289 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
292 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
293 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
[all …]
Dlibbpf.c73 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
566 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload() argument
570 if (!prog) in bpf_program__unload()
577 if (prog->instances.nr > 0) { in bpf_program__unload()
578 for (i = 0; i < prog->instances.nr; i++) in bpf_program__unload()
579 zclose(prog->instances.fds[i]); in bpf_program__unload()
580 } else if (prog->instances.nr != -1) { in bpf_program__unload()
582 prog->instances.nr); in bpf_program__unload()
585 prog->instances.nr = -1; in bpf_program__unload()
586 zfree(&prog->instances.fds); in bpf_program__unload()
[all …]
/linux-5.19.10/drivers/net/ethernet/microsoft/mana/
Dmana_bpf.c38 struct bpf_prog *prog; in mana_run_xdp() local
42 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp()
44 if (!prog) in mana_run_xdp()
50 act = bpf_prog_run_xdp(prog, xdp); in mana_run_xdp()
59 trace_xdp_exception(ndev, prog, act); in mana_run_xdp()
63 bpf_warn_invalid_xdp_action(ndev, prog, act); in mana_run_xdp()
91 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp() argument
99 if (old_prog == prog) in mana_chn_setxdp()
102 if (prog) in mana_chn_setxdp()
103 bpf_prog_add(prog, num_queues); in mana_chn_setxdp()
[all …]
/linux-5.19.10/kernel/bpf/
Dsyscall.c1903 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type() argument
1914 if (!bpf_prog_is_dev_bound(prog->aux)) in find_prog_type()
1915 prog->aux->ops = ops; in find_prog_type()
1917 prog->aux->ops = &bpf_offload_prog_ops; in find_prog_type()
1918 prog->type = type; in find_prog_type()
1933 static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op) in bpf_audit_prog() argument
1948 prog->aux->id, bpf_audit_str[op]); in bpf_audit_prog()
1952 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id() argument
1958 id = idr_alloc_cyclic(&prog_idr, prog, 1, INT_MAX, GFP_ATOMIC); in bpf_prog_alloc_id()
1960 prog->aux->id = id; in bpf_prog_alloc_id()
[all …]
Ddispatcher.c25 struct bpf_dispatcher *d, struct bpf_prog *prog) in bpf_dispatcher_find_prog() argument
30 if (prog == d->progs[i].prog) in bpf_dispatcher_find_prog()
43 struct bpf_prog *prog) in bpf_dispatcher_add_prog() argument
47 if (!prog) in bpf_dispatcher_add_prog()
50 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_add_prog()
60 bpf_prog_inc(prog); in bpf_dispatcher_add_prog()
61 entry->prog = prog; in bpf_dispatcher_add_prog()
68 struct bpf_prog *prog) in bpf_dispatcher_remove_prog() argument
72 if (!prog) in bpf_dispatcher_remove_prog()
75 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_remove_prog()
[all …]
Dprog_iter.c16 struct bpf_prog *prog; in bpf_prog_seq_start() local
18 prog = bpf_prog_get_curr_or_next(&info->prog_id); in bpf_prog_seq_start()
19 if (!prog) in bpf_prog_seq_start()
24 return prog; in bpf_prog_seq_start()
39 __bpf_md_ptr(struct bpf_prog *, prog);
42 DEFINE_BPF_ITER_FUNC(bpf_prog, struct bpf_iter_meta *meta, struct bpf_prog *prog) in DEFINE_BPF_ITER_FUNC() argument
48 struct bpf_prog *prog; in DEFINE_BPF_ITER_FUNC() local
52 ctx.prog = v; in DEFINE_BPF_ITER_FUNC()
54 prog = bpf_iter_get_info(&meta, in_stop); in DEFINE_BPF_ITER_FUNC()
55 if (prog) in DEFINE_BPF_ITER_FUNC()
[all …]
Doffload.c80 int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_offload_init() argument
97 offload->prog = prog; in bpf_prog_offload_init()
112 prog->aux->offload = offload; in bpf_prog_offload_init()
127 int bpf_prog_offload_verifier_prep(struct bpf_prog *prog) in bpf_prog_offload_verifier_prep() argument
133 offload = prog->aux->offload; in bpf_prog_offload_verifier_prep()
135 ret = offload->offdev->ops->prepare(prog); in bpf_prog_offload_verifier_prep()
150 offload = env->prog->aux->offload; in bpf_prog_offload_verify_insn()
165 offload = env->prog->aux->offload; in bpf_prog_offload_finalize()
186 offload = env->prog->aux->offload; in bpf_prog_offload_replace_insn()
203 offload = env->prog->aux->offload; in bpf_prog_offload_remove_insns()
[all …]
Dcore.c109 fp->aux->prog = fp; in bpf_prog_alloc_no_stats()
123 struct bpf_prog *prog; in bpf_prog_alloc() local
126 prog = bpf_prog_alloc_no_stats(size, gfp_extra_flags); in bpf_prog_alloc()
127 if (!prog) in bpf_prog_alloc()
130 prog->stats = alloc_percpu_gfp(struct bpf_prog_stats, gfp_flags); in bpf_prog_alloc()
131 if (!prog->stats) { in bpf_prog_alloc()
132 free_percpu(prog->active); in bpf_prog_alloc()
133 kfree(prog->aux); in bpf_prog_alloc()
134 vfree(prog); in bpf_prog_alloc()
141 pstats = per_cpu_ptr(prog->stats, cpu); in bpf_prog_alloc()
[all …]
/linux-5.19.10/drivers/net/hyperv/
Dnetvsc_bpf.c31 struct bpf_prog *prog; in netvsc_run_xdp() local
38 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp()
40 if (!prog) in netvsc_run_xdp()
61 act = bpf_prog_run_xdp(prog, xdp); in netvsc_run_xdp()
73 if (!xdp_do_redirect(ndev, xdp, prog)) { in netvsc_run_xdp()
95 trace_xdp_exception(ndev, prog, act); in netvsc_run_xdp()
99 bpf_warn_invalid_xdp_action(ndev, prog, act); in netvsc_run_xdp()
124 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set() argument
133 if (!old_prog && !prog) in netvsc_xdp_set()
137 if (prog && buf_max > PAGE_SIZE) { in netvsc_xdp_set()
[all …]
/linux-5.19.10/drivers/net/netdevsim/
Dbpf.c31 struct bpf_prog *prog; member
68 state = env->prog->aux->offload->dev_priv; in nsim_bpf_verify_insn()
72 if (insn_idx == env->prog->len - 1) { in nsim_bpf_verify_insn()
89 return ns->xdp_hw.prog; in nsim_xdp_offload_active()
92 static void nsim_prog_set_loaded(struct bpf_prog *prog, bool loaded) in nsim_prog_set_loaded() argument
96 if (!prog || !prog->aux->offload) in nsim_prog_set_loaded()
99 state = prog->aux->offload->dev_priv; in nsim_prog_set_loaded()
104 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload() argument
111 ns->bpf_offloaded = prog; in nsim_bpf_offload()
112 ns->bpf_offloaded_id = prog ? prog->aux->id : 0; in nsim_bpf_offload()
[all …]
/linux-5.19.10/scripts/
Dsphinx-pre-install92 foreach my $prog (sort keys %missing) {
93 my $is_optional = $missing{$prog};
107 print "Warning: better to also install \"$prog\".\n";
109 print "ERROR: please install \"$prog\", otherwise, build won't work.\n";
111 if (defined($map{$prog})) {
112 $install .= " " . $map{$prog};
114 $install .= " " . $prog;
156 my $prog = shift;
174 my $prog = shift;
177 return $prog if findprog($prog);
[all …]
/linux-5.19.10/drivers/net/ethernet/netronome/nfp/bpf/
Doffload.c112 struct bpf_prog *prog) in nfp_map_ptrs_record() argument
116 mutex_lock(&prog->aux->used_maps_mutex); in nfp_map_ptrs_record()
120 for (i = 0; i < prog->aux->used_map_cnt; i++) in nfp_map_ptrs_record()
121 if (bpf_map_offload_neutral(prog->aux->used_maps[i])) in nfp_map_ptrs_record()
134 for (i = 0; i < prog->aux->used_map_cnt; i++) in nfp_map_ptrs_record()
135 if (bpf_map_offload_neutral(prog->aux->used_maps[i])) { in nfp_map_ptrs_record()
137 prog->aux->used_maps[i]); in nfp_map_ptrs_record()
146 mutex_unlock(&prog->aux->used_maps_mutex); in nfp_map_ptrs_record()
151 nfp_prog_prepare(struct nfp_prog *nfp_prog, const struct bpf_insn *prog, in nfp_prog_prepare() argument
162 meta->insn = prog[i]; in nfp_prog_prepare()
[all …]
/linux-5.19.10/samples/bpf/
Dtracex5_user.c26 struct sock_fprog prog = { in install_accept_all_seccomp() local
30 if (prctl(PR_SET_SECCOMP, 2, &prog)) in install_accept_all_seccomp()
37 struct bpf_program *prog; in main() local
51 prog = bpf_object__find_program_by_name(obj, "bpf_prog1"); in main()
52 if (!prog) { in main()
63 link = bpf_program__attach(prog); in main()
76 bpf_object__for_each_program(prog, obj) { in main()
77 section = bpf_program__section_name(prog); in main()
82 fd = bpf_program__fd(prog); in main()
/linux-5.19.10/net/core/
Dsock_reuseport.c101 RCU_INIT_POINTER(reuse->prog, NULL); in __reuseport_alloc()
192 more_reuse->prog = reuse->prog; in reuseport_grow()
222 sk_reuseport_prog_free(rcu_dereference_protected(reuse->prog, 1)); in reuseport_free_rcu()
381 struct bpf_prog *prog; in reuseport_stop_listen_sock() local
387 prog = rcu_dereference_protected(reuse->prog, in reuseport_stop_listen_sock()
391 (prog && prog->expected_attach_type == BPF_SK_REUSEPORT_SELECT_OR_MIGRATE)) { in reuseport_stop_listen_sock()
413 struct bpf_prog *prog, struct sk_buff *skb, in run_bpf_filter() argument
431 index = bpf_prog_run_save_cb(prog, skb); in run_bpf_filter()
475 struct bpf_prog *prog; in reuseport_select_sock() local
486 prog = rcu_dereference(reuse->prog); in reuseport_select_sock()
[all …]
/linux-5.19.10/drivers/media/rc/
Dbpf-lirc.c83 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto() argument
123 const struct bpf_prog *prog, in lirc_mode2_is_valid_access() argument
137 static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_attach() argument
163 ret = bpf_prog_array_copy(old_array, NULL, prog, 0, &new_array); in lirc_bpf_attach()
175 static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_detach() argument
196 ret = bpf_prog_array_copy(old_array, prog, NULL, 0, &new_array); in lirc_bpf_detach()
207 bpf_prog_put(prog); in lirc_bpf_detach()
242 for (item = array->items; item->prog; item++) in lirc_bpf_free()
243 bpf_prog_put(item->prog); in lirc_bpf_free()
248 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in lirc_prog_attach() argument
[all …]

12345678910>>...17