/linux-6.6.21/tools/testing/selftests/bpf/ |
D | test_sock.c | 30 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 = BPF_CGROUP_INET4_POST_BIND, [all …]
|
D | test_sysctl.c | 32 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 …]
|
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
D | sockopt.c | 26 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 = BPF_CGROUP_GETSOCKOPT, [all …]
|
D | section_names.c | 16 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()
|
D | cg_storage_multi.c | 96 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()
|
D | bpf_verif_scale.c | 50 enum bpf_prog_type attach_type; member 55 enum bpf_prog_type attach_type, in scale_test() argument 66 err = check_load(file, attach_type); in scale_test()
|
D | libbpf_str.c | 40 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()
|
D | sockmap_basic.c | 315 static void test_sockmap_progs_query(enum bpf_attach_type attach_type) in test_sockmap_progs_query() argument 329 if (attach_type == BPF_SK_MSG_VERDICT) in test_sockmap_progs_query() 334 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query() 340 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); in test_sockmap_progs_query() 345 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query() 353 bpf_prog_detach2(verdict_fd, map_fd, attach_type); in test_sockmap_progs_query()
|
D | flow_dissector_reattach.c | 512 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-6.6.21/tools/bpf/bpftool/ |
D | cgroup.c | 96 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() 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_flags)) { in do_attach() 572 enum bpf_attach_type attach_type; in do_detach() local 587 attach_type = parse_attach_type(argv[1]); in do_detach() [all …]
|
D | net.c | 628 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], strerror(-err)); in do_attach() [all …]
|
D | link.c | 142 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() 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 524 attach_type_str = libbpf_bpf_attach_type_str(attach_type); in show_link_attach_type_plain() 528 printf("attach_type %u ", attach_type); in show_link_attach_type_plain() [all …]
|
D | prog.c | 1029 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument 1039 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args() 1040 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args() 1045 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args() 1063 enum bpf_attach_type attach_type; in do_attach() local 1068 &progfd, &attach_type, &mapfd); in do_attach() 1072 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach() 1085 enum bpf_attach_type attach_type; in do_detach() local 1090 &progfd, &attach_type, &mapfd); in do_detach() 1094 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
|
/linux-6.6.21/include/linux/ |
D | bpf-netns.h | 10 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-6.6.21/kernel/bpf/ |
D | local_storage.c | 50 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() 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()
|
D | tcx.c | 12 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() 279 info->tcx.attach_type = tcx->location; in tcx_link_fill_info() 305 tcx->location = attr->link_create.attach_type; in tcx_link_init()
|
D | net_namespace.c | 219 info->netns.attach_type = net_link->type; in bpf_netns_link_fill_info() 233 info.netns.attach_type); in bpf_netns_link_show_fdinfo() 281 type = to_netns_bpf_attach_type(attr->query.attach_type); in netns_bpf_prog_query() 308 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_attach() 392 type = to_netns_bpf_attach_type(attr->attach_type); in netns_bpf_prog_detach() 489 type = attr->link_create.attach_type; in netns_bpf_link_create()
|
D | syscall.c | 2352 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument 2355 if (!attach_type) in bpf_prog_get_ok() 2358 if (prog->type != *attach_type) in bpf_prog_get_ok() 2366 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument 2375 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) { in __bpf_prog_get() 3091 tr_link->attach_type, in bpf_tracing_link_show_fdinfo() 3102 info->tracing.attach_type = tr_link->attach_type; in bpf_tracing_link_fill_link_info() 3184 link->attach_type = prog->expected_attach_type; in bpf_tracing_prog_attach() 3701 attach_type_to_prog_type(enum bpf_attach_type attach_type) in attach_type_to_prog_type() argument 3703 switch (attach_type) { in attach_type_to_prog_type() [all …]
|
D | cgroup.c | 138 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument 144 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find() 145 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find() 184 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument 186 if (attach_type != BPF_LSM_CGROUP) in bpf_cgroup_atype_find() 187 return to_cgroup_bpf_attach_type(attach_type); in bpf_cgroup_atype_find() 217 key.attach_type = type; in bpf_cgroup_storages_alloc() 251 enum bpf_attach_type attach_type) in bpf_cgroup_storages_link() argument 256 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link() 1026 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query() [all …]
|
/linux-6.6.21/tools/lib/bpf/ |
D | skel_internal.h | 290 enum bpf_attach_type attach_type) in skel_link_create() argument 298 attr.link_create.attach_type = attach_type; in skel_link_create()
|
D | bpf.c | 654 attr.attach_type = type; in bpf_prog_attach_opts() 692 attr.attach_type = type; in bpf_prog_detach_opts() 718 enum bpf_attach_type attach_type, in bpf_link_create() argument 743 attr.link_create.attach_type = attach_type; in bpf_link_create() 751 switch (attach_type) { in bpf_link_create() 841 switch (attach_type) { in bpf_link_create() 917 attr.query.attach_type = type; in bpf_prog_query_opts()
|
/linux-6.6.21/tools/bpf/bpftool/Documentation/ |
D | bpftool-link.rst | 86 cgroup_id 614 attach_type egress 97 "attach_type": "egress",
|
/linux-6.6.21/tools/include/uapi/linux/ |
D | bpf.h | 88 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member 1476 __u32 attach_type; member 1533 __u32 attach_type; member 1594 __u32 attach_type; /* attach type */ member 6484 __u32 attach_type; member 6490 __u32 attach_type; member 6518 __u32 attach_type; member 6564 __u32 attach_type; member
|
/linux-6.6.21/include/uapi/linux/ |
D | bpf.h | 88 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member 1476 __u32 attach_type; member 1533 __u32 attach_type; member 1594 __u32 attach_type; /* attach type */ member 6484 __u32 attach_type; member 6490 __u32 attach_type; member 6518 __u32 attach_type; member 6564 __u32 attach_type; member
|
/linux-6.6.21/Documentation/bpf/ |
D | map_cgroup_storage.rst | 30 __u32 attach_type; 34 ``attach_type`` is the program's attach type. 84 .attach_type = type,
|