/Linux-v5.4/tools/testing/selftests/bpf/prog_tests/ |
D | sockopt.c | 21 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 …]
|
D | sockopt_multi.c | 7 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()
|
D | sockopt_sk.c | 136 enum bpf_attach_type attach_type; in prog_attach() local 141 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach() 154 attach_type, 0); in prog_attach()
|
D | bpf_verif_scale.c | 36 enum bpf_prog_type attach_type; member 105 err = check_load(test->file, test->attach_type); in test_bpf_verif_scale()
|
D | sockopt_inherit.c | 141 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()
|
/Linux-v5.4/tools/bpf/bpftool/ |
D | net.c | 275 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument 282 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp() 284 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp() 286 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp() 294 enum net_attach_type attach_type; in do_attach() local 302 attach_type = parse_attach_type(*argv); in do_attach() 303 if (attach_type == net_attach_type_size) { in do_attach() 330 if (is_prefix("xdp", attach_type_strings[attach_type])) in do_attach() 331 err = do_attach_detach_xdp(progfd, attach_type, ifindex, in do_attach() 336 attach_type_strings[attach_type], strerror(-err)); in do_attach() [all …]
|
D | cgroup.c | 376 enum bpf_attach_type attach_type; in do_attach() local 393 attach_type = parse_attach_type(argv[1]); in do_attach() 394 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach() 416 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach() 436 enum bpf_attach_type attach_type; in do_detach() local 451 attach_type = parse_attach_type(argv[1]); in do_detach() 452 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_detach() 463 if (bpf_prog_detach2(prog_fd, cgroup_fd, attach_type)) { in do_detach()
|
D | prog.c | 678 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument 688 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args() 689 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args() 694 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args() 712 enum bpf_attach_type attach_type; in do_attach() local 717 &progfd, &attach_type, &mapfd); in do_attach() 721 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach() 734 enum bpf_attach_type attach_type; in do_detach() local 739 &progfd, &attach_type, &mapfd); in do_detach() 743 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
|
/Linux-v5.4/tools/testing/selftests/bpf/ |
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, 133 .attach_type = BPF_CGROUP_SYSCTL, 154 .attach_type = BPF_CGROUP_SYSCTL, 181 .attach_type = BPF_CGROUP_SYSCTL, 197 .attach_type = BPF_CGROUP_SYSCTL, [all …]
|
D | test_section_names.c | 18 enum bpf_attach_type attach_type; member 183 enum bpf_attach_type attach_type; in test_attach_type_by_name() local 186 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name() 196 if (attach_type != test->expected_attach.attach_type) { in test_attach_type_by_name() 197 warnx("attach: unexpected attach_type=%d for %s", attach_type, in test_attach_type_by_name()
|
D | test_sock.c | 31 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()
|
D | test_socket_cookie.c | 132 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()
|
D | test_sock_addr.c | 65 enum bpf_attach_type attach_type; member 1537 err = bpf_prog_attach(progfd, cgfd, test->attach_type, in run_test_case() 1549 switch (test->attach_type) { in run_test_case() 1589 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
|
/Linux-v5.4/kernel/bpf/ |
D | local_storage.c | 41 else if (key1->attach_type < key2->attach_type) in bpf_cgroup_storage_key_cmp() 43 else if (key1->attach_type > key2->attach_type) in bpf_cgroup_storage_key_cmp() 262 next->attach_type = storage->key.attach_type; in cgroup_storage_get_next_key() 368 offset = offsetof(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf() 369 size = FIELD_SIZEOF(struct bpf_cgroup_storage_key, attach_type); in cgroup_storage_check_btf() 571 storage->key.attach_type = type; in bpf_cgroup_storage_link()
|
D | syscall.c | 1506 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument 1509 if (!attach_type) in bpf_prog_get_ok() 1512 if (prog->type != *attach_type) in bpf_prog_get_ok() 1520 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument 1529 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) { in __bpf_prog_get() 1875 enum bpf_attach_type attach_type) in bpf_prog_attach_check_attach_type() argument 1881 return attach_type == prog->expected_attach_type ? 0 : -EINVAL; in bpf_prog_attach_check_attach_type() 1884 prog->expected_attach_type != attach_type ? in bpf_prog_attach_check_attach_type() 1911 switch (attr->attach_type) { in bpf_prog_attach() 1965 if (bpf_prog_attach_check_attach_type(prog, attr->attach_type)) { in bpf_prog_attach() [all …]
|
D | cgroup.c | 495 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query() 549 ret = cgroup_bpf_attach(cgrp, prog, attr->attach_type, in cgroup_bpf_prog_attach() 569 ret = cgroup_bpf_detach(cgrp, prog, attr->attach_type, 0); in cgroup_bpf_prog_detach() 944 enum bpf_attach_type attach_type) in __cgroup_bpf_prog_array_is_empty() argument 950 prog_array = rcu_dereference(cgrp->bpf.effective[attach_type]); in __cgroup_bpf_prog_array_is_empty()
|
/Linux-v5.4/tools/lib/bpf/ |
D | bpf.c | 470 attr.attach_type = type; in bpf_prog_attach() 482 attr.attach_type = type; in bpf_prog_detach() 494 attr.attach_type = type; in bpf_prog_detach2() 507 attr.query.attach_type = type; in bpf_prog_query()
|
D | libbpf.h | 129 enum bpf_attach_type *attach_type);
|
D | libbpf.c | 4481 enum bpf_attach_type attach_type; member 4554 static char *libbpf_get_type_names(bool attach_type) in libbpf_get_type_names() argument 4566 if (attach_type && !section_names[i].is_attachable) in libbpf_get_type_names() 4607 enum bpf_attach_type *attach_type) in libbpf_attach_type_by_name() argument 4620 *attach_type = section_names[i].attach_type; in libbpf_attach_type_by_name()
|
/Linux-v5.4/include/uapi/linux/ |
D | bpf.h | 81 __u32 attach_type; /* program attach type */ member 434 __u32 attach_type; member 478 __u32 attach_type; member
|
/Linux-v5.4/tools/include/uapi/linux/ |
D | bpf.h | 81 __u32 attach_type; /* program attach type */ member 434 __u32 attach_type; member 478 __u32 attach_type; member
|
/Linux-v5.4/net/core/ |
D | sock_map.c | 74 ret = sock_map_prog_update(map, prog, attr->attach_type); in sock_map_get_from_fd()
|
D | filter.c | 6640 enum bpf_attach_type attach_type) in __sock_filter_check_attach_type() argument 6646 switch (attach_type) { in __sock_filter_check_attach_type() 6653 switch (attach_type) { in __sock_filter_check_attach_type() 6660 switch (attach_type) { in __sock_filter_check_attach_type() 6667 switch (attach_type) { in __sock_filter_check_attach_type()
|