/linux-master/tools/testing/selftests/bpf/ |
H A D | test_sock.c | 30 enum bpf_attach_type attach_type; member in struct:sock_test 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) argument 407 attach_sock_prog(int cgfd, int progfd, enum bpf_attach_type attach_type) argument [all...] |
H A D | test_sysctl.c | 32 enum bpf_attach_type attach_type; member in struct:sysctl_test 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...] |
/linux-master/include/linux/ |
H A D | bpf-netns.h | 10 to_netns_bpf_attach_type(enum bpf_attach_type attach_type) argument 12 switch (attach_type) {
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt.c | 27 enum bpf_attach_type attach_type; member in struct:sockopt_test 55 .attach_type = BPF_CGROUP_GETSOCKOPT, 67 .attach_type = BPF_CGROUP_GETSOCKOPT, 78 .attach_type = BPF_CGROUP_GETSOCKOPT, 99 .attach_type = BPF_CGROUP_GETSOCKOPT, 123 .attach_type = BPF_CGROUP_GETSOCKOPT, 149 .attach_type = BPF_CGROUP_GETSOCKOPT, 165 .attach_type = BPF_CGROUP_GETSOCKOPT, 192 .attach_type = BPF_CGROUP_GETSOCKOPT, 210 .attach_type [all...] |
H A D | section_names.c | 16 enum bpf_attach_type attach_type; member in struct:sec_name_test::__anon3691 234 enum bpf_attach_type attach_type; local 237 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); 245 CHECK(attach_type != test->expected_attach.attach_type, 246 "check_attach_type", "attach: unexpected attach_type=%d for %s\n", 247 attach_type, test->sec_name);
|
H A D | bpf_verif_scale.c | 50 enum bpf_prog_type attach_type; member in struct:scale_test_def 55 enum bpf_prog_type attach_type, 66 err = check_load(file, attach_type); 54 scale_test(const char *file, enum bpf_prog_type attach_type, bool should_fail) argument
|
H A D | cg_storage_multi.c | 96 key.attach_type = BPF_CGROUP_INET_EGRESS; 196 key.attach_type = BPF_CGROUP_INET_EGRESS; 201 key.attach_type = BPF_CGROUP_INET_INGRESS; 207 key.attach_type = BPF_CGROUP_INET_EGRESS; 210 key.attach_type = BPF_CGROUP_INET_INGRESS; 238 key.attach_type = BPF_CGROUP_INET_EGRESS; 243 key.attach_type = BPF_CGROUP_INET_INGRESS; 249 key.attach_type = BPF_CGROUP_INET_EGRESS; 254 key.attach_type = BPF_CGROUP_INET_INGRESS;
|
H A D | libbpf_str.c | 40 enum bpf_attach_type attach_type = (enum bpf_attach_type)e->val; local 45 if (attach_type == __MAX_BPF_ATTACH_TYPE) 49 attach_type_str = libbpf_bpf_attach_type_str(attach_type);
|
H A D | sockmap_basic.c | 315 static void test_sockmap_progs_query(enum bpf_attach_type attach_type) argument 329 if (attach_type == BPF_SK_MSG_VERDICT) 334 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, 340 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); 345 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, 353 bpf_prog_detach2(verdict_fd, map_fd, attach_type);
|
H A D | flow_dissector_reattach.c | 512 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR); 536 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR); 561 CHECK_FAIL(info.netns.attach_type != BPF_FLOW_DISSECTOR);
|
/linux-master/tools/bpf/bpftool/ |
H A D | cgroup.c | 98 static int show_bpf_prog(int id, enum bpf_attach_type attach_type, argument 118 attach_type_str = libbpf_bpf_attach_type_str(attach_type); 138 jsonw_string_field(json_wtr, "attach_type", attach_type_str); 140 jsonw_uint_field(json_wtr, "attach_type", attach_type); 154 printf("type %-10u", attach_type); 514 enum bpf_attach_type attach_type; local 531 attach_type = parse_attach_type(argv[1]); 532 if (attach_type == __MAX_BPF_ATTACH_TYPE) { 554 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flag 574 enum bpf_attach_type attach_type; local [all...] |
H A D | net.c | 633 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, argument 640 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) 642 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) 644 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) 652 enum net_attach_type attach_type; local 660 attach_type = parse_attach_type(*argv); 661 if (attach_type == net_attach_type_size) { 688 if (is_prefix("xdp", attach_type_strings[attach_type])) 689 err = do_attach_detach_xdp(progfd, attach_type, ifindex, 693 attach_type_strings[attach_type], strerro 706 enum net_attach_type attach_type; local [all...] |
H A D | link.c | 142 static void show_link_attach_type_json(__u32 attach_type, json_writer_t *wtr) argument 146 attach_type_str = libbpf_bpf_attach_type_str(attach_type); 148 jsonw_string_field(wtr, "attach_type", attach_type_str); 150 jsonw_uint_field(wtr, "attach_type", attach_type); 500 show_link_attach_type_json(info->tracing.attach_type, 508 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); 516 show_link_attach_type_json(info->netns.attach_type, json_wtr); 523 show_link_attach_type_json(info->tcx.attach_type, json_wtr); 527 show_link_attach_type_json(info->netkit.attach_type, json_wt 600 show_link_attach_type_plain(__u32 attach_type) argument [all...] |
H A D | prog.c | 1033 enum bpf_attach_type *attach_type, 1043 *attach_type = parse_attach_type(*argv); 1044 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { 1049 if (*attach_type == BPF_FLOW_DISSECTOR) { 1067 enum bpf_attach_type attach_type; local 1072 &progfd, &attach_type, &mapfd); 1076 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); 1089 enum bpf_attach_type attach_type; local 1094 &progfd, &attach_type, &mapfd); 1098 err = bpf_prog_detach2(progfd, mapfd, attach_type); 1032 parse_attach_detach_args(int argc, char **argv, int *progfd, enum bpf_attach_type *attach_type, int *mapfd) argument [all...] |
/linux-master/kernel/bpf/ |
H A D | tcx.c | 12 bool created, ingress = attr->attach_type == BPF_TCX_INGRESS; 61 bool ingress = attr->attach_type == BPF_TCX_INGRESS; 124 bool ingress = attr->query.attach_type == BPF_TCX_INGRESS; 262 seq_printf(seq, "attach_type:\t%u (%s)\n", 279 info->tcx.attach_type = tcx->location; 305 tcx->location = attr->link_create.attach_type;
|
H A D | net_namespace.c | 219 info->netns.attach_type = net_link->type; 231 "attach_type:\t%u\n", 233 info.netns.attach_type); 281 type = to_netns_bpf_attach_type(attr->query.attach_type); 308 type = to_netns_bpf_attach_type(attr->attach_type); 392 type = to_netns_bpf_attach_type(attr->attach_type); 489 type = attr->link_create.attach_type;
|
H A D | token.c | 271 enum bpf_attach_type attach_type) 273 if (!token || prog_type >= __MAX_BPF_PROG_TYPE || attach_type >= __MAX_BPF_ATTACH_TYPE) 277 (token->allowed_attachs & BIT_ULL(attach_type)); 269 bpf_token_allow_prog_type(const struct bpf_token *token, enum bpf_prog_type prog_type, enum bpf_attach_type attach_type) argument
|
H A D | local_storage.c | 50 else if (key1->attach_type < key2->attach_type) 52 else if (key1->attach_type > key2->attach_type) 369 * __u32 attach_type; 392 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); 393 size = sizeof_field(struct bpf_cgroup_storage_key, attach_type); 583 storage->key.attach_type = type;
|
H A D | syscall.c | 2447 enum bpf_prog_type *attach_type, bool attach_drv) 2450 if (!attach_type) 2453 if (prog->type != *attach_type) 2461 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, argument 2470 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) { 3275 "attach_type:\t%d\n" 3278 tr_link->attach_type, 3289 info->tracing.attach_type = tr_link->attach_type; 3376 link->attach_type 2446 bpf_prog_get_ok(struct bpf_prog *prog, enum bpf_prog_type *attach_type, bool attach_drv) argument 3899 attach_type_to_prog_type(enum bpf_attach_type attach_type) argument 3971 bpf_prog_attach_check_attach_type(const struct bpf_prog *prog, enum bpf_attach_type attach_type) argument [all...] |
H A D | cgroup.c | 138 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) argument 144 if (attach_type != BPF_LSM_CGROUP) 145 return to_cgroup_bpf_attach_type(attach_type); 184 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) argument 186 if (attach_type != BPF_LSM_CGROUP) 187 return to_cgroup_bpf_attach_type(attach_type); 217 key.attach_type = type; 251 enum bpf_attach_type attach_type) 256 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); 1026 enum bpf_attach_type type = attr->query.attach_type; 249 bpf_cgroup_storages_link(struct bpf_cgroup_storage *storages[], struct cgroup *cgrp, enum bpf_attach_type attach_type) argument [all...] |
/linux-master/tools/lib/bpf/ |
H A D | skel_internal.h | 290 enum bpf_attach_type attach_type) 298 attr.link_create.attach_type = attach_type; 289 skel_link_create(int prog_fd, int target_fd, enum bpf_attach_type attach_type) argument
|
H A D | bpf.c | 661 attr.attach_type = type; 699 attr.attach_type = type; 725 enum bpf_attach_type attach_type, 750 attr.link_create.attach_type = attach_type; 758 switch (attach_type) { 864 switch (attach_type) { 940 attr.query.attach_type = type; 724 bpf_link_create(int prog_fd, int target_fd, enum bpf_attach_type attach_type, const struct bpf_link_create_opts *opts) argument
|
/linux-master/include/uapi/linux/ |
H A D | bpf.h | 110 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member in struct:bpf_cgroup_storage_key 302 * *attach_type* hook. 304 * The *attach_type* specifies the eBPF attachment point to 310 * or sock_ops type corresponding to the specified *attach_type*. 348 * hook specified by *attach_type*. The program must have been 458 * specified *attach_type* hook. 780 * *attach_type* hook and return a file descriptor handle for 1589 __u32 attach_type; member in struct:bpf_attr::__anon2596 1646 __u32 attach_type; member in struct:bpf_attr::__anon2603 1712 __u32 attach_type; /* attac member in struct:bpf_attr::__anon2609 6616 __u32 attach_type; member in struct:bpf_link_info::__anon2663::__anon2665 6622 __u32 attach_type; member in struct:bpf_link_info::__anon2663::__anon2666 6650 __u32 attach_type; member in struct:bpf_link_info::__anon2663::__anon2673 6715 __u32 attach_type; member in struct:bpf_link_info::__anon2663::__anon2685 6719 __u32 attach_type; member in struct:bpf_link_info::__anon2663::__anon2686 [all...] |
/linux-master/tools/include/uapi/linux/ |
H A D | bpf.h | 110 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member in struct:bpf_cgroup_storage_key 302 * *attach_type* hook. 304 * The *attach_type* specifies the eBPF attachment point to 310 * or sock_ops type corresponding to the specified *attach_type*. 348 * hook specified by *attach_type*. The program must have been 458 * specified *attach_type* hook. 780 * *attach_type* hook and return a file descriptor handle for 1589 __u32 attach_type; member in struct:bpf_attr::__anon3137 1646 __u32 attach_type; member in struct:bpf_attr::__anon3144 1712 __u32 attach_type; /* attac member in struct:bpf_attr::__anon3150 6616 __u32 attach_type; member in struct:bpf_link_info::__anon3204::__anon3206 6622 __u32 attach_type; member in struct:bpf_link_info::__anon3204::__anon3207 6650 __u32 attach_type; member in struct:bpf_link_info::__anon3204::__anon3214 6715 __u32 attach_type; member in struct:bpf_link_info::__anon3204::__anon3226 6719 __u32 attach_type; member in struct:bpf_link_info::__anon3204::__anon3227 [all...] |
/linux-master/drivers/net/ |
H A D | netkit.c | 506 attr->attach_type); 546 attr->attach_type); 578 attr->query.attach_type); 704 seq_printf(seq, "attach_type:\t%u (%s)\n", 721 info->netkit.attach_type = nkl->location; 748 nkl->location = attr->link_create.attach_type; 763 attr->link_create.attach_type);
|