Home
last modified time | relevance | path

Searched refs:link_info (Results 1 – 19 of 19) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
Dxdp_link.c14 struct bpf_link_info link_info; in test_xdp_link() local
17 __u32 link_info_len = sizeof(link_info); in test_xdp_link()
122 memset(&link_info, 0, sizeof(link_info)); in test_xdp_link()
123 err = bpf_obj_get_info_by_fd(bpf_link__fd(link), &link_info, &link_info_len); in test_xdp_link()
127 CHECK(link_info.type != BPF_LINK_TYPE_XDP, "link_type", in test_xdp_link()
128 "got %u != exp %u\n", link_info.type, BPF_LINK_TYPE_XDP); in test_xdp_link()
129 CHECK(link_info.prog_id != id1, "link_prog_id", in test_xdp_link()
130 "got %u != exp %u\n", link_info.prog_id, id1); in test_xdp_link()
131 CHECK(link_info.xdp.ifindex != IFINDEX_LO, "link_ifindex", in test_xdp_link()
132 "got %u != exp %u\n", link_info.xdp.ifindex, IFINDEX_LO); in test_xdp_link()
[all …]
Dcheck_mtu.c41 struct bpf_link_info link_info; in test_check_mtu_xdp_attach() local
42 __u32 link_info_len = sizeof(link_info); in test_check_mtu_xdp_attach()
60 memset(&link_info, 0, sizeof(link_info)); in test_check_mtu_xdp_attach()
62 err = bpf_obj_get_info_by_fd(fd, &link_info, &link_info_len); in test_check_mtu_xdp_attach()
66 CHECK(link_info.type != BPF_LINK_TYPE_XDP, "link_type", in test_check_mtu_xdp_attach()
67 "got %u != exp %u\n", link_info.type, BPF_LINK_TYPE_XDP); in test_check_mtu_xdp_attach()
68 CHECK(link_info.xdp.ifindex != IFINDEX_LO, "link_ifindex", in test_check_mtu_xdp_attach()
69 "got %u != exp %u\n", link_info.xdp.ifindex, IFINDEX_LO); in test_check_mtu_xdp_attach()
Dfexit_bpf2bpf.c101 struct bpf_link_info link_info; in test_fexit_bpf2bpf_common() local
118 info_len = sizeof(link_info); in test_fexit_bpf2bpf_common()
119 memset(&link_info, 0, sizeof(link_info)); in test_fexit_bpf2bpf_common()
121 &link_info, &info_len); in test_fexit_bpf2bpf_common()
123 ASSERT_EQ(link_info.tracing.attach_type, in test_fexit_bpf2bpf_common()
126 ASSERT_EQ(link_info.tracing.target_obj_id, tgt_prog_id, "link_tgt_obj_id"); in test_fexit_bpf2bpf_common()
127 ASSERT_EQ(link_info.tracing.target_btf_id, btf_id, "link_tgt_btf_id"); in test_fexit_bpf2bpf_common()
Dbpf_obj_id.c301 struct bpf_link_info link_info; in test_bpf_obj_id() local
304 info_len = sizeof(link_info); in test_bpf_obj_id()
305 memset(&link_info, 0, info_len); in test_bpf_obj_id()
325 err = bpf_obj_get_info_by_fd(link_fd, &link_info, &info_len); in test_bpf_obj_id()
326 cmp_res = memcmp(&link_info, &link_infos[i], in test_bpf_obj_id()
328 CHECK(err || info_len != sizeof(link_info) || cmp_res, in test_bpf_obj_id()
Dbpf_iter.c623 opts.link_info = &linfo; in test_bpf_hash_map()
741 opts.link_info = &linfo; in test_bpf_percpu_hash_map()
812 opts.link_info = &linfo; in test_bpf_array_map()
908 opts.link_info = &linfo; in test_bpf_percpu_array_map()
970 opts.link_info = &linfo; in test_bpf_sk_storage_delete()
1089 opts.link_info = &linfo; in test_bpf_sk_storage_map()
1142 opts.link_info = &linfo; in test_rdonly_buf_out_of_bound()
Dsockmap_basic.c245 opts.link_info = &linfo; in test_sockmap_copy()
/tools/perf/util/
Dbpf_counter.h97 struct bpf_link_info link_info = { .id = 0, }; in bpf_link_get_id() local
98 __u32 link_info_len = sizeof(link_info); in bpf_link_get_id()
100 bpf_obj_get_info_by_fd(fd, &link_info, &link_info_len); in bpf_link_get_id()
101 return link_info.id; in bpf_link_get_id()
106 struct bpf_link_info link_info = { .id = 0, }; in bpf_link_get_prog_id() local
107 __u32 link_info_len = sizeof(link_info); in bpf_link_get_prog_id()
109 bpf_obj_get_info_by_fd(fd, &link_info, &link_info_len); in bpf_link_get_prog_id()
110 return link_info.prog_id; in bpf_link_get_prog_id()
Dnamespaces.h26 struct perf_ns_link_info link_info[]; member
Dnamespaces.c53 memcpy(namespaces->link_info, event->link_info, link_info_size); in namespaces__new()
Devent.c165 ns_link_info = event->namespaces.link_info; in perf_event__fprintf_namespaces()
Dsession.c724 struct perf_ns_link_info *ns = &event->namespaces.link_info[i]; in perf_event__namespaces_swap()
731 swap_sample_id_all(event, &event->namespaces.link_info[i]); in perf_event__namespaces_swap()
Dhist.c706 .dev = ns ? ns->link_info[CGROUP_NS_INDEX].dev : 0, in __hists__add_entry()
707 .ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0, in __hists__add_entry()
Dsynthetic-events.c242 ns_link_info = event->namespaces.link_info; in perf_event__synthesize_namespaces()
/tools/bpf/bpftool/
Diter.c43 iter_opts.link_info = &linfo; in do_pin()
/tools/lib/bpf/
Dxsk.c678 struct bpf_link_info link_info; in xsk_link_lookup() local
705 memset(&link_info, 0, link_len); in xsk_link_lookup()
706 err = bpf_obj_get_info_by_fd(fd, &link_info, &link_len); in xsk_link_lookup()
712 if (link_info.type == BPF_LINK_TYPE_XDP) { in xsk_link_lookup()
713 if (link_info.xdp.ifindex == ifindex) { in xsk_link_lookup()
716 *prog_id = link_info.prog_id; in xsk_link_lookup()
Dlibbpf.h349 union bpf_iter_link_info *link_info; member
Dlibbpf.c9675 link_create_opts.iter_info = OPTS_GET(opts, link_info, (void *)0); in bpf_program__attach_iter()
/tools/lib/perf/include/perf/
Devent.h57 struct perf_ns_link_info link_info[]; member
/tools/testing/selftests/net/
Dipsec.c279 struct rtattr *link_info, *info_data; in veth_add() local
295 link_info = rtattr_begin(&req.nh, sizeof(req), IFLA_LINKINFO); in veth_add()
296 if (!link_info) in veth_add()
310 rtattr_end(&req.nh, link_info); in veth_add()