/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | xfrm_info.c | 75 .prog_fd = igr_fd); 77 .prog_fd = egr_fd);
|
H A D | sockopt.c | 1075 int sock_fd, err, prog_fd, link_fd = -1; local 1082 prog_fd = load_prog(test->insns, prog_type, test->expected_attach_type); 1083 if (prog_fd < 0) { 1092 err = bpf_link_create(prog_fd, cgroup_fd, test->attach_type, NULL); 1095 err = bpf_prog_attach(prog_fd, cgroup_fd, test->attach_type, 0); 1191 bpf_prog_detach2(prog_fd, cgroup_fd, test->attach_type); 1194 close(prog_fd);
|
H A D | cls_redirect.c | 344 int i, j, err, prog_fd; local 366 prog_fd = bpf_program__fd(prog); 387 err = bpf_prog_test_run_opts(prog_fd, &tattr);
|
H A D | fib_lookup.c | 301 int prog_fd, err, ret, i; local 316 prog_fd = bpf_program__fd(skel->progs.fib_lookup); 342 err = bpf_prog_test_run_opts(prog_fd, &run_opts);
|
H A D | sk_lookup.c | 89 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 D | sock_addr.c | 97 int prog_fd, err; local 106 prog_fd = bpf_program__fd(prog); 107 err = bpf_prog_test_run_opts(prog_fd, &topts); 386 int prog_fd = -1; \ 391 prog_fd = bpf_program__fd(skel->progs.prog_name); \ 392 if (!ASSERT_GT(prog_fd, 0, "prog_fd")) \ 394 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, \ 402 if (prog_fd > 0) \
|
H A D | btf_skc_cls_ingress.c | 28 .prog_fd = bpf_program__fd(skel->progs.cls_ingress));
|
H A D | vrf_socket_lookup.c | 109 .prog_fd = tc_prog_fd);
|
H A D | xdp_do_redirect.c | 43 DECLARE_LIBBPF_OPTS(bpf_tc_opts, opts, .handle = 1, .priority = 1, .prog_fd = fd);
|
H A D | btf.c | 4793 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 D | tc_opts.c | 601 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 D | test_tunnel.c | 370 .priority = 1, .prog_fd = igr_fd); 372 .priority = 1, .prog_fd = egr_fd);
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | syscall.c | 23 int prog_fd; member in struct:args 156 ctx->prog_fd = ret;
|
/linux-master/tools/bpf/bpftool/ |
H A D | btf_dumper.c | 36 int prog_fd = -1, func_sig_len; local 56 prog_fd = bpf_prog_get_fd_by_id(prog_id); 57 if (prog_fd < 0) 60 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len); 73 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len); 102 if (prog_fd >= 0) 103 close(prog_fd);
|
H A D | common.c | 107 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); 408 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd, argument 431 if (bpf_prog_get_info_by_fd(prog_fd, &info, &info_len))
|
H A D | link.c | 238 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 D | main.h | 137 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd,
|
/linux-master/samples/hid/ |
H A D | hid_surface_dial.c | 107 args.prog_fd = bpf_program__fd(prog);
|
/linux-master/tools/perf/util/ |
H A D | bpf_lock_contention.c | 191 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 D | testing_helpers.c | 284 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 D | xsk.c | 428 int prog_fd; local 430 prog_fd = bpf_program__fd(prog); 431 return bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL);
|
/linux-master/kernel/bpf/ |
H A D | bpf_struct_ops.c | 599 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 D | gen_loader.c | 37 __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])));
|
/linux-master/include/uapi/linux/ |
H A D | bpf.h | 357 * 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 1552 /* valid prog_fd to attach to bpf prog */ 1602 __u32 prog_fd; member in struct:bpf_attr::__anon2894 1668 __u32 prog_fd; member in struct:bpf_attr::__anon2901 1709 __u32 prog_fd; /* eBPF program to attach */ member in union:bpf_attr::__anon2904::__anon2905 1814 __u32 prog_fd; member in struct:bpf_attr::__anon2924 [all...] |
/linux-master/tools/include/uapi/linux/ |
H A D | bpf.h | 357 * 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 1552 /* valid prog_fd to attach to bpf prog */ 1602 __u32 prog_fd; member in struct:bpf_attr::__anon3504 1668 __u32 prog_fd; member in struct:bpf_attr::__anon3511 1709 __u32 prog_fd; /* eBPF program to attach */ member in union:bpf_attr::__anon3514::__anon3515 1814 __u32 prog_fd; member in struct:bpf_attr::__anon3534 [all...] |