| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | sockopt.c | 28 enum bpf_attach_type attach_type; member 56 .attach_type = BPF_CGROUP_GETSOCKOPT, 68 .attach_type = BPF_CGROUP_GETSOCKOPT, 79 .attach_type = BPF_CGROUP_GETSOCKOPT, 100 .attach_type = BPF_CGROUP_GETSOCKOPT, 124 .attach_type = BPF_CGROUP_GETSOCKOPT, 150 .attach_type = BPF_CGROUP_GETSOCKOPT, 166 .attach_type = BPF_CGROUP_GETSOCKOPT, 193 .attach_type = BPF_CGROUP_GETSOCKOPT, 211 .attach_type = BPF_CGROUP_GETSOCKOPT, [all …]
|
| H A D | test_sysctl.c | 18 enum bpf_attach_type attach_type; member 39 .attach_type = 0, 50 .attach_type = BPF_CGROUP_SYSCTL, 61 .attach_type = BPF_CGROUP_SYSCTL, 82 .attach_type = BPF_CGROUP_SYSCTL, 103 .attach_type = BPF_CGROUP_SYSCTL, 126 .attach_type = BPF_CGROUP_SYSCTL, 142 .attach_type = BPF_CGROUP_SYSCTL, 163 .attach_type = BPF_CGROUP_SYSCTL, 190 .attach_type = BPF_CGROUP_SYSCTL, [all …]
|
| H A D | section_names.c | 16 enum bpf_attach_type attach_type; member 234 enum bpf_attach_type attach_type; in test_attach_type_by_name() local 237 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name() 245 CHECK(attach_type != test->expected_attach.attach_type, in test_attach_type_by_name() 247 attach_type, test->sec_name); in test_attach_type_by_name()
|
| H A 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()
|
| H A 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()
|
| H A D | bpf_verif_scale.c | 49 enum bpf_prog_type attach_type, in scale_test() argument 60 err = check_load(file, attach_type); in scale_test()
|
| H A D | sockmap_basic.c | 442 static void test_sockmap_progs_query(enum bpf_attach_type attach_type) in test_sockmap_progs_query() argument 456 if (attach_type == BPF_SK_MSG_VERDICT) in test_sockmap_progs_query() 461 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query() 467 err = bpf_prog_attach(verdict_fd, map_fd, attach_type, 0); in test_sockmap_progs_query() 472 err = bpf_prog_query(map_fd, attach_type, 0 /* query flags */, in test_sockmap_progs_query() 480 bpf_prog_detach2(verdict_fd, map_fd, attach_type); in test_sockmap_progs_query()
|
| H A D | sock_addr.c | 63 enum bpf_attach_type attach_type, 354 enum bpf_attach_type attach_type; member 378 enum bpf_attach_type attach_type, \ 390 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, \ 399 bpf_prog_detach(cgroup_fd, attach_type); \ 410 enum bpf_attach_type attach_type, \ 417 attach_type), \ 2612 skel = test->loadfn(cgroup_fd, test->attach_type, in test_sock_addr()
|
| H A 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()
|
| H A D | tc_opts.c | 2558 attr.query.attach_type = target; in test_tc_opts_query_target() 2569 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target() 2587 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target() 2601 attr.query.attach_type = target; in test_tc_opts_query_target() 2616 ASSERT_EQ(attr.query.attach_type, target, "attach_type"); in test_tc_opts_query_target() 2630 attr.query.attach_type = target; in test_tc_opts_query_target() 2645 ASSERT_EQ(attr.query.attach_type, targe in test_tc_opts_query_target() [all...] |
| H A D | fexit_bpf2bpf.c | 142 ASSERT_EQ(link_info.tracing.attach_type, in test_fexit_bpf2bpf_common()
|
| /linux/tools/bpf/bpftool/ |
| H A D | net.c | 640 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, in do_attach_detach_xdp() argument 647 if (attach_type == NET_ATTACH_TYPE_XDP_GENERIC) in do_attach_detach_xdp() 649 if (attach_type == NET_ATTACH_TYPE_XDP_DRIVER) in do_attach_detach_xdp() 651 if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) in do_attach_detach_xdp() 657 static int get_tcx_type(enum net_attach_type attach_type) in get_tcx_type() argument 659 switch (attach_type) { in get_tcx_type() 669 static int do_attach_tcx(int progfd, enum net_attach_type attach_type, int ifindex) in do_attach_tcx() argument 671 int type = get_tcx_type(attach_type); in do_attach_tcx() 676 static int do_detach_tcx(int targetfd, enum net_attach_type attach_type) in do_detach_tcx() argument 678 int type = get_tcx_type(attach_type); in do_detach_tcx() [all …]
|
| /linux/kernel/bpf/ |
| H A 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() 145 bool created, ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_prog_attach() 172 bool ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_release() 207 bool ingress = link->attach_type == BPF_TCX_INGRESS; in tcx_link_update() 263 link->attach_type, in tcx_link_fdinfo() 264 link->attach_type == BPF_TCX_INGRESS ? "ingress" : "egress"); in tcx_link_fdinfo() 279 info->tcx.attach_type = link->attach_type; in tcx_link_fill_info() 305 attr->link_create.attach_type); in tcx_link_init()
|
| H A D | net_namespace.c | 218 info->netns.attach_type = link->attach_type; in bpf_netns_link_fill_info() 232 link->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()
|
| H A D | syscall.c | 2582 enum bpf_prog_type *attach_type, bool attach_drv) in bpf_prog_get_ok() argument 2585 if (!attach_type) in bpf_prog_get_ok() 2588 if (prog->type != *attach_type) in bpf_prog_get_ok() 2596 static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type, in __bpf_prog_get() argument 2608 if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) in __bpf_prog_get() 3192 enum bpf_attach_type attach_type, bool sleepable) in bpf_link_init_sleepable() argument 3201 link->attach_type = attach_type; in bpf_link_init_sleepable() 3206 enum bpf_attach_type attach_type) in bpf_link_init() argument 3208 bpf_link_init_sleepable(link, type, ops, prog, attach_type, false); in bpf_link_init() 3537 link->attach_type, in bpf_tracing_link_show_fdinfo() [all …]
|
| H A D | trampoline.c | 724 enum bpf_attach_type attach_type) in cgroup_shim_alloc() argument 751 &bpf_shim_tramp_link_lops, p, attach_type); in cgroup_shim_alloc() 777 enum bpf_attach_type attach_type) in bpf_trampoline_link_cgroup_shim() argument 814 shim_link = cgroup_shim_alloc(prog, bpf_func, cgroup_atype, attach_type); in bpf_trampoline_link_cgroup_shim()
|
| /linux/include/linux/ |
| H A 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/net/core/ |
| H A D | sock_map.c | 81 ret = sock_map_prog_update(map, prog, NULL, NULL, attr->attach_type); in sock_map_get_from_fd() 110 ret = sock_map_prog_update(map, NULL, prog, NULL, attr->attach_type); in sock_map_prog_detach() 1576 ret = sock_map_prog_link_lookup(map, &pprog, NULL, attr->query.attach_type); in sock_map_bpf_prog_query() 1723 link->attach_type)); in sock_map_link_release() 1774 link->attach_type); in sock_map_link_update_prog() 1819 info->sockmap.attach_type = link->attach_type; in sock_map_link_fill_info() 1830 seq_printf(seq, "attach_type:\t%u\n", link->attach_type); in sock_map_link_show_fdinfo() 1846 enum bpf_attach_type attach_type; in sock_map_link_create() local 1867 attach_type = attr->link_create.attach_type; in sock_map_link_create() 1869 attach_type); in sock_map_link_create() [all …]
|
| /linux/include/uapi/linux/ |
| H A D | bpf.h | 113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member 305 * *attach_type* hook. 307 * The *attach_type* specifies the eBPF attachment point to 313 * or sock_ops type corresponding to the specified *attach_type*. 351 * hook specified by *attach_type*. The program must have been 462 * specified *attach_type* hook. 784 * *attach_type* hook and return a file descriptor handle for 1649 __u32 attach_type; 1707 __u32 attach_type; 1775 __u32 attach_type; /* attac 1645 __u32 attach_type; global() member 1703 __u32 attach_type; global() member 1771 __u32 attach_type; /* attach type */ global() member 6710 __u32 attach_type; global() member 6718 __u32 attach_type; global() member 6746 __u32 attach_type; global() member 6812 __u32 attach_type; global() member 6816 __u32 attach_type; global() member 6820 __u32 attach_type; global() member [all...] |
| /linux/tools/include/uapi/linux/ |
| H A D | bpf.h | 113 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member 305 * *attach_type* hook. 307 * The *attach_type* specifies the eBPF attachment point to 313 * or sock_ops type corresponding to the specified *attach_type*. 351 * hook specified by *attach_type*. The program must have been 462 * specified *attach_type* hook. 784 * *attach_type* hook and return a file descriptor handle for 1649 __u32 attach_type; 1707 __u32 attach_type; 1775 __u32 attach_type; /* attac 1645 __u32 attach_type; global() member 1703 __u32 attach_type; global() member 1771 __u32 attach_type; /* attach type */ global() member 6710 __u32 attach_type; global() member 6718 __u32 attach_type; global() member 6746 __u32 attach_type; global() member 6812 __u32 attach_type; global() member 6816 __u32 attach_type; global() member 6820 __u32 attach_type; global() member [all...] |
| /linux/tools/bpf/bpftool/Documentation/ |
| H A D | bpftool-link.rst | 81 cgroup_id 614 attach_type egress 92 "attach_type": "egress",
|
| /linux/Documentation/bpf/ |
| H A D | map_cgroup_storage.rst | 30 __u32 attach_type; 34 ``attach_type`` is the program's attach type. 84 .attach_type = type,
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | veristat.c | 838 [ATTACH_TYPE] = { "Attach type", {"attach_type", }, }, in parse_stat_id_var() 1151 enum bpf_attach_type *attach_type) in guess_prog_type_by_ctx_name() 1165 enum bpf_attach_type attach_type; in guess_prog_type_by_ctx_name() 1196 *attach_type = ctx_map[i].attach_type; in mask_unrelated_struct_ops_progs() 1273 enum bpf_attach_type attach_type; in fixup_obj() 1301 if (guess_prog_type_by_ctx_name(ctx_name, &prog_type, &attach_type) == 0) { 1303 bpf_program__set_expected_attach_type(prog, attach_type); in max_verifier_log_size() 2651 enum bpf_attach_type attach_type = 0; in parse_stats_csv() 2654 while ((type = libbpf_bpf_attach_type_str(attach_type))) { in parse_stats_csv() 1132 guess_prog_type_by_ctx_name(const char * ctx_name,enum bpf_prog_type * prog_type,enum bpf_attach_type * attach_type) guess_prog_type_by_ctx_name() argument 1146 enum bpf_attach_type attach_type; guess_prog_type_by_ctx_name() member 1254 enum bpf_attach_type attach_type; fixup_obj() local 2597 enum bpf_attach_type attach_type = 0; parse_stat_value() local [all...] |
| /linux/net/netfilter/ |
| H A D | nf_bpf_link.c | 229 attr->link_create.attach_type); in bpf_nf_link_attach()
|
| /linux/kernel/trace/ |
| H A D | bpf_trace.c | 2815 &bpf_kprobe_multi_link_lops, prog, attr->link_create.attach_type); in bpf_kprobe_multi_link_attach() 3270 &bpf_uprobe_multi_link_lops, prog, attr->link_create.attach_type); in bpf_uprobe_multi_link_attach()
|