Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/bpf/prog_tests/
H 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 …]
H A Dsock_post_bind.c14 enum bpf_attach_type attach_type; member
40 .attach_type = BPF_CGROUP_INET6_POST_BIND,
50 .attach_type = BPF_CGROUP_INET4_POST_BIND,
60 .attach_type = BPF_CGROUP_INET4_POST_BIND,
70 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
80 .attach_type = BPF_CGROUP_INET4_POST_BIND,
93 .attach_type = BPF_CGROUP_INET6_POST_BIND,
122 .attach_type = BPF_CGROUP_INET6_POST_BIND,
152 .attach_type = BPF_CGROUP_INET4_POST_BIND,
182 .attach_type = BPF_CGROUP_INET4_POST_BIND,
[all …]
H A Dtest_sysctl.c18 enum bpf_attach_type attach_type; member
40 .attach_type = 0,
51 .attach_type = BPF_CGROUP_SYSCTL,
62 .attach_type = BPF_CGROUP_SYSCTL,
83 .attach_type = BPF_CGROUP_SYSCTL,
104 .attach_type = BPF_CGROUP_SYSCTL,
127 .attach_type = BPF_CGROUP_SYSCTL,
143 .attach_type = BPF_CGROUP_SYSCTL,
164 .attach_type = BPF_CGROUP_SYSCTL,
191 .attach_type = BPF_CGROUP_SYSCTL,
[all …]
H A Dsock_create.c17 enum bpf_attach_type attach_type; member
41 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
62 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
93 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
124 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
145 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
166 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
199 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
232 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
248 .attach_type = BPF_CGROUP_INET_SOCK_CREATE,
[all …]
H 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()
H 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()
H A Dsockmap_redir.c128 enum bpf_attach_type *attach_type, in get_redir_params() argument
139 *attach_type = sk_msg ? BPF_SK_MSG_VERDICT : BPF_SK_SKB_VERDICT; in get_redir_params()
419 enum bpf_attach_type attach_type; in test_map() local
446 get_redir_params(r, skel, &prog_fd, &attach_type, in test_map()
449 if (xbpf_prog_attach(prog_fd, maps.in, attach_type, 0)) in test_map()
454 if (xbpf_prog_detach2(prog_fd, maps.in, attach_type)) in test_map()
H 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()
H 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()
/linux/tools/bpf/bpftool/
H A Dnet.c643 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument
650 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp()
652 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp()
654 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp()
660 static int get_tcx_type(enum net_attach_type attach_type) in get_tcx_type() argument
662 switch (attach_type) { in get_tcx_type()
672 static int do_attach_tcx(int progfd, enum net_attach_type attach_type, int ifindex, bool prepend) in do_attach_tcx() argument
674 int type = get_tcx_type(attach_type); in do_attach_tcx()
685 static int do_detach_tcx(int targetfd, enum net_attach_type attach_type) in do_detach_tcx() argument
687 int type = get_tcx_type(attach_type); in do_detach_tcx()
[all …]
H A Dcgroup.c134 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, in show_bpf_prog() argument
154 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_bpf_prog()
176 jsonw_uint_field(json_wtr, "attach_type", attach_type); in show_bpf_prog()
190 printf("type %-10u", attach_type); in show_bpf_prog()
550 enum bpf_attach_type attach_type; in do_attach() local
567 attach_type = parse_attach_type(argv[1]); in do_attach()
568 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach()
590 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
610 enum bpf_attach_type attach_type; in do_detach() local
625 attach_type = parse_attach_type(argv[1]); in do_detach()
[all …]
H A 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()
545 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
554 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
562 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
569 show_link_attach_type_json(info->tcx.attach_type, json_wtr); in show_link_close_json()
573 show_link_attach_type_json(info->netkit.attach_type, json_wtr); in show_link_close_json()
577 show_link_attach_type_json(info->sockmap.attach_type, json_wtr); in show_link_close_json()
650 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
[all …]
/linux/kernel/bpf/
H 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()
145 bool created, ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_prog_attach()
172 bool ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_release()
207 bool ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_update()
263 link->attach_type, in tcx_link_fdinfo()
264 link->attach_type == BPF_TCX_INGRESS ? "ingress" : "egress"); in tcx_link_fdinfo()
279 info->tcx.attach_type = link->attach_type; in tcx_link_fill_info()
305 attr->link_create.attach_type); in tcx_link_init()
H A Dnet_namespace.c218 info->netns.attach_type = link->attach_type; in bpf_netns_link_fill_info()
232 link->attach_type); in bpf_netns_link_show_fdinfo()
280 type = to_netns_bpf_attach_type(attr->query.attach_type); in netns_bpf_prog_query()
307 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_attach()
391 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_detach()
488 type = attr->link_create.attach_type; in netns_bpf_link_create()
H A Dsyscall.c2576 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument
2579 if (!attach_type) in bpf_prog_get_ok()
2582 if (prog->type != *attach_type) in bpf_prog_get_ok()
2590 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument
2602 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) in __bpf_prog_get()
3193 enum bpf_attach_type attach_type, bool sleepable) in bpf_link_init_sleepable() argument
3202 link->attach_type = attach_type; in bpf_link_init_sleepable()
3207 enum bpf_attach_type attach_type) in bpf_link_init() argument
3209 bpf_link_init_sleepable(link, type, ops, prog, attach_type, false); in bpf_link_init()
3273 (link->type == BPF_LINK_TYPE_TRACING && link->attach_type == BPF_TRACE_RAW_TP); in bpf_link_is_tracepoint()
[all …]
H 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()
403 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
404 size = sizeof_field(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
587 storage->key.attach_type = type; in bpf_cgroup_storage_link()
H A Dcgroup.c167 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
173 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
174 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
213 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
215 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find()
216 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find()
246 key.attach_type = type; in bpf_cgroup_storages_alloc()
280 enum bpf_attach_type attach_type) in bpf_cgroup_storages_link() argument
285 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link()
986 atype = bpf_cgroup_atype_find(link->link.attach_type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
[all …]
H A Dtoken.c255 enum bpf_attach_type attach_type) in bpf_token_allow_prog_type() argument
257 if (!token || prog_type >= __MAX_BPF_PROG_TYPE || attach_type >= __MAX_BPF_ATTACH_TYPE) in bpf_token_allow_prog_type()
261 (token->allowed_attachs & BIT_ULL(attach_type)); in bpf_token_allow_prog_type()
/linux/include/linux/
H 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/drivers/net/
H A Dnetkit.c538 attr->attach_type); in netkit_prog_attach()
578 attr->attach_type); in netkit_prog_detach()
610 attr->query.attach_type); in netkit_prog_query()
737 link->attach_type, in netkit_link_fdinfo()
738 link->attach_type == BPF_NETKIT_PRIMARY ? "primary" : "peer"); in netkit_link_fdinfo()
753 info->netkit.attach_type = link->attach_type; in netkit_link_fill_info()
779 &netkit_link_lops, prog, attr->link_create.attach_type); in netkit_link_init()
794 attr->link_create.attach_type); in netkit_link_attach()
/linux/net/core/
H 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()
1576 ret = sock_map_prog_link_lookup(map, &pprog, NULL, attr->query.attach_type); in sock_map_bpf_prog_query()
1723 link->attach_type)); in sock_map_link_release()
1774 link->attach_type); in sock_map_link_update_prog()
1819 info->sockmap.attach_type = link->attach_type; in sock_map_link_fill_info()
1830 seq_printf(seq, "attach_type:\t%u\n", link->attach_type); in sock_map_link_show_fdinfo()
1846 enum bpf_attach_type attach_type; in sock_map_link_create() local
1867 attach_type = attr->link_create.attach_type; in sock_map_link_create()
1869 attach_type); in sock_map_link_create()
[all …]
/linux/include/uapi/linux/
H A Dbpf.h113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
313 * *attach_type* hook.
315 * The *attach_type* specifies the eBPF attachment point to
321 * or sock_ops type corresponding to the specified *attach_type*.
359 * hook specified by *attach_type*. The program must have been
470 * specified *attach_type* hook.
792 * *attach_type* hook and return a file descriptor handle for
1671 __u32 attach_type;
1729 __u32 attach_type;
1797 __u32 attach_type; /* attac
1649 __u32 attach_type; global() member
1707 __u32 attach_type; global() member
1775 __u32 attach_type; /* attach type */ global() member
6715 __u32 attach_type; global() member
6723 __u32 attach_type; global() member
6751 __u32 attach_type; global() member
6817 __u32 attach_type; global() member
6821 __u32 attach_type; global() member
6825 __u32 attach_type; global() member
[all...]
/linux/tools/include/uapi/linux/
H A Dbpf.h113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
313 * *attach_type* hook.
315 * The *attach_type* specifies the eBPF attachment point to
321 * or sock_ops type corresponding to the specified *attach_type*.
359 * hook specified by *attach_type*. The program must have been
470 * specified *attach_type* hook.
792 * *attach_type* hook and return a file descriptor handle for
1671 __u32 attach_type;
1729 __u32 attach_type;
1797 __u32 attach_type; /* attac
1649 __u32 attach_type; global() member
1707 __u32 attach_type; global() member
1775 __u32 attach_type; /* attach type */ global() member
6715 __u32 attach_type; global() member
6723 __u32 attach_type; global() member
6751 __u32 attach_type; global() member
6817 __u32 attach_type; global() member
6821 __u32 attach_type; global() member
6825 __u32 attach_type; global() member
[all...]
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-link.rst81 cgroup_id 614 attach_type egress
92 "attach_type": "egress",
/linux/tools/lib/bpf/
H A Dskel_internal.h305 enum bpf_attach_type attach_type) in skel_link_create() argument
313 attr.link_create.attach_type = attach_type; in skel_link_create()

12