/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | sk_lookup.c | 533 link[0] = attach_lookup_prog(skel->progs.lookup_pass); in query_lookup_prog() 536 link[1] = attach_lookup_prog(skel->progs.lookup_pass); in query_lookup_prog() 539 link[2] = attach_lookup_prog(skel->progs.lookup_drop); in query_lookup_prog() 677 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 685 .lookup_prog = skel->progs.redir_ip4, in test_redirect_lookup() 693 .lookup_prog = skel->progs.select_sock_a, in test_redirect_lookup() 694 .reuseport_prog = skel->progs.select_sock_b, in test_redirect_lookup() 703 .lookup_prog = skel->progs.select_sock_a_no_reuseport, in test_redirect_lookup() 704 .reuseport_prog = skel->progs.select_sock_b, in test_redirect_lookup() 713 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() [all …]
|
D | cg_storage_multi.c | 103 parent_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 127 child_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 177 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 182 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 187 parent_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 222 child_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 227 child_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 232 child_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 302 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_shared() 307 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_shared() [all …]
|
D | cgroup_link.c | 49 prog_fd = bpf_program__fd(skel->progs.egress); in test_cgroup_link() 66 links[i] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 122 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 148 tmp_link = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 166 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 184 err = bpf_link__update_program(links[i], skel->progs.egress_alt); in test_cgroup_link() 192 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress_alt); in test_cgroup_link() 195 bpf_program__fd(skel->progs.egress_alt), in test_cgroup_link() 202 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress); in test_cgroup_link() 205 bpf_program__fd(skel->progs.egress_alt), in test_cgroup_link()
|
D | trace_ext.c | 38 prog = skel_pkt->progs.test_pkt_md_access; in test_trace_ext() 47 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext() 62 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext() 71 prog = skel_trace->progs.fentry; in test_trace_ext() 75 prog = skel_trace->progs.fexit; in test_trace_ext()
|
D | xdp_link.c | 23 prog_fd1 = bpf_program__fd(skel1->progs.xdp_handler); in test_xdp_link() 28 prog_fd2 = bpf_program__fd(skel2->progs.xdp_handler); in test_xdp_link() 53 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in test_xdp_link() 69 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in test_xdp_link() 97 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in test_xdp_link() 107 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in test_xdp_link() 118 err = bpf_link__update_program(link, skel1->progs.xdp_handler); in test_xdp_link()
|
D | bpf_iter.c | 75 do_dummy_read(skel->progs.dump_ipv6_route); in test_ipv6_route() 89 do_dummy_read(skel->progs.dump_netlink); in test_netlink() 103 do_dummy_read(skel->progs.dump_bpf_map); in test_bpf_map() 117 do_dummy_read(skel->progs.dump_task); in test_task() 131 do_dummy_read(skel->progs.dump_task_stack); in test_task_stack() 158 do_dummy_read(skel->progs.dump_task_file); in test_task_file() 177 struct bpf_program *prog = skel->progs.dump_task_struct; in do_btf_read() 257 do_dummy_read(skel->progs.dump_tcp4); in test_tcp4() 271 do_dummy_read(skel->progs.dump_tcp6); in test_tcp6() 285 do_dummy_read(skel->progs.dump_udp4); in test_udp4() [all …]
|
D | get_stackid_cannot_attach.c | 30 bpf_program__set_perf_event(skel->progs.oncpu); in test_get_stackid_cannot_attach() 49 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 66 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 83 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach()
|
D | attach_probe.c | 47 kprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kprobe, in test_attach_probe() 55 kretprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kretprobe, in test_attach_probe() 63 uprobe_link = bpf_program__attach_uprobe(skel->progs.handle_uprobe, in test_attach_probe() 73 uretprobe_link = bpf_program__attach_uprobe(skel->progs.handle_uretprobe, in test_attach_probe()
|
D | metadata.c | 75 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused() 92 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused() 109 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_used() 126 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_used()
|
D | test_profiler.c | 44 if (sanity_run(profiler1_skel->progs.raw_tracepoint__sched_process_exec)) in test_test_profiler() 55 if (sanity_run(profiler2_skel->progs.raw_tracepoint__sched_process_exec)) in test_test_profiler() 66 if (sanity_run(profiler3_skel->progs.raw_tracepoint__sched_process_exec)) in test_test_profiler()
|
D | xdp_cpumap_attach.c | 30 prog_fd = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_cpumap_helpers() 35 prog_fd = bpf_program__fd(skel->progs.xdp_dummy_cm); in test_xdp_with_cpumap_helpers() 57 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_cpumap_helpers()
|
D | xdp_devmap_attach.c | 32 dm_fd = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_devmap_helpers() 37 dm_fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_helpers() 59 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers()
|
D | xdp_bpf2bpf.c | 59 pkt_fd = bpf_program__fd(pkt_skel->progs._xdp_tx_iptunnel); in test_xdp_bpf2bpf() 72 prog = ftrace_skel->progs.trace_on_entry; in test_xdp_bpf2bpf() 76 prog = ftrace_skel->progs.trace_on_exit; in test_xdp_bpf2bpf()
|
D | flow_dissector_reattach.c | 607 int i, progs[2] = { -1, -1 }; in run_tests() local 610 for (i = 0; i < ARRAY_SIZE(progs); i++) { in run_tests() 611 progs[i] = load_prog(BPF_PROG_TYPE_FLOW_DISSECTOR); in run_tests() 612 if (progs[i] < 0) in run_tests() 622 tests[i].test_func(netns, progs[0], progs[1]); in run_tests() 625 for (i = 0; i < ARRAY_SIZE(progs); i++) { in run_tests() 626 if (progs[i] != -1) in run_tests() 627 CHECK_FAIL(close(progs[i])); in run_tests()
|
/kernel/linux/linux-5.10/kernel/bpf/preload/iterators/ |
D | iterators.skel.h | 19 } progs; member 130 s->prog_skel_sz = sizeof(*s->progs); in iterators_bpf__create_skeleton() 131 s->progs = (struct bpf_prog_skeleton *)calloc(s->prog_cnt, s->prog_skel_sz); in iterators_bpf__create_skeleton() 132 if (!s->progs) in iterators_bpf__create_skeleton() 135 s->progs[0].name = "dump_bpf_map"; in iterators_bpf__create_skeleton() 136 s->progs[0].prog = &obj->progs.dump_bpf_map; in iterators_bpf__create_skeleton() 137 s->progs[0].link = &obj->links.dump_bpf_map; in iterators_bpf__create_skeleton() 139 s->progs[1].name = "dump_bpf_prog"; in iterators_bpf__create_skeleton() 140 s->progs[1].prog = &obj->progs.dump_bpf_prog; in iterators_bpf__create_skeleton() 141 s->progs[1].link = &obj->links.dump_bpf_prog; in iterators_bpf__create_skeleton()
|
/kernel/linux/linux-5.10/drivers/media/rc/ |
D | bpf-lirc.c | 157 old_array = lirc_rcu_dereference(raw->progs); in lirc_bpf_attach() 167 rcu_assign_pointer(raw->progs, new_array); in lirc_bpf_attach() 195 old_array = lirc_rcu_dereference(raw->progs); in lirc_bpf_detach() 205 rcu_assign_pointer(raw->progs, new_array); in lirc_bpf_detach() 219 if (raw->progs) in lirc_bpf_run() 220 BPF_PROG_RUN_ARRAY(raw->progs, &raw->bpf_sample, BPF_PROG_RUN); in lirc_bpf_run() 234 array = lirc_rcu_dereference(rcdev->raw->progs); in lirc_bpf_free() 294 struct bpf_prog_array *progs; in lirc_prog_query() local 315 progs = lirc_rcu_dereference(rcdev->raw->progs); in lirc_prog_query() 316 cnt = progs ? bpf_prog_array_length(progs) : 0; in lirc_prog_query() [all …]
|
/kernel/linux/linux-5.10/kernel/bpf/ |
D | cgroup.c | 120 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_release() 121 struct list_head *progs = &cgrp->bpf.progs[type]; in cgroup_bpf_release() local 124 list_for_each_entry_safe(pl, pltmp, progs, node) { in cgroup_bpf_release() 212 cnt = prog_list_length(&p->bpf.progs[type]); in hierarchy_allows_attach() 232 struct bpf_prog_array *progs; in compute_effective_progs() local 240 cnt += prog_list_length(&p->bpf.progs[type]); in compute_effective_progs() 244 progs = bpf_prog_array_alloc(cnt, GFP_KERNEL); in compute_effective_progs() 245 if (!progs) in compute_effective_progs() 255 list_for_each_entry(pl, &p->bpf.progs[type], node) { in compute_effective_progs() 259 item = &progs->items[cnt]; in compute_effective_progs() [all …]
|
D | dispatcher.c | 30 if (prog == d->progs[i].prog) in bpf_dispatcher_find_prog() 31 return &d->progs[i]; in bpf_dispatcher_find_prog() 99 if (d->progs[i].prog) in bpf_dispatcher_prepare() 100 *ipsp++ = (s64)(uintptr_t)d->progs[i].prog->bpf_func; in bpf_dispatcher_prepare()
|
D | bpf_struct_ops.c | 38 struct bpf_prog **progs; member 281 if (st_map->progs[i]) { in bpf_struct_ops_map_put_progs() 282 bpf_prog_put(st_map->progs[i]); in bpf_struct_ops_map_put_progs() 283 st_map->progs[i] = NULL; in bpf_struct_ops_map_put_progs() 423 st_map->progs[i] = prog; in bpf_struct_ops_map_update_elem() 432 tprogs[BPF_TRAMP_FENTRY].progs[0] = prog; in bpf_struct_ops_map_update_elem() 535 if (st_map->progs) in bpf_struct_ops_map_free() 537 bpf_map_area_free(st_map->progs); in bpf_struct_ops_map_free() 597 st_map->progs = in bpf_struct_ops_map_alloc() 601 if (!st_map->uvalue || !st_map->progs || !st_map->image) { in bpf_struct_ops_map_alloc()
|
D | net_namespace.c | 331 attached = net->bpf.progs[type]; in netns_bpf_prog_attach() 352 net->bpf.progs[type] = prog; in netns_bpf_prog_attach() 373 attached = net->bpf.progs[type]; in __netns_bpf_prog_detach() 377 net->bpf.progs[type] = NULL; in __netns_bpf_prog_detach() 436 if (net->bpf.progs[type]) { in netns_bpf_link_attach() 550 if (net->bpf.progs[type]) in netns_bpf_pernet_pre_exit() 551 bpf_prog_put(net->bpf.progs[type]); in netns_bpf_pernet_pre_exit()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/benchs/ |
D | bench_trigger.c | 72 attach_bpf(ctx.skel->progs.bench_trigger_tp); in trigger_tp_setup() 78 attach_bpf(ctx.skel->progs.bench_trigger_raw_tp); in trigger_rawtp_setup() 84 attach_bpf(ctx.skel->progs.bench_trigger_kprobe); in trigger_kprobe_setup() 90 attach_bpf(ctx.skel->progs.bench_trigger_fentry); in trigger_fentry_setup() 96 attach_bpf(ctx.skel->progs.bench_trigger_fentry_sleep); in trigger_fentry_sleep_setup() 102 attach_bpf(ctx.skel->progs.bench_trigger_fmodret); in trigger_fmodret_setup()
|
D | bench_rename.c | 82 attach_bpf(ctx.skel->progs.prog1); in setup_kprobe() 88 attach_bpf(ctx.skel->progs.prog2); in setup_kretprobe() 94 attach_bpf(ctx.skel->progs.prog3); in setup_rawtp() 100 attach_bpf(ctx.skel->progs.prog4); in setup_fentry() 106 attach_bpf(ctx.skel->progs.prog5); in setup_fexit()
|
/kernel/linux/linux-5.10/net/core/ |
D | sock_map.c | 20 struct sk_psock_progs progs; member 160 if (psock->parser.enabled && stab->progs.skb_parser) in sock_map_del_link() 162 if (psock->parser.enabled && stab->progs.skb_verdict) in sock_map_del_link() 233 static int sock_map_link(struct bpf_map *map, struct sk_psock_progs *progs, in sock_map_link() argument 240 skb_verdict = READ_ONCE(progs->skb_verdict); in sock_map_link() 247 skb_parser = READ_ONCE(progs->skb_parser); in sock_map_link() 256 msg_parser = READ_ONCE(progs->msg_parser); in sock_map_link() 272 if ((msg_parser && READ_ONCE(psock->progs.msg_parser)) || in sock_map_link() 273 (skb_parser && READ_ONCE(psock->progs.skb_parser)) || in sock_map_link() 274 (skb_verdict && READ_ONCE(psock->progs.skb_verdict))) { in sock_map_link() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
D | test_xdp_veth.sh | 101 xdp_redirect_map.o $BPF_DIR/progs type xdp \ 106 ip link set dev veth1 xdp pinned $BPF_DIR/progs/redirect_map_0 107 ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1 108 ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2
|
D | test_offload.py | 173 _, progs = bpftool("prog show", JSON=True, ns=ns, fail=True) 176 if p in progs: 177 progs.remove(p) 179 if len(progs) != expected: 181 (len(progs), expected)) 182 return progs 404 _, progs = cmd('ls %s' % (path)) 405 return len(progs.split()) 408 progs = DebugfsDir(os.path.join(self.dfs_dir, "bpf_bound_progs")) 410 if len(progs) != expected: [all …]
|