Home
last modified time | relevance | path

Searched refs:link_fd (Results 1 – 14 of 14) sorted by relevance

/linux/tools/testing/selftests/bpf/prog_tests/
A Datomics.c11 int link_fd; in test_add() local
36 close(link_fd); in test_add()
43 int link_fd; in test_sub() local
69 close(link_fd); in test_sub()
76 int link_fd; in test_and() local
97 close(link_fd); in test_and()
104 int link_fd; in test_or() local
126 close(link_fd); in test_or()
133 int link_fd; in test_xor() local
161 int link_fd; in test_cmpxchg() local
[all …]
A Dperf_link.c31 int pfd = -1, link_fd = -1, err; in serial_test_perf_link() local
51 link_fd = bpf_link_create(bpf_program__fd(skel->progs.handler), pfd, in serial_test_perf_link()
53 if (!ASSERT_GE(link_fd, 0, "link_fd")) in serial_test_perf_link()
57 err = bpf_obj_get_info_by_fd(link_fd, &info, &info_len); in serial_test_perf_link()
72 close(link_fd); in serial_test_perf_link()
73 link_fd = -1; in serial_test_perf_link()
85 if (link_fd >= 0) in serial_test_perf_link()
86 close(link_fd); in serial_test_perf_link()
A Dfexit_stress.c12 int link_fd[CNT] = {}; in test_fexit_stress() local
54 link_fd[i] = bpf_raw_tracepoint_open(NULL, fexit_fd[i]); in test_fexit_stress()
55 if (CHECK(link_fd[i] < 0, "fexit attach failed", in test_fexit_stress()
56 "prog %d failed: %d err %d\n", i, link_fd[i], errno)) in test_fexit_stress()
71 if (link_fd[i]) in test_fexit_stress()
72 close(link_fd[i]); in test_fexit_stress()
A Dfentry_test.c10 int link_fd; in fentry_test() local
18 link_fd = fentry_test_lskel__test1__attach(fentry_skel); in fentry_test()
19 if (!ASSERT_LT(link_fd, 0, "fentry_attach_link")) in fentry_test()
A Dfexit_test.c10 int link_fd; in fexit_test() local
18 link_fd = fexit_test_lskel__test1__attach(fexit_skel); in fexit_test()
19 if (!ASSERT_LT(link_fd, 0, "fexit_attach_link")) in fexit_test()
A Dbpf_obj_id.c302 int link_fd, cmp_res; in serial_test_bpf_obj_id() local
307 link_fd = bpf_link_get_fd_by_id(next_id); in serial_test_bpf_obj_id()
308 if (link_fd < 0 && errno == ENOENT) in serial_test_bpf_obj_id()
311 if (CHECK(link_fd < 0, "get-link-fd(next_id)", in serial_test_bpf_obj_id()
313 link_fd, next_id, errno)) in serial_test_bpf_obj_id()
325 err = bpf_obj_get_info_by_fd(link_fd, &link_info, &info_len); in serial_test_bpf_obj_id()
334 close(link_fd); in serial_test_bpf_obj_id()
/linux/tools/lib/bpf/
A Dxsk.c76 int link_fd; member
516 int link_fd; in xsk_create_bpf_link() local
536 if (link_fd < 0) { in xsk_create_bpf_link()
538 return link_fd; in xsk_create_bpf_link()
541 ctx->link_fd = link_fd; in xsk_create_bpf_link()
714 *link_fd = fd; in xsk_link_lookup()
744 if (link_fd >= 0) in xsk_probe_bpf_link()
760 if (link_fd >= 0) { in xsk_probe_bpf_link()
762 close(link_fd); in xsk_probe_bpf_link()
828 close(ctx->link_fd); in xsk_init_xdp_res()
[all …]
A Dbpf.c763 int bpf_link_detach(int link_fd) in bpf_link_detach() argument
769 attr.link_detach.link_fd = link_fd; in bpf_link_detach()
775 int bpf_link_update(int link_fd, int new_prog_fd, in bpf_link_update() argument
785 attr.link_update.link_fd = link_fd; in bpf_link_update()
794 int bpf_iter_create(int link_fd) in bpf_iter_create() argument
800 attr.iter_create.link_fd = link_fd; in bpf_iter_create()
A Dbpf.h193 LIBBPF_API int bpf_link_detach(int link_fd);
202 LIBBPF_API int bpf_link_update(int link_fd, int new_prog_fd,
205 LIBBPF_API int bpf_iter_create(int link_fd);
A Dlibbpf.c4627 if (link_fd >= 0) in probe_perf_link()
4628 close(link_fd); in probe_perf_link()
9456 if (link_fd < 0) { in bpf_program__attach_perf_event_opts()
9491 if (link_fd >= 0) in bpf_program__attach_perf_event_opts()
9492 close(link_fd); in bpf_program__attach_perf_event_opts()
10231 if (link_fd < 0) { in bpf_program__attach_fd()
10232 link_fd = -errno; in bpf_program__attach_fd()
10239 link->fd = link_fd; in bpf_program__attach_fd()
10322 if (link_fd < 0) { in bpf_program__attach_iter()
10323 link_fd = -errno; in bpf_program__attach_iter()
[all …]
/linux/tools/perf/util/
A Dbpf_counter.c394 int link_fd, diff_map_fd, err; in bperf_reload_leader_program() local
416 link_fd = bpf_link__fd(link); in bperf_reload_leader_program()
418 entry->link_id = bpf_link_get_id(link_fd); in bperf_reload_leader_program()
/linux/tools/include/uapi/linux/
A Dbpf.h1470 __u32 link_fd; /* link fd */ member
1480 __u32 link_fd; member
1488 __u32 link_fd; member
/linux/include/uapi/linux/
A Dbpf.h1470 __u32 link_fd; /* link fd */ member
1480 __u32 link_fd; member
1488 __u32 link_fd; member
/linux/kernel/bpf/
A Dsyscall.c4340 link = bpf_link_get_from_fd(attr->link_update.link_fd); in link_update()
4377 #define BPF_LINK_DETACH_LAST_FIELD link_detach.link_fd
4387 link = bpf_link_get_from_fd(attr->link_detach.link_fd); in link_detach()
4519 link = bpf_link_get_from_fd(attr->iter_create.link_fd); in bpf_iter_create()

Completed in 68 milliseconds