Home
last modified time | relevance | path

Searched refs:bpf_prog_attach (Results 1 – 25 of 35) sorted by relevance

12

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_attach_override.c45 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 Dcgroup_attach_multi.c116 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 Dconnect_force_port.c78 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 Dsockmap_basic.c123 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 Dflow_dissector_reattach.c94 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 Dcgroup_link.c112 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 Dlsm_cgroup.c108 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 Dload_bytes_relative.c47 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS, in test_load_bytes_relative()
H A Dnetns_cookie.c37 err = bpf_prog_attach(verdict, map, BPF_SK_MSG_VERDICT, 0); in test_netns_cookie()
H A Dcgroup_attach_autodetach.c52 if (CHECK(bpf_prog_attach(allow_prog[i], cg, in serial_test_cgroup_attach_autodetach()
H A Dtcp_rtt.c120 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0); in run_test()
H A Dns_current_pid_tgid.c147 err = bpf_prog_attach(verdict, map, BPF_SK_MSG_VERDICT, 0); in test_current_pid_tgid_sk_msg()
H A Dmptcp.c182 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0); in run_test()
H A Dsockmap_helpers.h164 bpf_prog_attach((prog), (target), (type), (flags)); \
/linux/tools/testing/selftests/bpf/
H A Dtest_maps.c777 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 Dflow_dissector_load.c35 ret = bpf_prog_attach(prog_fd, 0 /* Ignore */, BPF_FLOW_DISSECTOR, 0); in load_and_attach_program()
H A Dtest_lirc_mode2_user.c101 ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0); in main()
H A Dtest_tcpnotify_user.c99 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
H A Dtest_sock.c410 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
/linux/samples/bpf/
H A Dtest_cgrp2_attach.c113 ret = bpf_prog_attach(prog_fd, cg_fd, type, 0); in attach_filter()
H A Dtest_cgrp2_sock.c276 ret = bpf_prog_attach(prog_fd, cg_fd, in main()
/linux/tools/lib/bpf/
H A Dlibbpf.map35 bpf_prog_attach;
H A Dbpf.h330 LIBBPF_API int bpf_prog_attach(int prog_fd, int attachable_fd,
/linux/tools/bpf/bpftool/
H A Dcgroup.c586 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
/linux/Documentation/bpf/libbpf/
H A Dlibbpf_naming_convention.rst23 command of sys_bpf, ``bpf_prog_attach`` wraps ``BPF_PROG_ATTACH``, etc.

12