/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 | bpf_cookie.c | 20 link1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest() 27 link2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest() 35 retlink1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest() 42 retlink2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest() 74 link1 = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, 0 /* self pid */, in uprobe_subtest() 81 link2 = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, -1 /* any pid */, in uprobe_subtest() 89 retlink1 = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, -1 /* any pid */, in uprobe_subtest() 96 retlink2 = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, 0 /* self pid */, in uprobe_subtest() 121 link1 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp1, in tp_subtest() 128 link2 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp2, in tp_subtest() [all …]
|
D | check_mtu.c | 53 prog = skel->progs.xdp_use_helper_basic; in test_check_mtu_xdp_attach() 128 test_check_mtu_run_xdp(skel, skel->progs.xdp_use_helper, mtu); in test_check_mtu_xdp() 129 test_check_mtu_run_xdp(skel, skel->progs.xdp_exceed_mtu, mtu); in test_check_mtu_xdp() 130 test_check_mtu_run_xdp(skel, skel->progs.xdp_minus_delta, mtu); in test_check_mtu_xdp() 131 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len, mtu); in test_check_mtu_xdp() 132 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len_exceed, mtu); in test_check_mtu_xdp() 188 test_check_mtu_run_tc(skel, skel->progs.tc_use_helper, mtu); in test_check_mtu_tc() 189 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu, mtu); in test_check_mtu_tc() 190 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu_da, mtu); in test_check_mtu_tc() 191 test_check_mtu_run_tc(skel, skel->progs.tc_minus_delta, mtu); in test_check_mtu_tc() [all …]
|
D | get_func_ip_test.c | 19 bpf_program__set_autoload(skel->progs.test6, false); in test_get_func_ip_test() 20 bpf_program__set_autoload(skel->progs.test7, false); in test_get_func_ip_test() 31 prog_fd = bpf_program__fd(skel->progs.test1); in test_get_func_ip_test() 37 prog_fd = bpf_program__fd(skel->progs.test5); in test_get_func_ip_test()
|
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 | cg_storage_multi.c | 107 parent_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 130 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() 181 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 185 parent_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 219 child_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 223 child_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 227 child_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 290 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_shared() 294 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_shared() [all …]
|
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 | 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() 121 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 146 tmp_link = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 164 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link() 181 err = bpf_link__update_program(links[i], skel->progs.egress_alt); in test_cgroup_link() 189 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress_alt); in test_cgroup_link() 192 bpf_program__fd(skel->progs.egress_alt), in test_cgroup_link() 199 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress); in test_cgroup_link() 202 bpf_program__fd(skel->progs.egress_alt), in test_cgroup_link()
|
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() 65 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 82 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach()
|
D | attach_probe.c | 34 kprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kprobe, in test_attach_probe() 41 kretprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kretprobe, in test_attach_probe() 52 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, in test_attach_probe() 66 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, in test_attach_probe()
|
D | kfunc_call.c | 17 prog_fd = skel->progs.kfunc_call_test1.prog_fd; in test_main() 23 prog_fd = skel->progs.kfunc_call_test2.prog_fd; in test_main() 41 prog_fd = bpf_program__fd(skel->progs.kfunc_call_test1); in test_subprog()
|
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 | 25 prog_fd = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_cpumap_attach() 33 prog_fd = bpf_program__fd(skel->progs.xdp_dummy_cm); in test_xdp_cpumap_attach() 53 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_cpumap_attach()
|
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 | bpf_iter.c | 94 do_dummy_read(skel->progs.dump_ipv6_route); in test_ipv6_route() 108 do_dummy_read(skel->progs.dump_netlink); in test_netlink() 122 do_dummy_read(skel->progs.dump_bpf_map); in test_bpf_map() 136 do_dummy_read(skel->progs.dump_task); in test_task() 150 do_dummy_read(skel->progs.dump_task_stack); in test_task_stack() 151 do_dummy_read(skel->progs.get_task_user_stacks); in test_task_stack() 180 do_dummy_read(skel->progs.dump_task_file); in test_task_file() 199 struct bpf_program *prog = skel->progs.dump_task_struct; in do_btf_read() 272 do_dummy_read(skel->progs.dump_tcp4); in test_tcp4() 286 do_dummy_read(skel->progs.dump_tcp6); in test_tcp6() [all …]
|
D | socket_cookie.c | 34 skel->progs.set_cookie, cgroup_fd); in test_socket_cookie() 39 skel->progs.update_cookie_sockops, cgroup_fd); in test_socket_cookie() 44 skel->progs.update_cookie_tracing); in test_socket_cookie()
|
D | xdp_devmap_attach.c | 27 dm_fd = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_devmap_helpers() 35 dm_fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_helpers() 55 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers()
|
D | xdp_bonding.c | 169 if (xdp_attach(skeletons, skeletons->xdp_dummy->progs.xdp_dummy_prog, "veth1_2")) in bonding_setup() 183 if (xdp_attach(skeletons, skeletons->xdp_dummy->progs.xdp_dummy_prog, "bond1")) in bonding_setup() 190 if (xdp_attach(skeletons, skeletons->xdp_tx->progs.xdp_tx, "bond2")) in bonding_setup() 362 skeletons->xdp_redirect_multi_kern->progs.xdp_redirect_map_multi_prog, in test_xdp_bonding_redirect_multi() 402 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, veth); in test_xdp_bonding_attach() 414 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, veth); in test_xdp_bonding_attach() 419 link2 = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach() 427 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach() 432 link2 = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, veth); in test_xdp_bonding_attach() 449 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach() [all …]
|
D | atomics.c | 17 prog_fd = skel->progs.add.prog_fd; in test_add() 49 prog_fd = skel->progs.sub.prog_fd; in test_sub() 82 prog_fd = skel->progs.and.prog_fd; in test_and() 110 prog_fd = skel->progs.or.prog_fd; in test_or() 139 prog_fd = skel->progs.xor.prog_fd; in test_xor() 167 prog_fd = skel->progs.cmpxchg.prog_fd; in test_cmpxchg() 196 prog_fd = skel->progs.xchg.prog_fd; in test_xchg()
|
D | module_attach.c | 66 err = bpf_program__set_attach_target(skel->progs.handle_fentry_manual, in test_module_attach() 96 link = bpf_program__attach(skel->progs.handle_fentry); in test_module_attach() 103 link = bpf_program__attach(skel->progs.handle_fexit); in test_module_attach()
|
D | tc_redirect.c | 448 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 452 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 456 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 496 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_neigh() 500 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_neigh() 504 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_neigh() 543 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_peer() 547 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_peer() 551 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_peer() 693 err = bpf_program__pin(skel->progs.tc_src_l3, SRC_PROG_PIN_FILE); in test_tc_redirect_peer_l3() [all …]
|
D | udp_limit.c | 24 skel->links.sock = bpf_program__attach_cgroup(skel->progs.sock, cgroup_fd); in test_udp_limit() 27 skel->links.sock_release = bpf_program__attach_cgroup(skel->progs.sock_release, cgroup_fd); in test_udp_limit()
|
/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()
|
/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
|