Home
last modified time | relevance | path

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

12

/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/
Dsockopt.c21 enum bpf_attach_type attach_type; member
48 .attach_type = BPF_CGROUP_GETSOCKOPT,
60 .attach_type = BPF_CGROUP_GETSOCKOPT,
71 .attach_type = BPF_CGROUP_GETSOCKOPT,
92 .attach_type = BPF_CGROUP_GETSOCKOPT,
116 .attach_type = BPF_CGROUP_GETSOCKOPT,
142 .attach_type = BPF_CGROUP_GETSOCKOPT,
158 .attach_type = BPF_CGROUP_GETSOCKOPT,
185 .attach_type = BPF_CGROUP_GETSOCKOPT,
203 .attach_type = BPF_CGROUP_GETSOCKOPT,
[all …]
Dsection_names.c16 enum bpf_attach_type attach_type; member
189 enum bpf_attach_type attach_type; in test_attach_type_by_name() local
192 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name()
200 CHECK(attach_type != test->expected_attach.attach_type, in test_attach_type_by_name()
202 attach_type, test->sec_name); in test_attach_type_by_name()
Dcg_storage_multi.c92 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_egress_only()
192 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
197 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
203 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
206 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
234 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
239 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
245 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
250 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
Dsockopt_multi.c7 enum bpf_attach_type attach_type; in prog_attach() local
12 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach()
25 attach_type, BPF_F_ALLOW_MULTI); in prog_attach()
36 enum bpf_attach_type attach_type; in prog_detach() local
41 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_detach()
50 attach_type); in prog_detach()
Dbpf_verif_scale.c50 enum bpf_prog_type attach_type; member
55 enum bpf_prog_type attach_type, in scale_test() argument
66 err = check_load(file, attach_type); in scale_test()
Dsockmap_basic.c310 static void test_sockmap_progs_query(enum bpf_attach_type attach_type) in test_sockmap_progs_query() argument
324 if (attach_type == BPF_SK_MSG_VERDICT) in test_sockmap_progs_query()
329 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query()
335 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); in test_sockmap_progs_query()
340 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query()
348 bpf_prog_detach2(verdict_fd, map_fd, attach_type); in test_sockmap_progs_query()
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()
Dsockopt_inherit.c138 enum bpf_attach_type attach_type; in prog_attach() local
143 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach()
156 attach_type, 0); in prog_attach()
/Linux-v6.1/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 …]
/Linux-v6.1/tools/bpf/bpftool/
Dlink.c69 static void show_link_attach_type_json(__u32 attach_type, json_writer_t *wtr) in show_link_attach_type_json() argument
73 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_link_attach_type_json()
77 jsonw_uint_field(wtr, "attach_type", attach_type); in show_link_attach_type_json()
182 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
188 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
196 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
234 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
238 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_link_attach_type_plain()
242 printf("attach_type %u ", attach_type); in show_link_attach_type_plain()
292 show_link_attach_type_plain(info->tracing.attach_type); in show_link_close_plain()
[all …]
Dcgroup.c96 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, in show_bpf_prog() argument
116 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_bpf_prog()
138 jsonw_uint_field(json_wtr, "attach_type", attach_type); in show_bpf_prog()
152 printf("type %-10u", attach_type); in show_bpf_prog()
512 enum bpf_attach_type attach_type; in do_attach() local
529 attach_type = parse_attach_type(argv[1]); in do_attach()
530 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach()
552 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
572 enum bpf_attach_type attach_type; in do_detach() local
587 attach_type = parse_attach_type(argv[1]); in do_detach()
[all …]
Dnet.c540 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument
547 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp()
549 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp()
551 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp()
559 enum net_attach_type attach_type; in do_attach() local
567 attach_type = parse_attach_type(*argv); in do_attach()
568 if (attach_type == net_attach_type_size) { in do_attach()
595 if (is_prefix("xdp", attach_type_strings[attach_type])) in do_attach()
596 err = do_attach_detach_xdp(progfd, attach_type, ifindex, in do_attach()
600 attach_type_strings[attach_type], strerror(-err)); in do_attach()
[all …]
Dprog.c1024 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument
1034 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args()
1035 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args()
1040 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args()
1058 enum bpf_attach_type attach_type; in do_attach() local
1063 &progfd, &attach_type, &mapfd); in do_attach()
1067 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach()
1080 enum bpf_attach_type attach_type; in do_detach() local
1085 &progfd, &attach_type, &mapfd); in do_detach()
1089 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
/Linux-v6.1/include/linux/
Dbpf-netns.h10 to_netns_bpf_attach_type(enum bpf_attach_type attach_type) in to_netns_bpf_attach_type() argument
12 switch (attach_type) { in to_netns_bpf_attach_type()
/Linux-v6.1/kernel/bpf/
Dlocal_storage.c50 else if (key1->attach_type < key2->attach_type) in bpf_cgroup_storage_key_cmp()
52 else if (key1->attach_type > key2->attach_type) in bpf_cgroup_storage_key_cmp()
392 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
393 size = sizeof_field(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
576 storage->key.attach_type = type; in bpf_cgroup_storage_link()
Dnet_namespace.c219 info->netns.attach_type = net_link->type; in bpf_netns_link_fill_info()
233 info.netns.attach_type); in bpf_netns_link_show_fdinfo()
281 type = to_netns_bpf_attach_type(attr->query.attach_type); in netns_bpf_prog_query()
308 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_attach()
392 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_detach()
489 type = attr->link_create.attach_type; in netns_bpf_link_create()
Dcgroup.c138 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
144 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
145 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
184 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
186 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
187 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
217 key.attach_type = type; in bpf_cgroup_storages_alloc()
251 enum bpf_attach_type attach_type) in bpf_cgroup_storages_link() argument
256 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link()
1025 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query()
[all …]
Dsyscall.c2236 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument
2239 if (!attach_type) in bpf_prog_get_ok()
2242 if (prog->type != *attach_type) in bpf_prog_get_ok()
2250 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument
2259 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) { in __bpf_prog_get()
2928 tr_link->attach_type); in bpf_tracing_link_show_fdinfo()
2937 info->tracing.attach_type = tr_link->attach_type; in bpf_tracing_link_fill_link_info()
3019 link->attach_type = prog->expected_attach_type; in bpf_tracing_prog_attach()
3371 enum bpf_attach_type attach_type) in bpf_prog_attach_check_attach_type() argument
3378 return attach_type == prog->expected_attach_type ? 0 : -EINVAL; in bpf_prog_attach_check_attach_type()
[all …]
/Linux-v6.1/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.c636 attr.attach_type = type; in bpf_prog_attach_opts()
652 attr.attach_type = type; in bpf_prog_detach()
667 attr.attach_type = type; in bpf_prog_detach2()
674 enum bpf_attach_type attach_type, in bpf_link_create() argument
699 attr.link_create.attach_type = attach_type; in bpf_link_create()
707 switch (attach_type) { in bpf_link_create()
762 switch (attach_type) { in bpf_link_create()
834 attr.query.attach_type = type; in bpf_prog_query_opts()
/Linux-v6.1/tools/bpf/bpftool/Documentation/
Dbpftool-link.rst86 cgroup_id 614 attach_type egress
97 "attach_type": "egress",
/Linux-v6.1/tools/include/uapi/linux/
Dbpf.h87 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1404 __u32 attach_type; member
1456 __u32 attach_type; member
1502 __u32 attach_type; /* attach type */ member
6245 __u32 attach_type; member
6251 __u32 attach_type; member
6279 __u32 attach_type; member
/Linux-v6.1/include/uapi/linux/
Dbpf.h87 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1404 __u32 attach_type; member
1456 __u32 attach_type; member
1502 __u32 attach_type; /* attach type */ member
6245 __u32 attach_type; member
6251 __u32 attach_type; member
6279 __u32 attach_type; member
/Linux-v6.1/Documentation/bpf/
Dmap_cgroup_storage.rst30 __u32 attach_type;
34 ``attach_type`` is the program's attach type.
84 .attach_type = type,

12