Home
last modified time | relevance | path

Searched refs:attach_type (Results 1 - 25 of 67) sorted by relevance

123

/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/
H A Dsockopt.c26 enum bpf_attach_type attach_type; member
53 .attach_type = BPF_CGROUP_GETSOCKOPT,
65 .attach_type = BPF_CGROUP_GETSOCKOPT,
76 .attach_type = BPF_CGROUP_GETSOCKOPT,
97 .attach_type = BPF_CGROUP_GETSOCKOPT,
121 .attach_type = BPF_CGROUP_GETSOCKOPT,
147 .attach_type = BPF_CGROUP_GETSOCKOPT,
163 .attach_type = BPF_CGROUP_GETSOCKOPT,
190 .attach_type = BPF_CGROUP_GETSOCKOPT,
208 .attach_type
[all...]
H A 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()
201 "check_attach_type", "attach: unexpected attach_type=%d for %s\n", in test_attach_type_by_name()
202 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 Dbpf_verif_scale.c50 enum bpf_prog_type attach_type; member
55 enum bpf_prog_type attach_type, in scale_test()
66 err = check_load(file, attach_type); in scale_test()
54 scale_test(const char *file, enum bpf_prog_type attach_type, bool should_fail) scale_test() argument
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()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
H A 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
[all...]
H A 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()
201 "check_attach_type", "attach: unexpected attach_type=%d for %s\n", in test_attach_type_by_name()
202 attach_type, test->sec_name); in test_attach_type_by_name()
H A 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()
H A 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()
H A 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-6.6/tools/testing/selftests/bpf/
H 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,
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
387 load_sock_prog(const struct bpf_insn *prog, enum bpf_attach_type attach_type) load_sock_prog() argument
407 attach_sock_prog(int cgfd, int progfd, enum bpf_attach_type attach_type) attach_sock_prog() argument
[all...]
H A Dtest_sysctl.c32 enum bpf_attach_type attach_type; member
48 .descr = "sysctl wrong attach_type",
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
[all...]
/kernel/linux/linux-5.10/tools/bpf/bpftool/
H A 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()
70 jsonw_string_field(json_wtr, "attach_type", 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
442 enum bpf_attach_type attach_type; do_detach() local
[all...]
H A 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()
74 jsonw_string_field(wtr, "attach_type", 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
[all...]
H A 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], strerro in do_attach()
613 enum net_attach_type attach_type; do_detach() local
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
H A Dtest_sysctl.c32 enum bpf_attach_type attach_type; member
48 .descr = "sysctl wrong attach_type",
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
[all...]
H A Dtest_sock.c31 enum bpf_attach_type attach_type; member
329 enum bpf_attach_type attach_type) in load_sock_prog()
336 attr.expected_attach_type = attach_type; in load_sock_prog()
350 enum bpf_attach_type attach_type) in attach_sock_prog()
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()
328 load_sock_prog(const struct bpf_insn *prog, enum bpf_attach_type attach_type) load_sock_prog() argument
349 attach_sock_prog(int cgfd, int progfd, enum bpf_attach_type attach_type) attach_sock_prog() argument
H A 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-6.6/tools/bpf/bpftool/
H A 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()
136 jsonw_string_field(json_wtr, "attach_type", attach_type_str); 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_flag in do_attach()
572 enum bpf_attach_type attach_type; do_detach() local
[all...]
H A Dnet.c628 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument
635 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp()
637 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp()
639 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp()
647 enum net_attach_type attach_type; in do_attach() local
655 attach_type = parse_attach_type(*argv); in do_attach()
656 if (attach_type == net_attach_type_size) { in do_attach()
683 if (is_prefix("xdp", attach_type_strings[attach_type])) in do_attach()
684 err = do_attach_detach_xdp(progfd, attach_type, ifindex, in do_attach()
688 attach_type_strings[attach_type], strerro in do_attach()
701 enum net_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()
427 show_link_attach_type_json(info->tracing.attach_type, in show_link_close_json()
435 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json()
443 show_link_attach_type_json(info->netns.attach_type, json_wtr); in show_link_close_json()
450 show_link_attach_type_json(info->tcx.attach_type, json_wtr); in show_link_close_json()
520 static void show_link_attach_type_plain(__u32 attach_type) in show_link_attach_type_plain() argument
[all...]
/kernel/linux/linux-5.10/include/linux/
H A 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-6.6/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()
/kernel/linux/linux-5.10/kernel/bpf/
H A 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()
371 * __u32 attach_type; in cgroup_storage_check_btf()
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()
/kernel/linux/linux-6.6/kernel/bpf/
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()
369 * __u32 attach_type; in cgroup_storage_check_btf()
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()

Completed in 13 milliseconds

123