Searched refs:prog_fd (Results 126 - 150 of 156) sorted by relevance

1234567

/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dcls_redirect.c376 int i, j, err, prog_fd; local
398 prog_fd = bpf_program__fd(prog);
419 err = bpf_prog_test_run_opts(prog_fd, &tattr);
H A Dsockopt.c1041 int sock_fd, err, prog_fd; local
1045 prog_fd = load_prog(test->insns, test->expected_attach_type);
1046 if (prog_fd < 0) {
1054 err = bpf_prog_attach(prog_fd, cgroup_fd, test->attach_type, 0);
1145 bpf_prog_detach2(prog_fd, cgroup_fd, test->attach_type);
1147 close(prog_fd);
H A Dsk_lookup.c89 int err, prog_fd; local
91 prog_fd = bpf_program__fd(reuseport_prog);
92 if (prog_fd < 0) {
93 errno = -prog_fd;
98 &prog_fd, sizeof(prog_fd));
H A Dbtf_skc_cls_ingress.c28 .prog_fd = bpf_program__fd(skel->progs.cls_ingress));
H A Dxdp_do_redirect.c43 DECLARE_LIBBPF_OPTS(bpf_tc_opts, opts, .handle = 1, .priority = 1, .prog_fd = fd);
H A Dvrf_socket_lookup.c109 .prog_fd = tc_prog_fd);
H A Dbtf.c4793 int i, err, prog_fd; local
4830 prog_fd = bpf_program__fd(prog);
4850 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
4882 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
6490 int prog_fd)
6501 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
6531 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
6572 __u32 cnt, int prog_fd)
6595 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
6669 err = bpf_prog_get_info_by_fd(prog_fd,
6489 test_get_finfo(const struct prog_info_raw_test *test, int prog_fd) argument
6570 test_get_linfo(const struct prog_info_raw_test *test, const void *patched_linfo, __u32 cnt, int prog_fd) argument
6792 int btf_fd = -1, prog_fd = -1, err = 0; local
[all...]
H A Dtc_opts.c601 tc_opts.prog_fd = fd3;
646 tc_opts.flags = tc_opts.prog_fd = tc_opts.prog_id = 0;
2310 tc_opts.prog_fd = fd2;
2363 tc_opts.flags = tc_opts.prog_fd = tc_opts.prog_id = 0;
2401 ASSERT_GE(fd, 0, "prog_fd");
2407 int err, ifindex, i, prog_fd, last_fd = -1; local
2418 prog_fd = generate_dummy_prog();
2419 if (!ASSERT_GE(prog_fd, 0, "dummy_prog"))
2421 err = bpf_prog_attach_opts(prog_fd, ifindex, target, &opta);
2426 last_fd = prog_fd;
[all...]
H A Dtest_tunnel.c370 .priority = 1, .prog_fd = igr_fd);
372 .priority = 1, .prog_fd = egr_fd);
H A Dtc_links.c564 tc_opts.prog_fd = bpf_program__fd(skel->progs.tc3);
606 tc_opts.flags = tc_opts.prog_fd = tc_opts.prog_id = 0;
1616 tc_opts.prog_fd = bpf_program__fd(skel->progs.tc5);
1663 tc_opts.flags = tc_opts.prog_fd = tc_opts.prog_id = 0;
1724 tc_opts.prog_fd = bpf_program__fd(skel->progs.tc3);
1766 tc_opts.flags = tc_opts.prog_fd = tc_opts.prog_id = 0;
1873 tc_opts.prog_fd = bpf_program__fd(skel->progs.tc5);
/linux-master/samples/hid/
H A Dhid_surface_dial.c107 args.prog_fd = bpf_program__fd(prog);
/linux-master/tools/perf/util/
H A Dbpf_lock_contention.c191 int prog_fd = bpf_program__fd(skel->progs.end_timestamp); local
193 bpf_prog_test_run_opts(prog_fd, &opts);
435 int prog_fd = bpf_program__fd(skel->progs.collect_lock_syms); local
437 bpf_prog_test_run_opts(prog_fd, &opts);
/linux-master/tools/testing/selftests/bpf/
H A Dtesting_helpers.c284 struct bpf_object **pobj, int *prog_fd)
315 *prog_fd = bpf_program__fd(prog);
283 bpf_prog_test_load(const char *file, enum bpf_prog_type type, struct bpf_object **pobj, int *prog_fd) argument
H A Dxsk.c428 int prog_fd; local
430 prog_fd = bpf_program__fd(prog);
431 return bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL);
H A Dxskxceiver.c2429 int prog_fd, insn_cnt = ARRAY_SIZE(insns); local
2432 prog_fd = bpf_prog_load(BPF_PROG_TYPE_XDP, NULL, "GPL", insns, insn_cnt, NULL);
2433 if (prog_fd < 0)
2436 err = bpf_xdp_attach(ifindex, prog_fd, flags, NULL);
2438 close(prog_fd);
2443 close(prog_fd);
H A Dtest_sysctl.c1479 int prog_fd; local
1481 if (bpf_prog_test_load(test->prog_file, BPF_PROG_TYPE_CGROUP_SYSCTL, &obj, &prog_fd)) {
1488 return prog_fd;
/linux-master/tools/bpf/bpftool/
H A Dcommon.c107 int prog_fd, err; local
129 prog_fd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
135 if (prog_fd < 0)
138 close(prog_fd);
336 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd, argument
359 if (bpf_prog_get_info_by_fd(prog_fd, &info, &info_len))
H A Dlink.c238 int err, prog_fd; local
240 prog_fd = bpf_prog_get_fd_by_id(prog_id);
241 if (prog_fd < 0)
242 return prog_fd;
245 err = bpf_prog_get_info_by_fd(prog_fd, info, &len);
248 close(prog_fd);
H A Dmain.h137 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd,
/linux-master/tools/testing/selftests/hid/
H A Dhid_bpf.c88 int prog_fd; member in struct:attach_prog_args
553 args.prog_fd = bpf_program__fd(prog);
753 int err, prog_fd; local
760 prog_fd = bpf_program__fd(self->skel->progs.hid_user_raw_request);
762 err = bpf_prog_test_run_opts(prog_fd, &tattrs);
/linux-master/kernel/bpf/
H A Dbpf_struct_ops.c599 int prog_fd, err; local
688 prog_fd = (int)(*(unsigned long *)(udata + moff));
690 if (!prog_fd)
693 prog = bpf_prog_get(prog_fd);
/linux-master/tools/lib/bpf/
H A Dgen_loader.c37 __u32 prog_fd[MAX_USED_PROGS]; member in struct:loader_stack
131 nr_progs_sz = offsetof(struct loader_stack, prog_fd[nr_progs]);
386 offsetof(struct bpf_prog_desc, prog_fd), 4,
387 stack_off(prog_fd[i]));
1028 /* remember prog_fd in the stack, if successful */
1030 stack_off(prog_fd[gen->nr_progs])));
H A Dlibbpf.c7317 const char *license, __u32 kern_version, int *prog_fd)
7387 *prog_fd = -1;
7448 *prog_fd = ret;
8349 int prog_fd; local
8354 prog_fd = bpf_program__fd(prog);
8356 *(unsigned long *)kern_data = prog_fd;
10604 int prog_fd, link_fd = -1, err; local
10615 prog_fd = bpf_program__fd(prog);
10616 if (prog_fd < 0) {
10634 link_fd = bpf_link_create(prog_fd, pf
7315 bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt, const char *license, __u32 kern_version, int *prog_fd) argument
11332 int err, link_fd, prog_fd; local
11753 int err = 0, link_fd, prog_fd; local
12279 int prog_fd, pfd; local
12352 int prog_fd, pfd; local
12418 int prog_fd, link_fd; local
12576 int prog_fd, link_fd; local
12620 int prog_fd, link_fd; local
[all...]
/linux-master/include/uapi/linux/
H A Dbpf.h357 * Run the eBPF program associated with the *prog_fd* a *repeat*
391 * the program referred to by *prog_fd*.
506 * The *prog_fd* must be a valid file descriptor associated with
866 * identified by *prog_fd* and only released when *prog_fd* is
1550 /* valid prog_fd to attach to bpf prog */
1600 __u32 prog_fd; member in struct:bpf_attr::__anon2599
1666 __u32 prog_fd; member in struct:bpf_attr::__anon2606
1705 __u32 prog_fd; /* eBPF program to attach */ member in union:bpf_attr::__anon2609::__anon2610
1810 __u32 prog_fd; member in struct:bpf_attr::__anon2629
[all...]
/linux-master/tools/include/uapi/linux/
H A Dbpf.h357 * Run the eBPF program associated with the *prog_fd* a *repeat*
391 * the program referred to by *prog_fd*.
506 * The *prog_fd* must be a valid file descriptor associated with
866 * identified by *prog_fd* and only released when *prog_fd* is
1550 /* valid prog_fd to attach to bpf prog */
1600 __u32 prog_fd; member in struct:bpf_attr::__anon3140
1666 __u32 prog_fd; member in struct:bpf_attr::__anon3147
1705 __u32 prog_fd; /* eBPF program to attach */ member in union:bpf_attr::__anon3150::__anon3151
1810 __u32 prog_fd; member in struct:bpf_attr::__anon3170
[all...]

Completed in 311 milliseconds

1234567