Home
last modified time | relevance | path

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

12345678910>>...18

/linux/net/sched/
H A Dcls_bpf.c87 struct cls_bpf_prog *prog; in cls_bpf_classify() local
90 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify()
93 qdisc_skb_cb(skb)->tc_classid = prog->res.classid; in cls_bpf_classify()
95 if (tc_skip_sw(prog->gen_flags)) { in cls_bpf_classify()
96 filter_res = prog->exts_integrated ? TC_ACT_UNSPEC : 0; in cls_bpf_classify()
100 filter_res = bpf_prog_run_data_pointers(prog->filter, skb); in cls_bpf_classify()
103 filter_res = bpf_prog_run_data_pointers(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 …]
H A Dact_bpf.c40 struct tcf_bpf *prog = to_bpf(act); in tcf_bpf_act() local
44 tcf_lastuse_update(&prog->tcf_tm); in tcf_bpf_act()
45 bstats_update(this_cpu_ptr(prog->common.cpu_bstats), skb); in tcf_bpf_act()
47 filter = rcu_dereference(prog->filter); in tcf_bpf_act()
79 qstats_drop_inc(this_cpu_ptr(prog->common.cpu_qstats)); in tcf_bpf_act()
82 action = prog->tcf_action; in tcf_bpf_act()
92 static bool tcf_bpf_is_ebpf(const struct tcf_bpf *prog) in tcf_bpf_is_ebpf() argument
94 return !prog->bpf_ops; in tcf_bpf_is_ebpf()
97 static int tcf_bpf_dump_bpf_info(const struct tcf_bpf *prog, in tcf_bpf_dump_bpf_info() argument
102 if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog->bpf_num_ops)) in tcf_bpf_dump_bpf_info()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dexceptions.c44 ASSERT_OK(ret, #_prog " prog run ret"); \ in test_exceptions_success()
45 ASSERT_EQ(ropts.retval, return_val, #_prog " prog run retval"); \ in test_exceptions_success()
95 struct bpf_program *prog = NULL; \ in test_exceptions_success()
100 ASSERT_OK_PTR(bpf_program__name(prog), bpf_program__name(prog)); \ in test_exceptions_success()
113 if (!ASSERT_ERR_PTR(link = bpf_program__attach(prog), "attach err")) \ in test_exceptions_success()
116 if (!ASSERT_OK_PTR(link = bpf_program__attach(prog), "attach ok")) \ in test_exceptions_success()
125 prog = eskel->progs.pfentry; in test_exceptions_success()
126 bpf_program__set_autoload(prog, true); in test_exceptions_success()
127 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success()
[all...]
H A Dtailcalls.c21 struct bpf_program *prog; in test_tailcall_1()
36 prog = bpf_object__find_program_by_name(obj, "entry"); in test_tailcall_1()
37 if (CHECK_FAIL(!prog)) in test_tailcall_1()
40 main_fd = bpf_program__fd(prog); in test_tailcall_1()
55 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
56 if (CHECK_FAIL(!prog)) in test_tailcall_1()
59 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
85 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
86 if (CHECK_FAIL(!prog)) in test_tailcall_1()
89 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
20 struct bpf_program *prog; test_tailcall_1() local
156 struct bpf_program *prog; test_tailcall_2() local
235 struct bpf_program *prog; test_tailcall_count() local
416 struct bpf_program *prog; test_tailcall_4() local
506 struct bpf_program *prog; test_tailcall_5() local
596 struct bpf_program *prog; test_tailcall_bpf2bpf_1() local
680 struct bpf_program *prog; test_tailcall_bpf2bpf_2() local
760 struct bpf_program *prog; test_tailcall_bpf2bpf_3() local
855 struct bpf_program *prog; test_tailcall_bpf2bpf_4() local
1019 struct bpf_program *prog; test_tailcall_bpf2bpf_fentry_entry() local
1201 struct bpf_program *prog, *fentry_prog; test_tailcall_hierarchy_count() local
[all...]
H A Dtrampoline_count.c13 struct bpf_program *prog; in load_prog() local
26 prog = bpf_object__find_program_by_name(obj, name); in load_prog()
27 if (!ASSERT_OK_PTR(prog, "obj_find_prog")) in load_prog()
30 return prog; in load_prog()
38 struct bpf_program *prog; in serial_test_trampoline_count()
51 prog = load_prog(file, progs[i % ARRAY_SIZE(progs)], &inst[i]); in serial_test_trampoline_count()
52 if (!prog) in serial_test_trampoline_count()
55 link = bpf_program__attach(prog); in serial_test_trampoline_count()
63 prog = load_prog(file, "fmod_ret_test", &inst[i]); in serial_test_trampoline_count()
64 if (!prog) in serial_test_trampoline_count()
39 struct bpf_program *prog; serial_test_trampoline_count() local
[all...]
H A 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 …]
H A Dfexit_bpf2bpf.c66 struct bpf_program **prog = NULL, *p; in test_fexit_bpf2bpf_common() local
93 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common()
94 if (!ASSERT_OK_PTR(prog, "prog_ptr")) in test_fexit_bpf2bpf_common()
122 prog[i] = NULL; in test_fexit_bpf2bpf_common()
126 prog[i] = pos; in test_fexit_bpf2bpf_common()
130 if (!ASSERT_OK_PTR(prog[i], prog_name[i])) in test_fexit_bpf2bpf_common()
133 link[i] = bpf_program__attach_trace(prog[i]); in test_fexit_bpf2bpf_common()
143 bpf_program__expected_attach_type(prog[i]), in test_fexit_bpf2bpf_common()
171 free(prog); in test_fexit_bpf2bpf_common()
233 struct bpf_program *prog in test_second_attach() local
291 struct bpf_program *prog; test_fmod_ret_freplace() local
359 struct bpf_program *prog; test_obj_load_failure_common() local
[all...]
/linux/arch/x86/net/
H A Dbpf_jit_comp.c39 do { prog = emit_code(prog, bytes, len); } while (0)
333 u8 *prog = *pprog; in push_r9() local
336 *pprog = prog; in push_r9()
341 u8 *prog = *pprog; in pop_r9() local
344 *pprog = prog; in pop_r9()
349 u8 *prog = *pprog; in push_r12() local
352 *pprog = prog; in push_r12()
357 u8 *prog = *pprog; in push_callee_regs() local
367 *pprog = prog; in push_callee_regs()
372 u8 *prog = *pprog; in pop_r12() local
[all …]
/linux/drivers/clk/at91/
H A 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/tools/workqueue/
H A Dwq_dump.py95 worker_pool_idr = prog['worker_pool_idr']
96 workqueues = prog['workqueues']
97 wq_unbound_cpumask = prog['wq_unbound_cpumask']
98 wq_pod_types = prog['wq_pod_types']
99 wq_affn_dfl = prog['wq_affn_dfl']
100 wq_affn_names = prog['wq_affn_names']
102 WQ_BH = prog['WQ_BH']
103 WQ_UNBOUND = prog['WQ_UNBOUND']
104 WQ_ORDERED = prog['__WQ_ORDERED']
105 WQ_MEM_RECLAIM = prog['WQ_MEM_RECLAI
[all...]
H A Dwq_monitor.py54 workqueues = prog['workqueues']
56 WQ_UNBOUND = prog['WQ_UNBOUND']
57 WQ_MEM_RECLAIM = prog['WQ_MEM_RECLAIM']
59 PWQ_STAT_STARTED = prog['PWQ_STAT_STARTED'] # work items started execution
60 PWQ_STAT_COMPLETED = prog['PWQ_STAT_COMPLETED'] # work items completed execution
61 PWQ_STAT_CPU_TIME = prog['PWQ_STAT_CPU_TIME'] # total CPU time consumed
62 PWQ_STAT_CPU_INTENSIVE = prog['PWQ_STAT_CPU_INTENSIVE'] # wq_cpu_intensive_thresh_us violations
63 PWQ_STAT_CM_WAKEUP = prog['PWQ_STAT_CM_WAKEUP'] # concurrency-management worker wakeups
64 PWQ_STAT_REPATRIATED = prog['PWQ_STAT_REPATRIATED'] # unbound workers brought back into scope
65 PWQ_STAT_MAYDAY = prog['PWQ_STAT_MAYDAY'] # maydays to rescuer
[all …]
/linux/kernel/bpf/
H A Dmprog.c20 if (type && link->prog->type != type) { in bpf_mprog_link()
26 tuple->prog = link->prog; in bpf_mprog_link()
34 struct bpf_prog *prog = ERR_PTR(-EINVAL); in bpf_mprog_prog() local
38 prog = bpf_prog_by_id(id_or_fd); in bpf_mprog_prog()
40 prog = bpf_prog_get(id_or_fd); in bpf_mprog_prog()
41 if (IS_ERR(prog)) in bpf_mprog_prog()
42 return PTR_ERR(prog); in bpf_mprog_prog()
43 if (type && prog->type != type) { in bpf_mprog_prog()
44 bpf_prog_put(prog); in bpf_mprog_prog()
49 tuple->prog = prog; in bpf_mprog_prog()
[all …]
H A Dsyscall.c2272 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type() argument
2283 if (!bpf_prog_is_offloaded(prog->aux)) in find_prog_type()
2284 prog->aux->ops = ops; in find_prog_type()
2286 prog->aux->ops = &bpf_offload_prog_ops; in find_prog_type()
2287 prog->type = type; in find_prog_type()
2302 static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op) in bpf_audit_prog() argument
2317 prog->aux->id, bpf_audit_str[op]); in bpf_audit_prog()
2321 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id() argument
2327 id = idr_alloc_cyclic(&prog_idr, prog, 1, INT_MAX, GFP_ATOMIC); in bpf_prog_alloc_id()
2329 prog->aux->id = id; in bpf_prog_alloc_id()
[all …]
H A Dcore.c126 fp->aux->prog = fp; in bpf_prog_alloc_no_stats()
152 struct bpf_prog *prog; in bpf_prog_alloc() local
155 prog = bpf_prog_alloc_no_stats(size, gfp_extra_flags); in bpf_prog_alloc()
156 if (!prog) in bpf_prog_alloc()
159 prog->stats = alloc_percpu_gfp(struct bpf_prog_stats, gfp_flags); in bpf_prog_alloc()
160 if (!prog->stats) { in bpf_prog_alloc()
161 free_percpu(prog->active); in bpf_prog_alloc()
162 kfree(prog->aux); in bpf_prog_alloc()
163 vfree(prog); in bpf_prog_alloc()
170 pstats = per_cpu_ptr(prog->stats, cpu); in bpf_prog_alloc()
[all …]
H A Dtrampoline.c137 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline() argument
139 enum bpf_attach_type eatype = prog->expected_attach_type; in bpf_prog_has_trampoline()
140 enum bpf_prog_type ptype = prog->type; in bpf_prog_has_trampoline()
459 *ip_arg |= link->link.prog->call_get_func_ip; in bpf_trampoline_get_progs()
725 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() argument
727 switch (prog->expected_attach_type) { in bpf_attach_type_to_tramp()
737 if (!prog->aux->attach_func_proto->type) in bpf_attach_type_to_tramp()
778 kind = bpf_attach_type_to_tramp(link->link.prog); in __bpf_trampoline_link_prog()
795 tr->extension_prog = link->link.prog; in __bpf_trampoline_link_prog()
798 link->link.prog->bpf_func); in __bpf_trampoline_link_prog()
[all …]
H A 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 …]
H A Dcgroup.c68 const struct bpf_prog *prog; in bpf_prog_run_array_cg() local
79 while ((prog = READ_ONCE(item->prog))) { in bpf_prog_run_array_cg()
81 func_ret = run_prog(prog, ctx); in bpf_prog_run_array_cg()
238 struct bpf_prog *prog, in bpf_cgroup_storages_alloc() argument
249 map = prog->aux->cgroup_storage[stype]; in bpf_cgroup_storages_alloc()
257 storages[stype] = bpf_cgroup_storage_alloc(prog, stype); in bpf_cgroup_storages_alloc()
323 if (pl->prog) { in cgroup_bpf_release()
324 if (pl->prog->expected_attach_type == BPF_LSM_CGROUP) in cgroup_bpf_release()
325 bpf_trampoline_unlink_cgroup_shim(pl->prog); in cgroup_bpf_release()
326 bpf_prog_put(pl->prog); in cgroup_bpf_release()
[all …]
/linux/drivers/net/hyperv/
H A 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/tools/lib/bpf/
H A Dlibbpf.c76 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
767 struct bpf_program *prog; member
790 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload() argument
792 if (!prog) in bpf_program__unload()
795 zclose(prog->fd); in bpf_program__unload()
797 zfree(&prog->func_info); in bpf_program__unload()
798 zfree(&prog->line_info); in bpf_program__unload()
799 zfree(&prog->subprogs); in bpf_program__unload()
802 static void bpf_program__exit(struct bpf_program *prog) in bpf_program__exit() argument
804 if (!prog) in bpf_program__exit()
839 bpf_object__init_prog(struct bpf_object * obj,struct bpf_program * prog,const char * name,size_t sec_idx,const char * sec_name,size_t sec_off,void * insn_data,size_t insn_data_sz) bpf_object__init_prog() argument
904 struct bpf_program *prog, *progs; bpf_object__add_programs() local
988 struct bpf_program *prog = obj->programs; bpf_object_bswap_progs() local
1107 is_valid_st_ops_program(struct bpf_object * obj,const struct bpf_program * prog) is_valid_st_ops_program() argument
1126 struct bpf_program *prog, *slot_prog; bpf_object_adjust_struct_ops_autoload() local
1211 struct bpf_program *prog; bpf_map__init_kern_struct_ops() local
3474 prog_needs_vmlinux_btf(struct bpf_program * prog) prog_needs_vmlinux_btf() argument
3496 struct bpf_program *prog; obj_needs_vmlinux_btf() local
3578 struct bpf_program *prog = &obj->programs[i]; bpf_object__sanitize_and_load_btf() local
4469 prog_is_subprog(const struct bpf_object * obj,const struct bpf_program * prog) prog_is_subprog() argument
4478 struct bpf_program *prog; bpf_object__find_program_by_name() local
4526 bpf_prog_compute_hash(struct bpf_program * prog) bpf_prog_compute_hash() argument
4564 bpf_program__record_reloc(struct bpf_program * prog,struct reloc_desc * reloc_desc,__u32 insn_idx,const char * sym_name,const Elf64_Sym * sym,const Elf64_Rel * rel) bpf_program__record_reloc() argument
4746 prog_contains_insn(const struct bpf_program * prog,size_t insn_idx) prog_contains_insn() argument
4756 struct bpf_program *prog; find_prog_by_sec_insn() local
4785 struct bpf_program *prog; bpf_object__collect_prog_relos() local
5949 record_relo_core(struct bpf_program * prog,const struct bpf_core_relo * core_relo,int insn_idx) record_relo_core() argument
5967 find_relo_core(struct bpf_program * prog,int insn_idx) find_relo_core() argument
5983 bpf_core_resolve_relo(struct bpf_program * prog,const struct bpf_core_relo * relo,int relo_idx,const struct btf * local_btf,struct hashmap * cand_cache,struct bpf_core_relo_res * targ_res) bpf_core_resolve_relo() argument
6035 struct bpf_program *prog; bpf_object__relocate_core() local
6149 poison_map_ldimm64(struct bpf_program * prog,int relo_idx,int insn_idx,struct bpf_insn * insn,int map_idx,const struct bpf_map * map) poison_map_ldimm64() argument
6179 poison_kfunc_call(struct bpf_program * prog,int relo_idx,int insn_idx,struct bpf_insn * insn,int ext_idx,const struct extern_desc * ext) poison_kfunc_call() argument
6199 find_jt_map(struct bpf_object * obj,struct bpf_program * prog,unsigned int sym_off) find_jt_map() argument
6217 add_jt_map(struct bpf_object * obj,struct bpf_program * prog,unsigned int sym_off,int map_fd) add_jt_map() argument
6236 find_subprog_idx(struct bpf_program * prog,int insn_idx) find_subprog_idx() argument
6248 create_jt_map(struct bpf_object * obj,struct bpf_program * prog,struct reloc_desc * relo) create_jt_map() argument
6356 bpf_object__relocate_data(struct bpf_object * obj,struct bpf_program * prog) bpf_object__relocate_data() argument
6470 adjust_prog_btf_ext_info(const struct bpf_object * obj,const struct bpf_program * prog,const struct btf_ext_info * ext_info,void ** prog_info,__u32 * prog_rec_cnt,__u32 * prog_rec_sz) adjust_prog_btf_ext_info() argument
6540 reloc_prog_func_and_line_info(const struct bpf_object * obj,struct bpf_program * main_prog,const struct bpf_program * prog) reloc_prog_func_and_line_info() argument
6619 find_prog_insn_relo(const struct bpf_program * prog,size_t insn_idx) find_prog_insn_relo() argument
6716 bpf_object__reloc_code(struct bpf_object * obj,struct bpf_program * main_prog,struct bpf_program * prog) bpf_object__reloc_code() argument
6905 bpf_object__relocate_calls(struct bpf_object * obj,struct bpf_program * prog) bpf_object__relocate_calls() argument
6931 struct bpf_program *prog; bpf_object__free_relocs() local
6971 bpf_prog_assign_exc_cb(struct bpf_object * obj,struct bpf_program * prog) bpf_prog_assign_exc_cb() argument
7093 need_func_arg_type_fixup(const struct btf * btf,const struct bpf_program * prog,const char * subprog_name,int arg_idx,int arg_type_id,const char * ctx_name) need_func_arg_type_fixup() argument
7164 clone_func_btf_info(struct btf * btf,int orig_fn_id,struct bpf_program * prog) clone_func_btf_info() argument
7233 bpf_program_fixup_func_info(struct bpf_object * obj,struct bpf_program * prog) bpf_program_fixup_func_info() argument
7374 struct bpf_program *prog; bpf_object__relocate() local
7677 bpf_object__sanitize_prog(struct bpf_object * obj,struct bpf_program * prog) bpf_object__sanitize_prog() argument
7716 libbpf_prepare_prog_load(struct bpf_program * prog,struct bpf_prog_load_opts * opts,long cookie) libbpf_prepare_prog_load() argument
7783 bpf_object_load_prog(struct bpf_object * obj,struct bpf_program * prog,struct bpf_insn * insns,int insns_cnt,const char * license,__u32 kern_version,int * prog_fd) bpf_object_load_prog() argument
8013 fixup_log_failed_core_relo(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_failed_core_relo() argument
8052 fixup_log_missing_map_load(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_missing_map_load() argument
8085 fixup_log_missing_kfunc_call(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_missing_kfunc_call() argument
8118 fixup_verifier_log(struct bpf_program * prog,char * buf,size_t buf_sz) fixup_verifier_log() argument
8168 bpf_program_record_relos(struct bpf_program * prog) bpf_program_record_relos() argument
8214 struct bpf_program *prog; bpf_object__load_progs() local
8245 struct bpf_program *prog; bpf_object_prepare_progs() local
8262 struct bpf_program *prog; bpf_object_init_progs() local
8841 struct bpf_program *prog = st_ops->progs[i]; bpf_map_prepare_vdata() local
9047 bpf_program__pin(struct bpf_program * prog,const char * path) bpf_program__pin() argument
9074 bpf_program__unpin(struct bpf_program * prog,const char * path) bpf_program__unpin() argument
9313 struct bpf_program *prog; bpf_object__pin_programs() local
9350 struct bpf_program *prog; bpf_object__unpin_programs() local
9577 struct bpf_program *prog = prev; bpf_object__next_program() local
9589 struct bpf_program *prog = next; bpf_object__prev_program() local
9598 bpf_program__set_ifindex(struct bpf_program * prog,__u32 ifindex) bpf_program__set_ifindex() argument
9603 bpf_program__name(const struct bpf_program * prog) bpf_program__name() argument
9608 bpf_program__section_name(const struct bpf_program * prog) bpf_program__section_name() argument
9613 bpf_program__autoload(const struct bpf_program * prog) bpf_program__autoload() argument
9618 bpf_program__set_autoload(struct bpf_program * prog,bool autoload) bpf_program__set_autoload() argument
9627 bpf_program__autoattach(const struct bpf_program * prog) bpf_program__autoattach() argument
9632 bpf_program__set_autoattach(struct bpf_program * prog,bool autoattach) bpf_program__set_autoattach() argument
9637 bpf_program__insns(const struct bpf_program * prog) bpf_program__insns() argument
9642 bpf_program__insn_cnt(const struct bpf_program * prog) bpf_program__insn_cnt() argument
9647 bpf_program__set_insns(struct bpf_program * prog,struct bpf_insn * new_insns,size_t new_insn_cnt) bpf_program__set_insns() argument
9668 bpf_program__fd(const struct bpf_program * prog) bpf_program__fd() argument
9682 bpf_program__type(const struct bpf_program * prog) bpf_program__type() argument
9693 bpf_program__set_type(struct bpf_program * prog,enum bpf_prog_type type) bpf_program__set_type() argument
9718 bpf_program__expected_attach_type(const struct bpf_program * prog) bpf_program__expected_attach_type() argument
9723 bpf_program__set_expected_attach_type(struct bpf_program * prog,enum bpf_attach_type type) bpf_program__set_expected_attach_type() argument
9733 bpf_program__flags(const struct bpf_program * prog) bpf_program__flags() argument
9738 bpf_program__set_flags(struct bpf_program * prog,__u32 flags) bpf_program__set_flags() argument
9747 bpf_program__log_level(const struct bpf_program * prog) bpf_program__log_level() argument
9752 bpf_program__set_log_level(struct bpf_program * prog,__u32 log_level) bpf_program__set_log_level() argument
9761 bpf_program__log_buf(const struct bpf_program * prog,size_t * log_size) bpf_program__log_buf() argument
9767 bpf_program__set_log_buf(struct bpf_program * prog,char * log_buf,size_t log_size) bpf_program__set_log_buf() argument
9781 bpf_program__func_info(const struct bpf_program * prog) bpf_program__func_info() argument
9788 bpf_program__func_info_cnt(const struct bpf_program * prog) bpf_program__func_info_cnt() argument
9793 bpf_program__line_info(const struct bpf_program * prog) bpf_program__line_info() argument
9800 bpf_program__line_info_cnt(const struct bpf_program * prog) bpf_program__line_info_cnt() argument
10199 struct bpf_program *prog; bpf_object__collect_st_ops_relos() local
10466 libbpf_find_attach_btf_id(struct bpf_program * prog,const char * attach_name,int * btf_obj_fd,int * btf_type_id) libbpf_find_attach_btf_id() argument
10834 bpf_map__set_exclusive_program(struct bpf_map * map,struct bpf_program * prog) bpf_map__set_exclusive_program() argument
11073 bpf_link__update_program(struct bpf_link * link,struct bpf_program * prog) bpf_link__update_program() argument
11260 bpf_program__attach_perf_event_opts(const struct bpf_program * prog,int pfd,const struct bpf_perf_event_opts * opts) bpf_program__attach_perf_event_opts() argument
11338 bpf_program__attach_perf_event(const struct bpf_program * prog,int pfd) bpf_program__attach_perf_event() argument
11655 bpf_program__attach_kprobe_opts(const struct bpf_program * prog,const char * func_name,const struct bpf_kprobe_opts * opts) bpf_program__attach_kprobe_opts() argument
11749 bpf_program__attach_kprobe(const struct bpf_program * prog,bool retprobe,const char * func_name) bpf_program__attach_kprobe() argument
11760 bpf_program__attach_ksyscall(const struct bpf_program * prog,const char * syscall_name,const struct bpf_ksyscall_opts * opts) bpf_program__attach_ksyscall() argument
12000 bpf_program__attach_kprobe_multi_opts(const struct bpf_program * prog,const char * pattern,const struct bpf_kprobe_multi_opts * opts) bpf_program__attach_kprobe_multi_opts() argument
12101 attach_kprobe(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe() argument
12138 attach_ksyscall(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_ksyscall() argument
12159 attach_kprobe_multi(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe_multi() argument
12190 attach_kprobe_session(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe_session() argument
12216 attach_uprobe_multi(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_uprobe_multi() argument
12458 bpf_program__attach_uprobe_multi(const struct bpf_program * prog,pid_t pid,const char * path,const char * func_pattern,const struct bpf_uprobe_multi_opts * opts) bpf_program__attach_uprobe_multi() argument
12586 bpf_program__attach_uprobe_opts(const struct bpf_program * prog,pid_t pid,const char * binary_path,size_t func_offset,const struct bpf_uprobe_opts * opts) bpf_program__attach_uprobe_opts() argument
12732 attach_uprobe(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_uprobe() argument
12787 bpf_program__attach_uprobe(const struct bpf_program * prog,bool retprobe,pid_t pid,const char * binary_path,size_t func_offset) bpf_program__attach_uprobe() argument
12797 bpf_program__attach_usdt(const struct bpf_program * prog,pid_t pid,const char * binary_path,const char * usdt_provider,const char * usdt_name,const struct bpf_usdt_opts * opts) bpf_program__attach_usdt() argument
12850 attach_usdt(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_usdt() argument
12929 bpf_program__attach_tracepoint_opts(const struct bpf_program * prog,const char * tp_category,const char * tp_name,const struct bpf_tracepoint_opts * opts) bpf_program__attach_tracepoint_opts() argument
12962 bpf_program__attach_tracepoint(const struct bpf_program * prog,const char * tp_category,const char * tp_name) bpf_program__attach_tracepoint() argument
12969 attach_tp(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_tp() argument
13002 bpf_program__attach_raw_tracepoint_opts(const struct bpf_program * prog,const char * tp_name,struct bpf_raw_tracepoint_opts * opts) bpf_program__attach_raw_tracepoint_opts() argument
13038 bpf_program__attach_raw_tracepoint(const struct bpf_program * prog,const char * tp_name) bpf_program__attach_raw_tracepoint() argument
13044 attach_raw_tp(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_raw_tp() argument
13086 bpf_program__attach_btf_id(const struct bpf_program * prog,const struct bpf_trace_opts * opts) bpf_program__attach_btf_id() argument
13121 bpf_program__attach_trace(const struct bpf_program * prog) bpf_program__attach_trace() argument
13126 bpf_program__attach_trace_opts(const struct bpf_program * prog,const struct bpf_trace_opts * opts) bpf_program__attach_trace_opts() argument
13132 bpf_program__attach_lsm(const struct bpf_program * prog) bpf_program__attach_lsm() argument
13137 attach_trace(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_trace() argument
13143 attach_lsm(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_lsm() argument
13150 bpf_program_attach_fd(const struct bpf_program * prog,int target_fd,const char * target_name,const struct bpf_link_create_opts * opts) bpf_program_attach_fd() argument
13184 bpf_program__attach_cgroup(const struct bpf_program * prog,int cgroup_fd) bpf_program__attach_cgroup() argument
13190 bpf_program__attach_netns(const struct bpf_program * prog,int netns_fd) bpf_program__attach_netns() argument
13196 bpf_program__attach_sockmap(const struct bpf_program * prog,int map_fd) bpf_program__attach_sockmap() argument
13201 bpf_program__attach_xdp(const struct bpf_program * prog,int ifindex) bpf_program__attach_xdp() argument
13208 bpf_program__attach_cgroup_opts(const struct bpf_program * prog,int cgroup_fd,const struct bpf_cgroup_opts * opts) bpf_program__attach_cgroup_opts() argument
13236 bpf_program__attach_tcx(const struct bpf_program * prog,int ifindex,const struct bpf_tcx_opts * opts) bpf_program__attach_tcx() argument
13271 bpf_program__attach_netkit(const struct bpf_program * prog,int ifindex,const struct bpf_netkit_opts * opts) bpf_program__attach_netkit() argument
13304 bpf_program__attach_freplace(const struct bpf_program * prog,int target_fd,const char * attach_func_name) bpf_program__attach_freplace() argument
13342 bpf_program__attach_iter(const struct bpf_program * prog,const struct bpf_iter_attach_opts * opts) bpf_program__attach_iter() argument
13380 attach_iter(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_iter() argument
13386 bpf_program__attach_netfilter(const struct bpf_program * prog,const struct bpf_netfilter_opts * opts) bpf_program__attach_netfilter() argument
13426 bpf_program__attach(const struct bpf_program * prog) bpf_program__attach() argument
14123 bpf_program__set_attach_target(struct bpf_program * prog,int attach_prog_fd,const char * attach_func_name) bpf_program__set_attach_target() argument
14169 bpf_program__assoc_struct_ops(struct bpf_program * prog,struct bpf_map * map,struct bpf_prog_assoc_struct_ops_opts * opts) bpf_program__assoc_struct_ops() argument
14336 struct bpf_program **prog = prog_skel->prog; populate_skeleton_progs() local
14480 struct bpf_program *prog = *prog_skel->prog; bpf_object__attach_skeleton() local
[all...]
/linux/drivers/net/netdevsim/
H A 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 || !bpf_prog_is_offloaded(prog->aux)) 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/drivers/net/ethernet/netronome/nfp/bpf/
H A 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()
132 for (i = 0; i < prog->aux->used_map_cnt; i++) in nfp_map_ptrs_record()
133 if (bpf_map_offload_neutral(prog->aux->used_maps[i])) { in nfp_map_ptrs_record()
135 prog->aux->used_maps[i]); in nfp_map_ptrs_record()
144 mutex_unlock(&prog->aux->used_maps_mutex); in nfp_map_ptrs_record()
149 nfp_prog_prepare(struct nfp_prog *nfp_prog, const struct bpf_insn *prog, in nfp_prog_prepare() argument
160 meta->insn = prog[i]; in nfp_prog_prepare()
[all …]
/linux/drivers/media/rc/
H A Dbpf-lirc.c83 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto() argument
113 if (bpf_token_capable(prog->aux->token, CAP_PERFMON)) in lirc_mode2_func_proto()
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()
[all …]
/linux/include/linux/
H A Dbpf.h965 bool (*allowed)(const struct bpf_prog *prog);
1093 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
1102 const struct bpf_prog *prog);
1108 const struct bpf_prog *prog,
1111 const struct bpf_prog *prog);
1112 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog,
1119 struct bpf_prog *prog, u32 *target_size);
1135 int (*prepare)(struct bpf_prog *prog);
1136 int (*translate)(struct bpf_prog *prog);
1137 void (*destroy)(struct bpf_prog *prog);
[all …]
/linux/samples/bpf/
H A Dtracex5_user.c27 struct sock_fprog prog = { in install_accept_all_seccomp() local
31 if (prctl(PR_SET_SECCOMP, 2, &prog)) in install_accept_all_seccomp()
38 struct bpf_program *prog; in main() local
52 prog = bpf_object__find_program_by_name(obj, "bpf_prog1"); in main()
53 if (!prog) { in main()
64 link = bpf_program__attach(prog); in main()
77 bpf_object__for_each_program(prog, obj) { in main()
78 section = bpf_program__section_name(prog); in main()
83 fd = bpf_program__fd(prog); in main()
/linux/net/core/
H A Dsock_reuseport.c184 RCU_INIT_POINTER(reuse->prog, NULL); in __reuseport_alloc()
276 more_reuse->prog = reuse->prog; in reuseport_grow()
307 sk_reuseport_prog_free(rcu_dereference_protected(reuse->prog, 1)); in reuseport_free_rcu()
466 struct bpf_prog *prog; in reuseport_stop_listen_sock() local
472 prog = rcu_dereference_protected(reuse->prog, in reuseport_stop_listen_sock()
476 (prog && prog->expected_attach_type == BPF_SK_REUSEPORT_SELECT_OR_MIGRATE)) { in reuseport_stop_listen_sock()
498 struct bpf_prog *prog, struct sk_buff *skb, in run_bpf_filter() argument
516 index = bpf_prog_run_save_cb(prog, skb); in run_bpf_filter()
574 struct bpf_prog *prog; in reuseport_select_sock() local
585 prog = rcu_dereference(reuse->prog); in reuseport_select_sock()
[all …]

12345678910>>...18