Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dsockopt.c29 enum bpf_attach_type attach_type; member
57 .attach_type = BPF_CGROUP_GETSOCKOPT,
69 .attach_type = BPF_CGROUP_GETSOCKOPT,
80 .attach_type = BPF_CGROUP_GETSOCKOPT,
101 .attach_type = BPF_CGROUP_GETSOCKOPT,
125 .attach_type = BPF_CGROUP_GETSOCKOPT,
151 .attach_type = BPF_CGROUP_GETSOCKOPT,
167 .attach_type = BPF_CGROUP_GETSOCKOPT,
194 .attach_type = BPF_CGROUP_GETSOCKOPT,
212 .attach_type
[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 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 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()
H A Dsock_addr.c63 enum bpf_attach_type attach_type,
354 enum bpf_attach_type attach_type; member
378 enum bpf_attach_type attach_type, \
390 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, \
399 bpf_prog_detach(cgroup_fd, attach_type); \
410 enum bpf_attach_type attach_type, \
417 attach_type), \
2612 skel = test->loadfn(cgroup_fd, test->attach_type, in test_sock_addr()
H A Dfill_link_info.c474 enum bpf_attach_type attach_type = bpf_program__expected_attach_type(prog); in verify_tracing_multi_link_info() local
489 ASSERT_EQ(info.tracing_multi.attach_type, attach_type, "info.tracing_multi.attach_type"); in verify_tracing_multi_link_info()
508 ASSERT_EQ(info.tracing_multi.attach_type, attach_type, "info.tracing_multi.attach_type"); in verify_tracing_multi_link_info()
H A 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()
/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()
694 enum net_attach_type attach_type; do_attach() local
778 enum net_attach_type attach_type; do_detach() local
[all...]
H A Dcgroup.c199 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, in show_bpf_prog()
219 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in count_attached_bpf_progs()
239 jsonw_string_field(json_wtr, "attach_type", attach_type_str); in cgroup_has_attached_progs()
241 jsonw_uint_field(json_wtr, "attach_type", attach_type); in cgroup_has_attached_progs()
255 printf("type %-10u", attach_type); in show_effective_bpf_progs()
603 enum bpf_attach_type attach_type; in do_attach()
620 attach_type = parse_attach_type(argv[1]); in do_detach()
621 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_detach()
645 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flag in do_detach()
141 show_bpf_prog(int id,enum bpf_attach_type attach_type,const char * attach_flags_str,int level) show_bpf_prog() argument
562 enum bpf_attach_type attach_type; do_attach() local
622 enum bpf_attach_type attach_type; do_detach() local
[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()
148 jsonw_string_field(wtr, "attach_type", attach_type_str); in show_link_attach_type_json()
150 jsonw_uint_field(wtr, "attach_type", attach_type); in show_link_attach_type_json()
436 show_link_attach_type_json(info->tracing_multi.attach_type, wtr); in show_tracing_multi_json()
610 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
619 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
627 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
634 show_link_attach_type_json(info->tcx.attach_type, json_wt in show_link_close_json()
718 show_link_attach_type_plain(__u32 attach_type) 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.c213 info->netns.attach_type = link->attach_type; in bpf_netns_link_fill_info()
227 link->attach_type); in bpf_netns_link_show_fdinfo()
275 type = to_netns_bpf_attach_type(attr->query.attach_type); in netns_bpf_prog_query()
302 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_attach()
386 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_detach()
483 type = attr->link_create.attach_type; in netns_bpf_link_create()
H A Dsyscall.c2686 enum bpf_prog_type *attach_type, bool attach_drv) in __bpf_prog_get()
2689 if (!attach_type) in __bpf_prog_get()
2692 if (prog->type != *attach_type) in __bpf_prog_get()
2700 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type,
2712 if (!bpf_prog_get_ok(prog, attach_type, attach_drv))
3270 enum bpf_attach_type attach_type, bool sleepable) in bpf_tramp_link_init()
3279 link->attach_type = attach_type; in bpf_link_free_id()
3284 enum bpf_attach_type attach_type) in bpf_link_free_id()
3286 bpf_link_init_sleepable(link, type, ops, prog, attach_type, fals
2668 bpf_prog_get_ok(struct bpf_prog * prog,enum bpf_prog_type * attach_type,bool attach_drv) bpf_prog_get_ok() argument
2682 __bpf_prog_get(u32 ufd,enum bpf_prog_type * attach_type,bool attach_drv) __bpf_prog_get() argument
3248 bpf_link_init_sleepable(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,bool sleepable) bpf_link_init_sleepable() argument
3262 bpf_link_init(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_link_init() argument
3269 bpf_tramp_link_init(struct bpf_tramp_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,u64 cookie) bpf_tramp_link_init() argument
3655 bpf_tracing_prog_attach(struct bpf_prog * prog,int tgt_prog_fd,u32 btf_id,u64 bpf_cookie,enum bpf_attach_type attach_type) bpf_tracing_prog_attach() argument
4316 bpf_raw_tp_link_attach(struct bpf_prog * prog,const char __user * user_tp_name,u64 cookie,enum bpf_attach_type attach_type) bpf_raw_tp_link_attach() argument
4415 attach_type_to_prog_type(enum bpf_attach_type attach_type) attach_type_to_prog_type() argument
4492 bpf_prog_attach_check_attach_type(const struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_prog_attach_check_attach_type() argument
[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()
385 * __u32 attach_type; in cgroup_storage_check_btf()
408 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
409 size = sizeof_field(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
592 storage->key.attach_type = type; in bpf_cgroup_storage_link()
H A Dcgroup.c251 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_storages_free()
257 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_storages_alloc()
258 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_storages_alloc()
302 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_storages_link()
304 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_storages_link()
305 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_storages_link()
335 key.attach_type = type; in cgroup_bpf_release()
369 enum bpf_attach_type attach_type) in cgroup_bpf_release()
374 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in cgroup_bpf_release()
1271 atype = bpf_cgroup_atype_find(link->link.attach_type, new_pro
183 bpf_cgroup_atype_find(enum bpf_attach_type attach_type,u32 attach_btf_id) bpf_cgroup_atype_find() argument
234 bpf_cgroup_atype_find(enum bpf_attach_type attach_type,u32 attach_btf_id) bpf_cgroup_atype_find() argument
301 bpf_cgroup_storages_link(struct bpf_cgroup_storage * storages[],struct cgroup * cgrp,enum bpf_attach_type attach_type) bpf_cgroup_storages_link() argument
[all...]
H A Dtoken.c258 enum bpf_attach_type attach_type) in bpf_token_allow_prog_type()
260 if (!token || prog_type >= __MAX_BPF_PROG_TYPE || attach_type >= __MAX_BPF_ATTACH_TYPE) in bpf_token_allow_prog_type()
264 (token->allowed_attachs & BIT_ULL(attach_type));
255 bpf_token_allow_prog_type(const struct bpf_token * token,enum bpf_prog_type prog_type,enum bpf_attach_type attach_type) bpf_token_allow_prog_type() argument
/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/net/core/
H A Dsock_map.c82 ret = sock_map_prog_update(map, prog, NULL, NULL, attr->attach_type); in sock_map_get_from_fd()
111 ret = sock_map_prog_update(map, NULL, prog, NULL, attr->attach_type); in sock_map_prog_detach()
1534 static int sock_map_prog_attach_check(enum bpf_attach_type attach_type,
1538 if (prog && attach_type == BPF_SK_SKB_STREAM_PARSER && in sock_map_prog_update()
1607 ret = sock_map_prog_link_lookup(map, &pprog, NULL, attr->query.attach_type); in sock_map_bpf_prog_query()
1765 link->attach_type));
1804 /* Ensure link->prog has the same type/attach_type as the new prog. */ in sock_map_link_update_prog()
1811 ret = sock_map_prog_attach_check(link->attach_type, prog); in sock_map_link_update_prog()
1821 link->attach_type); in sock_map_link_update_prog()
1866 info->sockmap.attach_type in sock_map_link_show_fdinfo()
1521 sock_map_prog_attach_check(enum bpf_attach_type attach_type,struct bpf_prog * prog) sock_map_prog_attach_check() argument
1880 enum bpf_attach_type attach_type; sock_map_link_create() local
[all...]
/linux/tools/include/uapi/linux/
H A Dbpf.h126 __u32 attach_type; /* program attach type (enum bpf_attach_type) */
326 * *attach_type* hook.
328 * The *attach_type* specifies the eBPF attachment point to
334 * or sock_ops type corresponding to the specified *attach_type*.
372 * hook specified by *attach_type*. The program must have been
483 * specified *attach_type* hook.
805 * *attach_type* hook and return a file descriptor handle for
1739 __u32 attach_type;
1797 __u32 attach_type;
1865 __u32 attach_type; /* attac
113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ global() member
1693 __u32 attach_type; global() member
1751 __u32 attach_type; global() member
1819 __u32 attach_type; /* attach type */ global() member
6850 __u32 attach_type; global() member
6858 __u32 attach_type; global() member
6886 __u32 attach_type; global() member
6918 __u32 attach_type; global() member
6961 __u32 attach_type; global() member
6965 __u32 attach_type; global() member
6969 __u32 attach_type; global() member
[all...]
/linux/include/uapi/linux/
H A Dbpf.h126 __u32 attach_type; /* program attach type (enum bpf_attach_type) */
326 * *attach_type* hook.
328 * The *attach_type* specifies the eBPF attachment point to
334 * or sock_ops type corresponding to the specified *attach_type*.
372 * hook specified by *attach_type*. The program must have been
483 * specified *attach_type* hook.
805 * *attach_type* hook and return a file descriptor handle for
1739 __u32 attach_type;
1797 __u32 attach_type;
1865 __u32 attach_type; /* attac
113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ global() member
1693 __u32 attach_type; global() member
1751 __u32 attach_type; global() member
1819 __u32 attach_type; /* attach type */ global() member
6850 __u32 attach_type; global() member
6858 __u32 attach_type; global() member
6886 __u32 attach_type; global() member
6918 __u32 attach_type; global() member
6961 __u32 attach_type; global() member
6965 __u32 attach_type; global() member
6969 __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.h346 enum bpf_attach_type attach_type) in skel_map_freeze()
354 attr.link_create.attach_type = attach_type;
326 skel_link_create(int prog_fd,int target_fd,enum bpf_attach_type attach_type) skel_link_create() argument
/linux/Documentation/bpf/
H A Dmap_cgroup_storage.rst30 __u32 attach_type;
34 ``attach_type`` is the program's attach type.
84 .attach_type = type,

12