/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | sk_lookup.c | 677 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 685 .lookup_prog = skel->progs.redir_ip4, in test_redirect_lookup() 713 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 721 .lookup_prog = skel->progs.redir_ip6, in test_redirect_lookup() 729 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 757 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 765 .lookup_prog = skel->progs.redir_ip4, in test_redirect_lookup() 804 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 812 .lookup_prog = skel->progs.redir_ip6, in test_redirect_lookup() 820 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() [all …]
|
A 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() 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() 150 link3 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp3, in tp_subtest() 202 link = bpf_program__attach_perf_event_opts(skel->progs.handle_pe, pfd, &opts); in pe_subtest() [all …]
|
A 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() 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() 192 test_check_mtu_run_tc(skel, skel->progs.tc_input_len, mtu); in test_check_mtu_tc() [all …]
|
A D | cg_storage_multi.c | 103 parent_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 126 child_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 173 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 177 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 181 parent_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 215 child_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 219 child_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 223 child_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 320 child_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_shared() 324 child_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_shared() [all …]
|
A D | cgroup_link.c | 49 prog_fd = bpf_program__fd(skel->progs.egress); in serial_test_cgroup_link() 66 links[i] = bpf_program__attach_cgroup(skel->progs.egress, in serial_test_cgroup_link() 121 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in serial_test_cgroup_link() 146 tmp_link = bpf_program__attach_cgroup(skel->progs.egress, in serial_test_cgroup_link() 164 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in serial_test_cgroup_link() 181 err = bpf_link__update_program(links[i], skel->progs.egress_alt); in serial_test_cgroup_link() 189 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress_alt); in serial_test_cgroup_link() 192 bpf_program__fd(skel->progs.egress_alt), in serial_test_cgroup_link() 199 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress); in serial_test_cgroup_link() 202 bpf_program__fd(skel->progs.egress_alt), in serial_test_cgroup_link()
|
A 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() 178 do_dummy_read(skel->progs.dump_task_file); in test_task_file() 270 do_dummy_read(skel->progs.dump_tcp4); in test_tcp4() 284 do_dummy_read(skel->progs.dump_tcp6); in test_tcp6() 298 do_dummy_read(skel->progs.dump_udp4); in test_udp4() 312 do_dummy_read(skel->progs.dump_udp6); in test_udp6() 325 do_dummy_read(skel->progs.dump_unix); in test_unix() [all …]
|
A D | xdp_link.c | 23 prog_fd1 = bpf_program__fd(skel1->progs.xdp_handler); in serial_test_xdp_link() 28 prog_fd2 = bpf_program__fd(skel2->progs.xdp_handler); in serial_test_xdp_link() 53 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 69 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 97 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 107 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 118 err = bpf_link__update_program(link, skel1->progs.xdp_handler); in serial_test_xdp_link()
|
A 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()
|
A 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 …]
|
A 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()
|
A 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() 81 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach()
|
A 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()
|
A D | attach_probe.c | 53 kprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kprobe, in test_attach_probe() 60 kretprobe_link = bpf_program__attach_kprobe(skel->progs.handle_kretprobe, in test_attach_probe() 72 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, in test_attach_probe() 87 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, in test_attach_probe()
|
A D | tc_redirect.c | 453 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 457 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 461 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_neigh_fib() 501 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_neigh() 505 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_neigh() 509 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_neigh() 548 err = bpf_program__pin(skel->progs.tc_src, SRC_PROG_PIN_FILE); in test_tc_redirect_peer() 552 err = bpf_program__pin(skel->progs.tc_chk, CHK_PROG_PIN_FILE); in test_tc_redirect_peer() 556 err = bpf_program__pin(skel->progs.tc_dst, DST_PROG_PIN_FILE); in test_tc_redirect_peer() 698 err = bpf_program__pin(skel->progs.tc_src_l3, SRC_PROG_PIN_FILE); in test_tc_redirect_peer_l3() [all …]
|
A 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()
|
/linux/kernel/bpf/preload/iterators/ |
A 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()
|
/linux/drivers/media/rc/ |
A 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 …]
|
/linux/kernel/bpf/ |
A D | cgroup.c | 121 struct list_head *progs = &cgrp->bpf.progs[atype]; in cgroup_bpf_release() local 245 if (!progs) in compute_effective_progs() 267 *array = progs; in compute_effective_progs() 392 if (list_empty(progs)) in find_attach_entry() 444 struct list_head *progs; in __cgroup_bpf_attach() local 462 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_attach() 608 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_replace() 660 if (list_empty(progs)) in find_detach_entry() 709 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_detach() 732 if (list_empty(progs)) in __cgroup_bpf_detach() [all …]
|
A D | bpf_struct_ops.c | 39 struct bpf_prog **progs; member 285 if (st_map->progs[i]) { in bpf_struct_ops_map_put_progs() 286 bpf_prog_put(st_map->progs[i]); in bpf_struct_ops_map_put_progs() 287 st_map->progs[i] = NULL; in bpf_struct_ops_map_put_progs() 325 tprogs[BPF_TRAMP_FENTRY].progs[0] = prog; in bpf_struct_ops_prepare_trampoline() 441 st_map->progs[i] = prog; in bpf_struct_ops_map_update_elem() 548 if (st_map->progs) in bpf_struct_ops_map_free() 550 bpf_map_area_free(st_map->progs); in bpf_struct_ops_map_free() 599 st_map->progs = in bpf_struct_ops_map_alloc() 603 if (!st_map->uvalue || !st_map->progs || !st_map->image) { in bpf_struct_ops_map_alloc()
|
A 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()
|
/linux/tools/testing/selftests/bpf/benchs/ |
A 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()
|
A 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()
|
/linux/net/core/ |
A D | sock_map.c | 20 struct sk_psock_progs progs; member 243 msg_parser = READ_ONCE(progs->msg_parser); in sock_map_link() 252 skb_verdict = READ_ONCE(progs->skb_verdict); in sock_map_link() 826 struct sk_psock_progs progs; member 1420 if (!progs) in sock_map_prog_update() 1425 pprog = &progs->msg_parser; in sock_map_prog_update() 1429 pprog = &progs->stream_parser; in sock_map_prog_update() 1433 if (progs->skb_verdict) in sock_map_prog_update() 1435 pprog = &progs->stream_verdict; in sock_map_prog_update() 1438 if (progs->stream_verdict) in sock_map_prog_update() [all …]
|
/linux/tools/testing/selftests/bpf/ |
A D | test_offload.py | 176 if p in progs: 177 progs.remove(p) 179 if len(progs) != expected: 182 return progs 405 return len(progs.split()) 413 return progs 599 prog = progs[idx] 630 prog = progs[0] 769 base_progs = progs 934 prog = progs[0] [all …]
|
/linux/samples/bpf/ |
A D | test_cgrp2_sock2.c | 38 struct bpf_program *progs[2]; in main() local 61 progs[prog_cnt] = prog; in main() 76 link = bpf_program__attach_cgroup(progs[filter_id], cg_fd); in main()
|