Home
last modified time | relevance | path

Searched refs:progs (Results 1 – 25 of 85) sorted by relevance

1234

/tools/testing/selftests/bpf/prog_tests/
Dsk_lookup.c533 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 …]
Dbpf_cookie.c20 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 …]
Dcheck_mtu.c53 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 …]
Dget_func_ip_test.c19 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()
Dtrace_ext.c38 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()
Dcg_storage_multi.c107 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 …]
Dxdp_link.c23 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()
Dcgroup_link.c49 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()
Dget_stackid_cannot_attach.c30 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()
Dattach_probe.c34 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()
Dkfunc_call.c17 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()
Dtest_profiler.c44 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()
Dxdp_cpumap_attach.c25 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()
Dmetadata.c75 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()
Dbpf_iter.c94 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 …]
Dsocket_cookie.c34 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()
Dxdp_devmap_attach.c27 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()
Dxdp_bonding.c169 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 …]
Datomics.c17 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()
Dmodule_attach.c66 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()
Dtc_redirect.c448 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 …]
Dudp_limit.c24 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/
Dbench_trigger.c72 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()
Dbench_rename.c82 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/
Dtest_xdp_veth.sh101 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

1234