/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | cgroup_attach_override.c | 45 if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 63 if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 81 if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 95 if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 101 if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0), in serial_test_cgroup_attach_override() 116 if (CHECK(bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS, 0), in serial_test_cgroup_attach_override() 121 if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0), in serial_test_cgroup_attach_override() 126 if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 132 if (CHECK(!bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 138 if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS, 0), in serial_test_cgroup_attach_override()
|
H A D | cgroup_attach_multi.c | 116 if (CHECK(bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 121 if (CHECK(!bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 126 if (CHECK(bpf_prog_attach(allow_prog[1], cg1, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 131 if (CHECK(bpf_prog_attach(allow_prog[2], cg2, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 136 if (CHECK(bpf_prog_attach(allow_prog[3], cg3, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 141 if (CHECK(bpf_prog_attach(allow_prog[4], cg4, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_multi() 146 if (CHECK(bpf_prog_attach(allow_prog[5], cg5, BPF_CGROUP_INET_EGRESS, 0), in serial_test_cgroup_attach_multi()
|
H A D | connect_force_port.c | 78 err = bpf_prog_attach(bpf_program__fd(prog), cgroup_fd, v4 ? in run_test() 94 err = bpf_prog_attach(bpf_program__fd(prog), cgroup_fd, v4 ? in run_test() 110 err = bpf_prog_attach(bpf_program__fd(prog), cgroup_fd, v4 ? in run_test()
|
H A D | sockmap_basic.c | 123 err = bpf_prog_attach(verdict, map, BPF_SK_MSG_VERDICT, 0); in test_skmsg_helpers() 156 err = bpf_prog_attach(bpf_program__fd(prog), map, BPF_SK_MSG_VERDICT, 0); in test_skmsg_helpers_with_link() 346 err = bpf_prog_attach(verdict, map, first, 0); in test_sockmap_skb_verdict_attach() 350 err = bpf_prog_attach(verdict, map, second, 0); in test_sockmap_skb_verdict_attach() 378 err = bpf_prog_attach(bpf_program__fd(prog), map, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap_skb_verdict_attach_with_link() 433 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); in test_sockmap_progs_query() 468 err = bpf_prog_attach(verdict, map, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap_skb_verdict_shutdown() 530 err = bpf_prog_attach(verdict, map, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap_skb_verdict_fionread() 608 err = bpf_prog_attach(verdict, map, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap_skb_verdict_peek()
|
H A D | flow_dissector_reattach.c | 94 err = bpf_prog_attach(prog1, 0, BPF_FLOW_DISSECTOR, 0); in test_prog_attach_prog_attach() 102 err = bpf_prog_attach(prog2, 0, BPF_FLOW_DISSECTOR, 0); in test_prog_attach_prog_attach() 110 err = bpf_prog_attach(prog2, 0, BPF_FLOW_DISSECTOR, 0); in test_prog_attach_prog_attach() 152 err = bpf_prog_attach(prog1, 0, BPF_FLOW_DISSECTOR, 0); in test_prog_attach_link_create() 188 err = bpf_prog_attach(prog2, 0, BPF_FLOW_DISSECTOR, 0); in test_link_create_prog_attach() 224 err = bpf_prog_attach(prog1, 0, BPF_FLOW_DISSECTOR, 0); in test_prog_attach_detach_query()
|
H A D | cgroup_link.c | 112 err = bpf_prog_attach(prog_fd, cgs[last_cg].fd, in serial_test_cgroup_link() 136 err = bpf_prog_attach(prog_fd, cgs[last_cg].fd, in serial_test_cgroup_link() 169 err = bpf_prog_attach(prog_fd, cgs[last_cg].fd, in serial_test_cgroup_link()
|
H A D | lsm_cgroup.c | 108 err = bpf_prog_attach(alloc_prog_fd, cgroup_fd, BPF_LSM_CGROUP, 0); in test_lsm_cgroup_functional() 119 err = bpf_prog_attach(clone_prog_fd, cgroup_fd, BPF_LSM_CGROUP, 0); in test_lsm_cgroup_functional() 128 err = bpf_prog_attach(post_create_prog_fd, cgroup_fd, in test_lsm_cgroup_functional()
|
H A D | load_bytes_relative.c | 47 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS, in test_load_bytes_relative()
|
H A D | netns_cookie.c | 37 err = bpf_prog_attach(verdict, map, BPF_SK_MSG_VERDICT, 0); in test_netns_cookie()
|
H A D | cgroup_attach_autodetach.c | 52 if (CHECK(bpf_prog_attach(allow_prog[i], cg, in serial_test_cgroup_attach_autodetach()
|
H A D | tcp_rtt.c | 120 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0); in run_test()
|
H A D | ns_current_pid_tgid.c | 147 err = bpf_prog_attach(verdict, map, BPF_SK_MSG_VERDICT, 0); in test_current_pid_tgid_sk_msg()
|
H A D | mptcp.c | 182 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0); in run_test()
|
H A D | sockmap_helpers.h | 164 bpf_prog_attach((prog), (target), (type), (flags)); \
|
/linux/tools/testing/selftests/bpf/ |
H A D | test_maps.c | 777 err = bpf_prog_attach(-1, fd, BPF_SK_SKB_STREAM_PARSER, 0); in test_sockmap() 783 err = bpf_prog_attach(-1, fd, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap() 789 err = bpf_prog_attach(-1, fd, BPF_SK_MSG_VERDICT, 0); in test_sockmap() 795 err = bpf_prog_attach(-1, fd, __MAX_BPF_ATTACH_TYPE, 0); in test_sockmap() 895 err = bpf_prog_attach(parse_prog, map_fd_break, in test_sockmap() 902 err = bpf_prog_attach(parse_prog, map_fd_rx, in test_sockmap() 909 err = bpf_prog_attach(verdict_prog, map_fd_rx, in test_sockmap() 916 err = bpf_prog_attach(msg_prog, map_fd_msg, BPF_SK_MSG_VERDICT, 0); in test_sockmap() 922 err = bpf_prog_attach(verdict_prog, map_fd_rx, in test_sockmap() 1043 err = bpf_prog_attach(parse_prog, fd, in test_sockmap() [all …]
|
H A D | flow_dissector_load.c | 35 ret = bpf_prog_attach(prog_fd, 0 /* Ignore */, BPF_FLOW_DISSECTOR, 0); in load_and_attach_program()
|
H A D | test_lirc_mode2_user.c | 101 ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0); in main()
|
H A D | test_tcpnotify_user.c | 99 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
|
H A D | test_sock.c | 410 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
|
/linux/samples/bpf/ |
H A D | test_cgrp2_attach.c | 113 ret = bpf_prog_attach(prog_fd, cg_fd, type, 0); in attach_filter()
|
H A D | test_cgrp2_sock.c | 276 ret = bpf_prog_attach(prog_fd, cg_fd, in main()
|
/linux/tools/lib/bpf/ |
H A D | libbpf.map | 35 bpf_prog_attach;
|
H A D | bpf.h | 330 LIBBPF_API int bpf_prog_attach(int prog_fd, int attachable_fd,
|
/linux/tools/bpf/bpftool/ |
H A D | cgroup.c | 586 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
|
/linux/Documentation/bpf/libbpf/ |
H A D | libbpf_naming_convention.rst | 23 command of sys_bpf, ``bpf_prog_attach`` wraps ``BPF_PROG_ATTACH``, etc.
|