Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/bpf/
A 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,
137 .attach_type = BPF_CGROUP_INET6_POST_BIND,
147 .attach_type = BPF_CGROUP_INET4_POST_BIND,
157 .attach_type = BPF_CGROUP_INET4_POST_BIND,
388 enum bpf_attach_type attach_type) in load_sock_prog() argument
395 opts.expected_attach_type = attach_type; in load_sock_prog()
[all …]
A 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/tools/testing/selftests/bpf/prog_tests/
A 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 …]
A 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()
A 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()
A 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()
A Dbpf_verif_scale.c49 enum bpf_prog_type attach_type, in scale_test() argument
60 err = check_load(file, attach_type); in scale_test()
A 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()
/linux/tools/bpf/bpftool/
A Dnet.c656 switch (attach_type) { in get_tcx_type()
668 int type = get_tcx_type(attach_type); in do_attach_tcx()
675 int type = get_tcx_type(attach_type); in do_detach_tcx()
682 enum net_attach_type attach_type; in do_attach() local
690 attach_type = parse_attach_type(*argv); in do_attach()
691 if (attach_type == net_attach_type_size) { in do_attach()
717 switch (attach_type) { in do_attach()
749 enum net_attach_type attach_type; in do_detach() local
756 attach_type = parse_attach_type(*argv); in do_detach()
757 if (attach_type == net_attach_type_size) { in do_detach()
[all …]
A 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()
606 enum bpf_attach_type attach_type; in do_detach() local
621 attach_type = parse_attach_type(argv[1]); in do_detach()
622 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_detach()
[all …]
A Dlink.c146 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()
604 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
612 printf("attach_type %u ", attach_type); in show_link_attach_type_plain()
892 show_link_attach_type_plain(info->tracing.attach_type); in show_link_close_plain()
900 show_link_attach_type_plain(info->cgroup.attach_type); in show_link_close_plain()
907 show_link_attach_type_plain(info->netns.attach_type); in show_link_close_plain()
915 show_link_attach_type_plain(info->tcx.attach_type); in show_link_close_plain()
920 show_link_attach_type_plain(info->netkit.attach_type); in show_link_close_plain()
[all …]
/linux/include/linux/
A 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/kernel/bpf/
A 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()
583 storage->key.attach_type = type; in bpf_cgroup_storage_link()
A Dtcx.c12 bool created, ingress = attr->attach_type == BPF_TCX_INGRESS; in tcx_prog_attach()
61 bool ingress = attr->attach_type == BPF_TCX_INGRESS; in tcx_prog_detach()
124 bool ingress = attr->query.attach_type == BPF_TCX_INGRESS; in tcx_prog_query()
279 info->tcx.attach_type = tcx->location; in tcx_link_fill_info()
305 tcx->location = attr->link_create.attach_type; in tcx_link_init()
A 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()
A Dsyscall.c2402 if (!attach_type) in bpf_prog_get_ok()
2405 if (prog->type != *attach_type) in bpf_prog_get_ok()
3251 tr_link->attach_type, in bpf_tracing_link_show_fdinfo()
3262 info->tracing.attach_type = tr_link->attach_type; in bpf_tracing_link_fill_link_info()
3889 switch (attach_type) { in attach_type_to_prog_type()
3987 if (attach_type != BPF_NETFILTER) in bpf_prog_attach_check_attach_type()
3992 if (attach_type != BPF_PERF_EVENT) in bpf_prog_attach_check_attach_type()
4005 if (attach_type != BPF_PERF_EVENT && in bpf_prog_attach_check_attach_type()
4015 attach_type != BPF_NETKIT_PEER) in bpf_prog_attach_check_attach_type()
4190 switch (attr->query.attach_type) { in bpf_prog_query()
[all …]
A Dtoken.c249 enum bpf_attach_type attach_type) in bpf_token_allow_prog_type() argument
251 if (!token || prog_type >= __MAX_BPF_PROG_TYPE || attach_type >= __MAX_BPF_ATTACH_TYPE) in bpf_token_allow_prog_type()
255 (token->allowed_attachs & BIT_ULL(attach_type)); in bpf_token_allow_prog_type()
A Dcgroup.c161 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
162 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
203 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
204 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
234 key.attach_type = type; in bpf_cgroup_storages_alloc()
268 enum bpf_attach_type attach_type) in bpf_cgroup_storages_link() argument
1043 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query()
1168 attr->attach_type, attr->attach_flags); in cgroup_bpf_prog_attach()
1190 ret = cgroup_bpf_detach(cgrp, prog, attr->attach_type); in cgroup_bpf_prog_detach()
1278 info->cgroup.attach_type = cg_link->type; in bpf_cgroup_link_fill_link_info()
[all …]
/linux/net/core/
A Dsock_map.c81 ret = sock_map_prog_update(map, prog, NULL, NULL, attr->attach_type); in sock_map_get_from_fd()
110 ret = sock_map_prog_update(map, NULL, prog, NULL, attr->attach_type); in sock_map_prog_detach()
1570 ret = sock_map_prog_link_lookup(map, &pprog, NULL, attr->query.attach_type); in sock_map_bpf_prog_query()
1706 enum bpf_attach_type attach_type; member
1718 sockmap_link->attach_type)); in sock_map_link_release()
1769 sockmap_link->attach_type); in sock_map_link_update_prog()
1814 info->sockmap.attach_type = sockmap_link->attach_type; in sock_map_link_fill_info()
1825 seq_printf(seq, "attach_type:\t%u\n", sockmap_link->attach_type); in sock_map_link_show_fdinfo()
1841 enum bpf_attach_type attach_type; in sock_map_link_create() local
1862 attach_type = attr->link_create.attach_type; in sock_map_link_create()
[all …]
/linux/tools/lib/bpf/
A 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()
A 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()
/linux/tools/include/uapi/linux/
A Dbpf.h110 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1596 __u32 attach_type; member
1653 __u32 attach_type; member
1721 __u32 attach_type; /* attach type */ member
6632 __u32 attach_type; member
6638 __u32 attach_type; member
6666 __u32 attach_type; member
6731 __u32 attach_type; member
6735 __u32 attach_type; member
6739 __u32 attach_type; member
/linux/include/uapi/linux/
A Dbpf.h110 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1596 __u32 attach_type; member
1653 __u32 attach_type; member
1721 __u32 attach_type; /* attach type */ member
6632 __u32 attach_type; member
6638 __u32 attach_type; member
6666 __u32 attach_type; member
6731 __u32 attach_type; member
6735 __u32 attach_type; member
6739 __u32 attach_type; member
/linux/tools/bpf/bpftool/Documentation/
A Dbpftool-link.rst81 cgroup_id 614 attach_type egress
92 "attach_type": "egress",
/linux/drivers/net/
A Dnetkit.c529 attr->attach_type); in netkit_prog_attach()
569 attr->attach_type); in netkit_prog_detach()
601 attr->query.attach_type); in netkit_prog_query()
744 info->netkit.attach_type = nkl->location; in netkit_link_fill_info()
771 nkl->location = attr->link_create.attach_type; in netkit_link_init()
786 attr->link_create.attach_type); in netkit_link_attach()

Completed in 98 milliseconds

12