Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/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()
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()
Dcg_storage_multi.c96 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_egress_only()
203 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
208 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
214 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
217 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
248 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
253 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
259 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
264 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
Dbpf_verif_scale.c38 enum bpf_prog_type attach_type; member
113 err = check_load(test->file, test->attach_type); in test_bpf_verif_scale()
Dsockopt_sk.c196 enum bpf_attach_type attach_type; in prog_attach() local
201 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach()
214 attach_type, 0); in prog_attach()
Dsockopt_inherit.c141 enum bpf_attach_type attach_type; in prog_attach() local
146 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach()
159 attach_type, 0); in prog_attach()
/kernel/linux/linux-5.10/tools/bpf/bpftool/
Dcgroup.c49 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, in show_bpf_prog() argument
69 if (attach_type < ARRAY_SIZE(attach_type_name)) in show_bpf_prog()
71 attach_type_name[attach_type]); in show_bpf_prog()
73 jsonw_uint_field(json_wtr, "attach_type", attach_type); in show_bpf_prog()
80 if (attach_type < ARRAY_SIZE(attach_type_name)) in show_bpf_prog()
81 printf("%-15s", attach_type_name[attach_type]); in show_bpf_prog()
83 printf("type %-10u", attach_type); in show_bpf_prog()
382 enum bpf_attach_type attach_type; in do_attach() local
399 attach_type = parse_attach_type(argv[1]); in do_attach()
400 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach()
[all …]
Dlink.c71 static void show_link_attach_type_json(__u32 attach_type, json_writer_t *wtr) in show_link_attach_type_json() argument
73 if (attach_type < ARRAY_SIZE(attach_type_name)) in show_link_attach_type_json()
75 attach_type_name[attach_type]); in show_link_attach_type_json()
77 jsonw_uint_field(wtr, "attach_type", attach_type); in show_link_attach_type_json()
139 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
145 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
153 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
189 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
191 if (attach_type < ARRAY_SIZE(attach_type_name)) in show_link_attach_type_plain()
192 printf("attach_type %s ", attach_type_name[attach_type]); in show_link_attach_type_plain()
[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.c928 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument
938 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args()
939 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args()
944 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args()
962 enum bpf_attach_type attach_type; in do_attach() local
967 &progfd, &attach_type, &mapfd); in do_attach()
971 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach()
984 enum bpf_attach_type attach_type; in do_detach() local
989 &progfd, &attach_type, &mapfd); in do_detach()
993 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
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 …]
Dtest_sock.c31 enum bpf_attach_type attach_type; member
329 enum bpf_attach_type attach_type) in load_sock_prog() argument
336 attr.expected_attach_type = attach_type; in load_sock_prog()
350 enum bpf_attach_type attach_type) in attach_sock_prog() argument
352 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
413 if (attach_sock_prog(cgfd, progfd, test->attach_type) == -1) { in run_test_case()
440 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
Dtest_socket_cookie.c132 enum bpf_attach_type attach_type; in run_test() local
156 if (libbpf_attach_type_by_name(prog_name, &attach_type)) in run_test()
159 err = bpf_prog_attach(bpf_program__fd(prog), cgfd, attach_type, in run_test()
/kernel/linux/linux-5.10/include/linux/
Dbpf-netns.h16 to_netns_bpf_attach_type(enum bpf_attach_type attach_type) in to_netns_bpf_attach_type() argument
18 switch (attach_type) { in to_netns_bpf_attach_type()
/kernel/linux/linux-5.10/kernel/bpf/
Dlocal_storage.c48 else if (key1->attach_type < key2->attach_type) in bpf_cgroup_storage_key_cmp()
50 else if (key1->attach_type > key2->attach_type) in bpf_cgroup_storage_key_cmp()
394 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
395 size = sizeof_field(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf()
588 storage->key.attach_type = type; in bpf_cgroup_storage_link()
Dnet_namespace.c218 info->netns.attach_type = net_link->type; in bpf_netns_link_fill_info()
232 info.netns.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()
Dsyscall.c1914 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument
1917 if (!attach_type) in bpf_prog_get_ok()
1920 if (prog->type != *attach_type) in bpf_prog_get_ok()
1928 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument
1937 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) { in __bpf_prog_get()
2522 enum bpf_attach_type attach_type; member
2558 tr_link->attach_type); in bpf_tracing_link_show_fdinfo()
2567 info->tracing.attach_type = tr_link->attach_type; in bpf_tracing_link_fill_link_info()
2645 link->attach_type = prog->expected_attach_type; in bpf_tracing_prog_attach()
2910 enum bpf_attach_type attach_type) in bpf_prog_attach_check_attach_type() argument
[all …]
Dcgroup.c50 key.attach_type = type; in bpf_cgroup_storages_alloc()
84 enum bpf_attach_type attach_type) in bpf_cgroup_storages_link() argument
89 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link()
768 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query()
835 attr->attach_type, attr->attach_flags); in cgroup_bpf_prog_attach()
857 ret = cgroup_bpf_detach(cgrp, prog, attr->attach_type); in cgroup_bpf_prog_detach()
943 info->cgroup.attach_type = cg_link->type; in bpf_cgroup_link_fill_link_info()
978 link->type = attr->link_create.attach_type; in cgroup_bpf_link_attach()
1340 enum bpf_attach_type attach_type) in __cgroup_bpf_prog_array_is_empty() argument
1346 prog_array = rcu_dereference(cgrp->bpf.effective[attach_type]); in __cgroup_bpf_prog_array_is_empty()
/kernel/linux/linux-5.10/tools/bpf/bpftool/Documentation/
Dbpftool-link.rst82 cgroup_id 614 attach_type egress
93 "attach_type": "egress",
/kernel/linux/linux-5.10/include/uapi/linux/
Dbpf.h81 __u32 attach_type; /* program attach type */ member
571 __u32 attach_type; member
622 __u32 attach_type; member
664 __u32 attach_type; /* attach type */ member
4434 __u32 attach_type; member
4438 __u32 attach_type; member
4451 __u32 attach_type; member
/kernel/linux/linux-5.10/tools/include/uapi/linux/
Dbpf.h81 __u32 attach_type; /* program attach type */ member
571 __u32 attach_type; member
622 __u32 attach_type; member
664 __u32 attach_type; /* attach type */ member
4434 __u32 attach_type; member
4438 __u32 attach_type; member
4451 __u32 attach_type; member
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dbpf.h71 __u32 attach_type; member
351 __u32 attach_type; member
389 __u32 attach_type; member
423 __u32 attach_type; member
811 __u32 attach_type; member
815 __u32 attach_type; member
828 __u32 attach_type; member
/kernel/linux/linux-5.10/tools/lib/bpf/
Dbpf.c555 attr.attach_type = type; in bpf_prog_attach_xattr()
568 attr.attach_type = type; in bpf_prog_detach()
580 attr.attach_type = type; in bpf_prog_detach2()
586 enum bpf_attach_type attach_type, in bpf_link_create() argument
604 attr.link_create.attach_type = attach_type; in bpf_link_create()
663 attr.query.attach_type = type; in bpf_prog_query()
/kernel/linux/linux-5.10/Documentation/bpf/
Dmap_cgroup_storage.rst30 __u32 attach_type;
34 ``attach_type`` is the the program's attach type.
84 .attach_type = type,

12