/linux-6.12.1/net/sched/ |
D | cls_bpf.c | 87 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() 101 filter_res = bpf_prog_run(prog->filter, skb); in cls_bpf_classify() 105 filter_res = bpf_prog_run(prog->filter, skb); in cls_bpf_classify() 110 if (prog->exts_integrated) { in cls_bpf_classify() 112 res->classid = TC_H_MAJ(prog->res.classid) | in cls_bpf_classify() 127 *res = prog->res; in cls_bpf_classify() [all …]
|
D | act_bpf.c | 40 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() 81 qstats_drop_inc(this_cpu_ptr(prog->common.cpu_qstats)); in tcf_bpf_act() 84 action = prog->tcf_action; in tcf_bpf_act() 94 static bool tcf_bpf_is_ebpf(const struct tcf_bpf *prog) in tcf_bpf_is_ebpf() argument 96 return !prog->bpf_ops; in tcf_bpf_is_ebpf() 99 static int tcf_bpf_dump_bpf_info(const struct tcf_bpf *prog, in tcf_bpf_dump_bpf_info() argument 104 if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog->bpf_num_ops)) in tcf_bpf_dump_bpf_info() [all …]
|
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | exceptions.c | 94 struct bpf_program *prog = NULL; \ in test_exceptions_success() 99 ASSERT_OK_PTR(bpf_program__name(prog), bpf_program__name(prog)); \ in test_exceptions_success() 112 if (!ASSERT_ERR_PTR(link = bpf_program__attach(prog), "attach err")) \ in test_exceptions_success() 115 if (!ASSERT_OK_PTR(link = bpf_program__attach(prog), "attach ok")) \ in test_exceptions_success() 124 prog = eskel->progs.pfentry; in test_exceptions_success() 125 bpf_program__set_autoload(prog, true); in test_exceptions_success() 126 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success() 134 prog = eskel->progs.throwing_fentry; in test_exceptions_success() 135 bpf_program__set_autoload(prog, true); in test_exceptions_success() 136 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success() [all …]
|
D | tailcalls.c | 19 struct bpf_program *prog; in test_tailcall_1() local 34 prog = bpf_object__find_program_by_name(obj, "entry"); in test_tailcall_1() 35 if (CHECK_FAIL(!prog)) in test_tailcall_1() 38 main_fd = bpf_program__fd(prog); in test_tailcall_1() 53 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1() 54 if (CHECK_FAIL(!prog)) in test_tailcall_1() 57 prog_fd = bpf_program__fd(prog); in test_tailcall_1() 83 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1() 84 if (CHECK_FAIL(!prog)) in test_tailcall_1() 87 prog_fd = bpf_program__fd(prog); in test_tailcall_1() [all …]
|
D | trampoline_count.c | 13 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() 39 struct bpf_program *prog; in serial_test_trampoline_count() local 53 prog = load_prog(file, progs[i % ARRAY_SIZE(progs)], &inst[i]); in serial_test_trampoline_count() 54 if (!prog) in serial_test_trampoline_count() 57 link = bpf_program__attach(prog); in serial_test_trampoline_count() 65 prog = load_prog(file, "fmod_ret_test", &inst[i]); in serial_test_trampoline_count() 66 if (!prog) in serial_test_trampoline_count() [all …]
|
/linux-6.12.1/arch/riscv/net/ |
D | bpf_jit_core.c | 21 const struct bpf_prog *prog = ctx->prog; in build_body() local 24 for (i = 0; i < prog->len; i++) { in build_body() 25 const struct bpf_insn *insn = &prog->insnsi[i]; in build_body() 45 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() argument 49 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile() 54 if (!prog->jit_requested) in bpf_int_jit_compile() 57 tmp = bpf_jit_blind_constants(prog); in bpf_int_jit_compile() 60 if (tmp != prog) { in bpf_int_jit_compile() 62 prog = tmp; in bpf_int_jit_compile() 65 jit_data = prog->aux->jit_data; in bpf_int_jit_compile() [all …]
|
/linux-6.12.1/arch/parisc/net/ |
D | bpf_jit_core.c | 18 const struct bpf_prog *prog = ctx->prog; in build_body() local 22 for (i = 0; i < prog->len; i++) { in build_body() 23 const struct bpf_insn *insn = &prog->insnsi[i]; in build_body() 44 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() argument 48 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile() 53 if (!prog->jit_requested) in bpf_int_jit_compile() 56 tmp = bpf_jit_blind_constants(prog); in bpf_int_jit_compile() 59 if (tmp != prog) { in bpf_int_jit_compile() 61 prog = tmp; in bpf_int_jit_compile() 64 jit_data = prog->aux->jit_data; in bpf_int_jit_compile() [all …]
|
/linux-6.12.1/drivers/clk/at91/ |
D | clk-programmable.c | 35 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-6.12.1/arch/x86/net/ |
D | bpf_jit_comp.c | 38 do { prog = emit_code(prog, bytes, len); } while (0) 330 u8 *prog = *pprog; in push_r12() local 333 *pprog = prog; in push_r12() 338 u8 *prog = *pprog; in push_callee_regs() local 348 *pprog = prog; in push_callee_regs() 353 u8 *prog = *pprog; in pop_r12() local 356 *pprog = prog; in pop_r12() 361 u8 *prog = *pprog; in pop_callee_regs() local 371 *pprog = prog; in pop_callee_regs() 376 u8 *prog = *pprog; in emit_nops() local [all …]
|
D | bpf_jit_comp32.c | 65 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-6.12.1/tools/workqueue/ |
D | wq_dump.py | 95 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_RECLAIM'] [all …]
|
/linux-6.12.1/kernel/bpf/ |
D | mprog.c | 20 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 …]
|
D | syscall.c | 2106 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type() argument 2117 if (!bpf_prog_is_offloaded(prog->aux)) in find_prog_type() 2118 prog->aux->ops = ops; in find_prog_type() 2120 prog->aux->ops = &bpf_offload_prog_ops; in find_prog_type() 2121 prog->type = type; in find_prog_type() 2136 static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op) in bpf_audit_prog() argument 2151 prog->aux->id, bpf_audit_str[op]); in bpf_audit_prog() 2155 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id() argument 2161 id = idr_alloc_cyclic(&prog_idr, prog, 1, INT_MAX, GFP_ATOMIC); in bpf_prog_alloc_id() 2163 prog->aux->id = id; in bpf_prog_alloc_id() [all …]
|
D | dispatcher.c | 26 struct bpf_dispatcher *d, struct bpf_prog *prog) in bpf_dispatcher_find_prog() argument 31 if (prog == d->progs[i].prog) in bpf_dispatcher_find_prog() 44 struct bpf_prog *prog) in bpf_dispatcher_add_prog() argument 48 if (!prog) in bpf_dispatcher_add_prog() 51 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_add_prog() 61 bpf_prog_inc(prog); in bpf_dispatcher_add_prog() 62 entry->prog = prog; in bpf_dispatcher_add_prog() 69 struct bpf_prog *prog) in bpf_dispatcher_remove_prog() argument 73 if (!prog) in bpf_dispatcher_remove_prog() 76 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_remove_prog() [all …]
|
D | trampoline.c | 107 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline() argument 109 enum bpf_attach_type eatype = prog->expected_attach_type; in bpf_prog_has_trampoline() 110 enum bpf_prog_type ptype = prog->type; in bpf_prog_has_trampoline() 247 *ip_arg |= link->link.prog->call_get_func_ip; in bpf_trampoline_get_progs() 504 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() argument 506 switch (prog->expected_attach_type) { in bpf_attach_type_to_tramp() 514 if (!prog->aux->attach_func_proto->type) in bpf_attach_type_to_tramp() 533 kind = bpf_attach_type_to_tramp(link->link.prog); in __bpf_trampoline_link_prog() 547 tr->extension_prog = link->link.prog; in __bpf_trampoline_link_prog() 549 link->link.prog->bpf_func); in __bpf_trampoline_link_prog() [all …]
|
D | prog_iter.c | 16 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 …]
|
D | offload.c | 108 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy() argument 110 struct bpf_prog_offload *offload = prog->aux->offload; in __bpf_prog_offload_destroy() 113 offload->offdev->ops->destroy(prog); in __bpf_prog_offload_destroy() 117 prog->aux->offload = NULL; in __bpf_prog_offload_destroy() 178 __bpf_prog_offload_destroy(offload->prog); in __bpf_offload_dev_netdev_unregister() 188 static int __bpf_prog_dev_bound_init(struct bpf_prog *prog, struct net_device *netdev) in __bpf_prog_dev_bound_init() argument 198 offload->prog = prog; in __bpf_prog_dev_bound_init() 205 if (bpf_prog_is_offloaded(prog->aux) && (!ondev || !ondev->offdev)) { in __bpf_prog_dev_bound_init() 219 prog->aux->offload = offload; in __bpf_prog_dev_bound_init() 228 int bpf_prog_dev_bound_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_dev_bound_init() argument [all …]
|
/linux-6.12.1/drivers/net/hyperv/ |
D | netvsc_bpf.c | 31 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-6.12.1/drivers/net/ethernet/microsoft/mana/ |
D | mana_bpf.c | 84 struct bpf_prog *prog; in mana_run_xdp() local 88 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp() 90 if (!prog) in mana_run_xdp() 96 act = bpf_prog_run_xdp(prog, xdp); in mana_run_xdp() 107 rxq->xdp_rc = xdp_do_redirect(ndev, xdp, prog); in mana_run_xdp() 123 trace_xdp_exception(ndev, prog, act); in mana_run_xdp() 127 bpf_warn_invalid_xdp_action(ndev, prog, act); in mana_run_xdp() 149 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp() argument 157 if (old_prog == prog) in mana_chn_setxdp() 160 if (prog) in mana_chn_setxdp() [all …]
|
/linux-6.12.1/arch/arc/net/ |
D | bpf_jit_core.c | 101 struct bpf_prog *prog; member 125 static void vm_dump(const struct bpf_prog *prog) in vm_dump() argument 129 dump_bytes((u8 *)prog->insns, 8 * prog->len, " VM "); in vm_dump() 147 if (bpf_jit_enable <= 1 || !ctx->prog->jited) in jit_dump() 155 bpf_jit_dump(ctx->prog->len, ctx->jit.len, pass, ctx->jit.buf); in jit_dump() 160 static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog) in jit_ctx_init() argument 164 ctx->orig_prog = prog; in jit_ctx_init() 167 ctx->prog = bpf_jit_blind_constants(prog); in jit_ctx_init() 168 if (IS_ERR(ctx->prog)) in jit_ctx_init() 169 return PTR_ERR(ctx->prog); in jit_ctx_init() [all …]
|
/linux-6.12.1/tools/lib/bpf/ |
D | libbpf.h | 325 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prog); 333 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *prog); 335 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog, 338 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog); 339 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog); 340 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog); 341 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload); 342 LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog); 343 LIBBPF_API void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach); 367 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog); [all …]
|
D | libbpf.c | 75 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog); 748 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload() argument 750 if (!prog) in bpf_program__unload() 753 zclose(prog->fd); in bpf_program__unload() 755 zfree(&prog->func_info); in bpf_program__unload() 756 zfree(&prog->line_info); in bpf_program__unload() 759 static void bpf_program__exit(struct bpf_program *prog) in bpf_program__exit() argument 761 if (!prog) in bpf_program__exit() 764 bpf_program__unload(prog); in bpf_program__exit() 765 zfree(&prog->name); in bpf_program__exit() [all …]
|
/linux-6.12.1/scripts/ |
D | sphinx-pre-install | 92 foreach my $prog (sort keys %missing) { 93 my $is_optional = $missing{$prog}; 108 print "Warning: better to also install \"$prog\".\n"; 110 print "ERROR: please install \"$prog\", otherwise, build won't work.\n"; 113 if (defined($map{$prog})) { 114 $install .= " " . $map{$prog}; 116 $install .= " " . $prog; 158 my $prog = shift; 176 my $prog = shift; 179 return $prog if findprog($prog); [all …]
|
/linux-6.12.1/drivers/net/netdevsim/ |
D | bpf.c | 31 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-6.12.1/drivers/net/ethernet/netronome/nfp/bpf/ |
D | offload.c | 112 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 …]
|