Home
last modified time | relevance | path

Searched refs:prog_fd (Results 1 – 20 of 20) sorted by relevance

/third_party/libbpf/src/
Dskel_internal.h45 int prog_fd; member
277 static inline int skel_raw_tracepoint_open(const char *name, int prog_fd) in skel_raw_tracepoint_open() argument
279 const size_t attr_sz = offsetofend(union bpf_attr, raw_tracepoint.prog_fd); in skel_raw_tracepoint_open()
284 attr.raw_tracepoint.prog_fd = prog_fd; in skel_raw_tracepoint_open()
289 static inline int skel_link_create(int prog_fd, int target_fd, in skel_link_create() argument
296 attr.link_create.prog_fd = prog_fd; in skel_link_create()
313 int map_fd = -1, prog_fd = -1, key = 0, err; in bpf_load_and_run() local
341 err = prog_fd = skel_sys_bpf(BPF_PROG_LOAD, &attr, prog_load_attr_sz); in bpf_load_and_run()
342 if (prog_fd < 0) { in bpf_load_and_run()
349 attr.test.prog_fd = prog_fd; in bpf_load_and_run()
[all …]
Dbpf.h294 LIBBPF_API int bpf_prog_attach(int prog_fd, int attachable_fd,
296 LIBBPF_API int bpf_prog_attach_opts(int prog_fd, int attachable_fd,
300 LIBBPF_API int bpf_prog_detach2(int prog_fd, int attachable_fd,
329 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd,
348 int prog_fd; member
407 LIBBPF_API int bpf_raw_tracepoint_open(const char *name, int prog_fd);
428 LIBBPF_API int bpf_prog_bind_map(int prog_fd, int map_fd,
454 LIBBPF_API int bpf_prog_test_run_opts(int prog_fd,
Dbpf.c115 int prog_fd; in probe_memcg_account() local
124 prog_fd = sys_bpf_fd(BPF_PROG_LOAD, &attr, attr_sz); in probe_memcg_account()
125 if (prog_fd >= 0) { in probe_memcg_account()
126 close(prog_fd); in probe_memcg_account()
612 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, in bpf_prog_attach() argument
619 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); in bpf_prog_attach()
622 int bpf_prog_attach_opts(int prog_fd, int target_fd, in bpf_prog_attach_opts() argument
635 attr.attach_bpf_fd = prog_fd; in bpf_prog_attach_opts()
658 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_detach2() argument
666 attr.attach_bpf_fd = prog_fd; in bpf_prog_detach2()
[all …]
Dnetlink.c277 int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags, const struct bpf_xdp_attach_opts *opts) in bpf_xdp_attach() argument
290 err = __bpf_set_link_xdp_fd_replace(ifindex, prog_fd, old_prog_fd, flags); in bpf_xdp_attach()
614 int ret, ifindex, attach_point, prog_fd; in bpf_tc_attach() local
630 prog_fd = OPTS_GET(opts, prog_fd, 0); in bpf_tc_attach()
634 if (ifindex <= 0 || !prog_fd || prog_id) in bpf_tc_attach()
665 ret = tc_add_fd_and_name(&req, prog_fd); in bpf_tc_attach()
689 int ret, ifindex, attach_point, prog_fd; in __bpf_tc_detach() local
703 prog_fd = OPTS_GET(opts, prog_fd, 0); in __bpf_tc_detach()
707 if (ifindex <= 0 || flags || prog_fd || prog_id) in __bpf_tc_detach()
760 int ret, ifindex, attach_point, prog_fd; in bpf_tc_query() local
[all …]
Dgen_loader.c37 __u32 prog_fd[MAX_USED_PROGS]; member
131 nr_progs_sz = offsetof(struct loader_stack, prog_fd[nr_progs]); in bpf_gen__init()
386 offsetof(struct bpf_prog_desc, prog_fd), 4, in bpf_gen__finish()
387 stack_off(prog_fd[i])); in bpf_gen__finish()
1028 stack_off(prog_fd[gen->nr_progs]))); in bpf_gen__prog_load()
Dlibbpf.c5120 int prog_fd, link_fd, err; local
5122 prog_fd = bpf_prog_load(BPF_PROG_TYPE_TRACEPOINT, NULL, "GPL",
5124 if (prog_fd < 0)
5130 link_fd = bpf_link_create(prog_fd, -1, BPF_PERF_EVENT, NULL);
5135 close(prog_fd);
7123 const char *license, __u32 kern_version, int *prog_fd) argument
7187 *prog_fd = -1;
7248 *prog_fd = ret;
10116 int prog_fd, link_fd = -1, err; local
10126 prog_fd = bpf_program__fd(prog);
[all …]
Dlibbpf.h964 LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags,
996 int prog_fd; member
/third_party/ltp/testcases/kernel/syscalls/bpf/
Dbpf_prog04.c92 int map_fd, prog_fd; in run() local
95 prog_fd = load_prog(map_fd); in run()
97 if (prog_fd >= 0) { in run()
100 bpf_run_prog(prog_fd, msg, sizeof(MSG)); in run()
103 if (prog_fd >= 0) in run()
104 SAFE_CLOSE(prog_fd); in run()
Dbpf_prog01.c79 int map_fd, prog_fd; in run() local
84 prog_fd = load_prog(map_fd); in run()
86 bpf_run_prog(prog_fd, msg, sizeof(MSG)); in run()
87 SAFE_CLOSE(prog_fd); in run()
Dbpf_prog03.c117 int map_fd, prog_fd; in run() local
131 prog_fd = load_prog(map_fd); in run()
132 if (prog_fd == -1) in run()
137 bpf_run_prog(prog_fd, msg, sizeof(MSG)); in run()
138 SAFE_CLOSE(prog_fd); in run()
Dbpf_prog02.c79 int map_fd, prog_fd; in run() local
82 prog_fd = load_prog(map_fd); in run()
83 bpf_run_prog(prog_fd, msg, sizeof(MSG)); in run()
84 SAFE_CLOSE(prog_fd); in run()
Dbpf_prog05.c172 int prog_fd; in run() local
177 prog_fd = load_prog(); in run()
178 bpf_run_prog(prog_fd, msg, sizeof(MSG)); in run()
179 SAFE_CLOSE(prog_fd); in run()
Dbpf_common.c130 void bpf_run_prog(const int prog_fd, in bpf_run_prog() argument
137 &prog_fd, sizeof(prog_fd)); in bpf_run_prog()
Dbpf_common.h59 void bpf_run_prog(const int prog_fd,
/third_party/ltp/include/lapi/
Dbpf.h245 uint32_t prog_fd; member
293 uint32_t prog_fd; member
/third_party/libbpf/include/uapi/linux/
Dbpf.h1421 __u32 prog_fd; member
1477 __u32 prog_fd; member
1505 __u32 prog_fd; /* eBPF program to attach */ member
1568 __u32 prog_fd; member
/third_party/nghttp2/src/
Dshrpx_worker.cc1023 auto prog_fd = bpf_program__fd(prog); in create_quic_server_socket() local
1025 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &prog_fd, in create_quic_server_socket()
1026 static_cast<socklen_t>(sizeof(prog_fd))) == -1) { in create_quic_server_socket()
/third_party/libbpf/.github/actions/build-selftests/
Dvmlinux.h25433 __u32 prog_fd; member
25474 __u32 prog_fd; member
25495 __u32 prog_fd; member
25530 __u32 prog_fd; member
/third_party/libabigail/tests/data/test-diff-filter/
Dtest-PR27569-v1.abi55577 …<var-decl name="prog_fd" type-id="3f1a6b60" visibility="default" filepath="include/uapi/linux/bpf.…
55662 …<var-decl name="prog_fd" type-id="3f1a6b60" visibility="default" filepath="include/uapi/linux/bpf.…
Dtest-PR27569-v0.abi55548 …<var-decl name="prog_fd" type-id="3f1a6b60" visibility="default" filepath="include/uapi/linux/bpf.…
55633 …<var-decl name="prog_fd" type-id="3f1a6b60" visibility="default" filepath="include/uapi/linux/bpf.…