Home
last modified time | relevance | path

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

/tools/testing/selftests/bpf/
Dtest_sock.c30 enum bpf_attach_type attach_type; member
60 .attach_type = BPF_CGROUP_INET4_POST_BIND,
73 .attach_type = BPF_CGROUP_INET4_POST_BIND,
86 .attach_type = BPF_CGROUP_INET6_POST_BIND,
99 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
109 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
123 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
137 .attach_type = BPF_CGROUP_INET6_POST_BIND,
147 .attach_type = BPF_CGROUP_INET4_POST_BIND,
157 .attach_type = BPF_CGROUP_INET4_POST_BIND,
[all …]
Dtest_sysctl.c32 enum bpf_attach_type attach_type; member
53 .attach_type = 0,
64 .attach_type = BPF_CGROUP_SYSCTL,
75 .attach_type = BPF_CGROUP_SYSCTL,
96 .attach_type = BPF_CGROUP_SYSCTL,
117 .attach_type = BPF_CGROUP_SYSCTL,
140 .attach_type = BPF_CGROUP_SYSCTL,
156 .attach_type = BPF_CGROUP_SYSCTL,
177 .attach_type = BPF_CGROUP_SYSCTL,
204 .attach_type = BPF_CGROUP_SYSCTL,
[all …]
Dveristat.c860 enum bpf_attach_type *attach_type) in guess_prog_type_by_ctx_name() argument
874 enum bpf_attach_type attach_type; in guess_prog_type_by_ctx_name() member
905 *attach_type = ctx_map[i].attach_type; in guess_prog_type_by_ctx_name()
943 enum bpf_attach_type attach_type; in fixup_obj() local
971 if (guess_prog_type_by_ctx_name(ctx_name, &prog_type, &attach_type) == 0) { in fixup_obj()
973 bpf_program__set_expected_attach_type(prog, attach_type); in fixup_obj()
/tools/testing/selftests/bpf/prog_tests/
Dsockopt.c28 enum bpf_attach_type attach_type; member
56 .attach_type = BPF_CGROUP_GETSOCKOPT,
68 .attach_type = BPF_CGROUP_GETSOCKOPT,
79 .attach_type = BPF_CGROUP_GETSOCKOPT,
100 .attach_type = BPF_CGROUP_GETSOCKOPT,
124 .attach_type = BPF_CGROUP_GETSOCKOPT,
150 .attach_type = BPF_CGROUP_GETSOCKOPT,
166 .attach_type = BPF_CGROUP_GETSOCKOPT,
193 .attach_type = BPF_CGROUP_GETSOCKOPT,
211 .attach_type = BPF_CGROUP_GETSOCKOPT,
[all …]
Dsection_names.c16 enum bpf_attach_type attach_type; member
234 enum bpf_attach_type attach_type; in test_attach_type_by_name() local
237 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name()
245 CHECK(attach_type != test->expected_attach.attach_type, in test_attach_type_by_name()
247 attach_type, test->sec_name); in test_attach_type_by_name()
Dcg_storage_multi.c96 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_egress_only()
196 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
201 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
207 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
210 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
238 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
243 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
249 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
254 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
Dlibbpf_str.c40 enum bpf_attach_type attach_type = (enum bpf_attach_type)e->val; in test_libbpf_bpf_attach_type_str() local
45 if (attach_type == __MAX_BPF_ATTACH_TYPE) in test_libbpf_bpf_attach_type_str()
49 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in test_libbpf_bpf_attach_type_str()
Dbpf_verif_scale.c49 enum bpf_prog_type attach_type, in scale_test() argument
60 err = check_load(file, attach_type); in scale_test()
Dsockmap_basic.c408 static void test_sockmap_progs_query(enum bpf_attach_type attach_type) in test_sockmap_progs_query() argument
422 if (attach_type == BPF_SK_MSG_VERDICT) in test_sockmap_progs_query()
427 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query()
433 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); in test_sockmap_progs_query()
438 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query()
446 bpf_prog_detach2(verdict_fd, map_fd, attach_type); in test_sockmap_progs_query()
Dsock_addr.c67 enum bpf_attach_type attach_type,
358 enum bpf_attach_type attach_type; member
382 enum bpf_attach_type attach_type, \
394 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, \
403 bpf_prog_detach(cgroup_fd, attach_type); \
414 enum bpf_attach_type attach_type, \
421 attach_type), \
2616 skel = test->loadfn(cgroup_fd, test->attach_type, in test_sock_addr()
Dflow_dissector_reattach.c512 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR); in test_link_get_info()
536 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR); in test_link_get_info()
561 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR); in test_link_get_info()
Dtc_opts.c2558 attr.query.attach_type = target; in test_tc_opts_query_target()
2569 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target()
2587 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target()
2601 attr.query.attach_type = target; in test_tc_opts_query_target()
2616 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target()
2630 attr.query.attach_type = target; in test_tc_opts_query_target()
2645 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target()
2659 attr.query.attach_type = target; in test_tc_opts_query_target()
2673 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target()
2687 attr.query.attach_type = target; in test_tc_opts_query_target()
[all …]
Dfexit_bpf2bpf.c142 ASSERT_EQ(link_info.tracing.attach_type, in test_fexit_bpf2bpf_common()
/tools/bpf/bpftool/
Dnet.c640 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument
647 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp()
649 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp()
651 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp()
657 static int get_tcx_type(enum net_attach_type attach_type) in get_tcx_type() argument
659 switch (attach_type) { in get_tcx_type()
669 static int do_attach_tcx(int progfd, enum net_attach_type attach_type, int ifindex) in do_attach_tcx() argument
671 int type = get_tcx_type(attach_type); in do_attach_tcx()
676 static int do_detach_tcx(int targetfd, enum net_attach_type attach_type) in do_detach_tcx() argument
678 int type = get_tcx_type(attach_type); in do_detach_tcx()
[all …]
Dcgroup.c130 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, in show_bpf_prog() argument
150 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_bpf_prog()
172 jsonw_uint_field(json_wtr, "attach_type", attach_type); in show_bpf_prog()
186 printf("type %-10u", attach_type); in show_bpf_prog()
546 enum bpf_attach_type attach_type; in do_attach() local
563 attach_type = parse_attach_type(argv[1]); in do_attach()
564 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach()
586 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
606 enum bpf_attach_type attach_type; in do_detach() local
621 attach_type = parse_attach_type(argv[1]); in do_detach()
[all …]
Dlink.c142 static void show_link_attach_type_json(__u32 attach_type, json_writer_t *wtr) in show_link_attach_type_json() argument
146 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_link_attach_type_json()
150 jsonw_uint_field(wtr, "attach_type", attach_type); in show_link_attach_type_json()
500 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
508 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
516 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
523 show_link_attach_type_json(info->tcx.attach_type, json_wtr); in show_link_close_json()
527 show_link_attach_type_json(info->netkit.attach_type, json_wtr); in show_link_close_json()
531 show_link_attach_type_json(info->sockmap.attach_type, json_wtr); in show_link_close_json()
604 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
[all …]
Dprog.c1040 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument
1050 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args()
1051 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args()
1056 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args()
1074 enum bpf_attach_type attach_type; in do_attach() local
1079 &progfd, &attach_type, &mapfd); in do_attach()
1083 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach()
1096 enum bpf_attach_type attach_type; in do_detach() local
1101 &progfd, &attach_type, &mapfd); in do_detach()
1105 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
/tools/bpf/bpftool/Documentation/
Dbpftool-link.rst81 cgroup_id 614 attach_type egress
92 "attach_type": "egress",
/tools/lib/bpf/
Dskel_internal.h290 enum bpf_attach_type attach_type) in skel_link_create() argument
298 attr.link_create.attach_type = attach_type; in skel_link_create()
Dbpf.c661 attr.attach_type = type; in bpf_prog_attach_opts()
699 attr.attach_type = type; in bpf_prog_detach_opts()
725 enum bpf_attach_type attach_type, in bpf_link_create() argument
750 attr.link_create.attach_type = attach_type; in bpf_link_create()
758 switch (attach_type) { in bpf_link_create()
866 switch (attach_type) { in bpf_link_create()
942 attr.query.attach_type = type; in bpf_prog_query_opts()
Dbpf.h444 enum bpf_attach_type attach_type,
Dlibbpf.h317 enum bpf_attach_type *attach_type);
319 enum bpf_attach_type attach_type);
Dlibbpf_internal.h413 void btf_get_kernel_prefix_kind(enum bpf_attach_type attach_type,
Dlibbpf.c9659 static char *libbpf_get_type_names(bool attach_type) in libbpf_get_type_names() argument
9673 if (attach_type) { in libbpf_get_type_names()
9885 void btf_get_kernel_prefix_kind(enum bpf_attach_type attach_type, in btf_get_kernel_prefix_kind() argument
9888 switch (attach_type) { in btf_get_kernel_prefix_kind()
9926 enum bpf_attach_type attach_type) in find_attach_btf_id() argument
9931 btf_get_kernel_prefix_kind(attach_type, &prefix, &kind); in find_attach_btf_id()
9936 enum bpf_attach_type attach_type) in libbpf_find_vmlinux_btf_id() argument
9948 err = find_attach_btf_id(btf, name, attach_type); in libbpf_find_vmlinux_btf_id()
9993 enum bpf_attach_type attach_type, in find_kernel_btf_id() argument
10009 attach_type); in find_kernel_btf_id()
[all …]
/tools/include/uapi/linux/
Dbpf.h110 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1597 __u32 attach_type; member
1654 __u32 attach_type; member
1722 __u32 attach_type; /* attach type */ member
6635 __u32 attach_type; member
6641 __u32 attach_type; member
6669 __u32 attach_type; member
6734 __u32 attach_type; member
6738 __u32 attach_type; member
6742 __u32 attach_type; member