Home
last modified time | relevance | path

Searched refs:attach_type (Results 1 – 22 of 22) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
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 = BPF_CGROUP_GETSOCKOPT,
[all …]
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()
202 attach_type, test->sec_name); in test_attach_type_by_name()
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()
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()
Dbpf_verif_scale.c38 enum bpf_prog_type attach_type; member
114 err = check_load(test->file, test->attach_type); in test_bpf_verif_scale()
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()
Dflow_dissector_reattach.c512 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()
Dfexit_bpf2bpf.c123 ASSERT_EQ(link_info.tracing.attach_type, in test_fexit_bpf2bpf_common()
/tools/bpf/bpftool/
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()
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
399 attach_type = parse_attach_type(argv[1]); in do_attach()
400 if (attach_type == __MAX_BPF_ATTACH_TYPE) { in do_attach()
[all …]
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()
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
191 if (attach_type < ARRAY_SIZE(attach_type_name)) in show_link_attach_type_plain()
192 printf("attach_type %s ", attach_type_name[attach_type]); in show_link_attach_type_plain()
[all …]
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], strerror(-err)); in do_attach()
[all …]
Dprog.c944 enum bpf_attach_type *attach_type, in parse_attach_detach_args() argument
954 *attach_type = parse_attach_type(*argv); in parse_attach_detach_args()
955 if (*attach_type == __MAX_BPF_ATTACH_TYPE) { in parse_attach_detach_args()
960 if (*attach_type == BPF_FLOW_DISSECTOR) { in parse_attach_detach_args()
978 enum bpf_attach_type attach_type; in do_attach() local
983 &progfd, &attach_type, &mapfd); in do_attach()
987 err = bpf_prog_attach(progfd, mapfd, attach_type, 0); in do_attach()
1000 enum bpf_attach_type attach_type; in do_detach() local
1005 &progfd, &attach_type, &mapfd); in do_detach()
1009 err = bpf_prog_detach2(progfd, mapfd, attach_type); in do_detach()
/tools/testing/selftests/bpf/
Dtest_sysctl.c32 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 …]
Dtest_sock.c31 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()
Dtest_sock_addr.c69 enum bpf_attach_type attach_type; member
1321 err = bpf_prog_attach(progfd, cgfd, test->attach_type, in run_test_case()
1333 switch (test->attach_type) { in run_test_case()
1373 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
/tools/bpf/bpftool/Documentation/
Dbpftool-link.rst83 cgroup_id 614 attach_type egress
94 "attach_type": "egress",
/tools/include/uapi/linux/
Dbpf.h87 __u32 attach_type; /* program attach type (enum bpf_attach_type) */ member
1350 __u32 attach_type; member
1401 __u32 attach_type; member
1443 __u32 attach_type; /* attach type */ member
5638 __u32 attach_type; member
5644 __u32 attach_type; member
5657 __u32 attach_type; member
/tools/lib/bpf/
Dbpf.c640 attr.attach_type = type; in bpf_prog_attach_xattr()
655 attr.attach_type = type; in bpf_prog_detach()
669 attr.attach_type = type; in bpf_prog_detach2()
676 enum bpf_attach_type attach_type, in bpf_link_create() argument
700 attr.link_create.attach_type = attach_type; in bpf_link_create()
708 switch (attach_type) { in bpf_link_create()
779 attr.query.attach_type = type; in bpf_prog_query()
Dbpf.h190 enum bpf_attach_type attach_type,
Dlibbpf.h183 enum bpf_attach_type *attach_type);
185 enum bpf_attach_type attach_type);
Dlibbpf_internal.h288 void btf_get_kernel_prefix_kind(enum bpf_attach_type attach_type,
Dlibbpf.c8117 static char *libbpf_get_type_names(bool attach_type) in libbpf_get_type_names() argument
8129 if (attach_type && !section_defs[i].is_attachable) in libbpf_get_type_names()
8308 void btf_get_kernel_prefix_kind(enum bpf_attach_type attach_type, in btf_get_kernel_prefix_kind() argument
8311 switch (attach_type) { in btf_get_kernel_prefix_kind()
8348 enum bpf_attach_type attach_type) in find_attach_btf_id() argument
8353 btf_get_kernel_prefix_kind(attach_type, &prefix, &kind); in find_attach_btf_id()
8358 enum bpf_attach_type attach_type) in libbpf_find_vmlinux_btf_id() argument
8370 err = find_attach_btf_id(btf, name, attach_type); in libbpf_find_vmlinux_btf_id()
8416 enum bpf_attach_type attach_type, in find_kernel_btf_id() argument
8421 ret = find_attach_btf_id(obj->btf_vmlinux, attach_name, attach_type); in find_kernel_btf_id()
[all …]