/linux-master/tools/testing/selftests/bpf/ |
H A D | get_cgroup_id_user.c | 52 int err, bytes, efd, prog_fd, pmu_fd; local 72 err = bpf_prog_test_load(file, BPF_PROG_TYPE_TRACEPOINT, &obj, &prog_fd); 124 err = ioctl(pmu_fd, PERF_EVENT_IOC_SET_BPF, prog_fd);
|
H A D | testing_helpers.h | 18 struct bpf_object **pobj, int *prog_fd);
|
H A D | test_sockmap.c | 66 int prog_fd[11]; variable 963 err = bpf_prog_attach(prog_fd[0], map_fd[0], 968 prog_fd[0], map_fd[0], err, strerror(errno)); 973 err = bpf_prog_attach(prog_fd[1], map_fd[0], 984 err = bpf_prog_attach(prog_fd[0], map_fd[8], 989 prog_fd[0], map_fd[8], err, strerror(errno)); 994 err = bpf_prog_attach(prog_fd[2], map_fd[8], 1004 err = bpf_prog_attach(prog_fd[3], cg_fd, BPF_CGROUP_SOCK_OPS, 0); 1020 tx_prog_fd = prog_fd[4]; 1022 tx_prog_fd = prog_fd[ [all...] |
/linux-master/tools/perf/util/ |
H A D | bpf_counter.h | 123 static inline int bperf_trigger_reading(int prog_fd, int cpu) argument 133 return bpf_prog_test_run_opts(prog_fd, &opts);
|
H A D | bpf_counter.c | 108 int prog_fd; local 111 prog_fd = bpf_prog_get_fd_by_id(prog_id); 112 if (prog_fd < 0) { 118 close(prog_fd); 134 prog_name = bpf_target_prog_name(prog_fd); 141 err = bpf_program__set_attach_target(prog, prog_fd, prog_name); 159 close(prog_fd); 165 close(prog_fd);
|
/linux-master/tools/lib/bpf/ |
H A D | bpf.c | 115 int prog_fd; local 127 prog_fd = sys_bpf_fd(BPF_PROG_LOAD, &attr, attr_sz); 128 if (prog_fd >= 0) { 129 close(prog_fd); 629 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, argument 636 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); 639 int bpf_prog_attach_opts(int prog_fd, int target, enum bpf_attach_type type, argument 660 attr.attach_bpf_fd = prog_fd; 677 int bpf_prog_detach_opts(int prog_fd, int target, enum bpf_attach_type type, argument 698 attr.attach_bpf_fd = prog_fd; 719 bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) argument 724 bpf_link_create(int prog_fd, int target_fd, enum bpf_attach_type attach_type, const struct bpf_link_create_opts *opts) argument 978 bpf_prog_test_run_opts(int prog_fd, struct bpf_test_run_opts *opts) argument 1158 bpf_prog_get_info_by_fd(int prog_fd, struct bpf_prog_info *info, __u32 *info_len) argument 1178 bpf_raw_tracepoint_open_opts(int prog_fd, struct bpf_raw_tp_opts *opts) argument 1196 bpf_raw_tracepoint_open(const char *name, int prog_fd) argument 1296 bpf_prog_bind_map(int prog_fd, int map_fd, const struct bpf_prog_bind_opts *opts) argument [all...] |
H A D | netlink.c | 322 int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags, const struct bpf_xdp_attach_opts *opts) argument 335 err = __bpf_set_link_xdp_fd_replace(ifindex, prog_fd, old_prog_fd, flags); 721 int ret, ifindex, attach_point, prog_fd; local 737 prog_fd = OPTS_GET(opts, prog_fd, 0); 741 if (ifindex <= 0 || !prog_fd || prog_id) 772 ret = tc_add_fd_and_name(&req, prog_fd); 797 int ret, ifindex, attach_point, prog_fd; local 811 prog_fd = OPTS_GET(opts, prog_fd, 868 int ret, ifindex, attach_point, prog_fd; local [all...] |
/linux-master/samples/bpf/ |
H A D | test_cgrp2_sock.c | 212 int cg_fd, prog_fd, ret; local 268 prog_fd = prog_load(idx, mark, prio); 269 if (prog_fd < 0) { 276 ret = bpf_prog_attach(prog_fd, cg_fd,
|
H A D | xdp_tx_iptunnel_user.c | 165 int opt, prog_fd; local 272 prog_fd = bpf_program__fd(prog); 293 if (bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL) < 0) { 298 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | ksyms_module.c | 27 err = bpf_prog_test_run_opts(skel->progs.load.prog_fd, &topts);
|
H A D | check_mtu.c | 85 int err, prog_fd = bpf_program__fd(prog); local 94 err = bpf_prog_test_run_opts(prog_fd, &topts); 138 int err, prog_fd = bpf_program__fd(prog); local 147 err = bpf_prog_test_run_opts(prog_fd, &topts);
|
H A D | bpf_nf.c | 56 int prog_fd, err; local 97 prog_fd = bpf_program__fd(skel->progs.nf_xdp_ct_test); 99 prog_fd = bpf_program__fd(skel->progs.nf_skb_ct_test); 101 err = bpf_prog_test_run_opts(prog_fd, &topts);
|
H A D | crypto_sanity.c | 143 tc_attach_enc.prog_fd = bpf_program__fd(skel->progs.encrypt_sanity); 163 tc_attach_enc.flags = tc_attach_enc.prog_fd = tc_attach_enc.prog_id = 0; 168 tc_attach_dec.prog_fd = bpf_program__fd(skel->progs.decrypt_sanity); 188 tc_attach_dec.flags = tc_attach_dec.prog_fd = tc_attach_dec.prog_id = 0;
|
H A D | decap_sanity.c | 48 tc_attach.prog_fd = bpf_program__fd(skel->progs.decap_sanity);
|
H A D | mptcp.c | 174 int client_fd, prog_fd, map_fd, err; local 185 prog_fd = bpf_program__fd(sock_skel->progs._sockops); 187 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0);
|
H A D | token.c | 638 int err, token_fd = -1, prog_fd = -1; local 666 prog_fd = bpf_prog_load(BPF_PROG_TYPE_XDP, "token_prog", "GPL", 668 if (!ASSERT_GT(prog_fd, 0, "prog_fd")) { 676 prog_fd = bpf_prog_load(BPF_PROG_TYPE_XDP, "token_prog", "GPL", 678 if (!ASSERT_EQ(prog_fd, -EPERM, "prog_fd_eperm")) { 690 prog_fd = bpf_prog_load(BPF_PROG_TYPE_XDP, "token_prog", "GPL", 692 if (!ASSERT_EQ(prog_fd, -EPERM, "prog_fd_eperm")) { 700 prog_fd = bpf_prog_load(BPF_PROG_TYPE_XDP, "token_prog", "GPL", 702 if (!ASSERT_EQ(prog_fd, [all...] |
H A D | ctx_rewrite.c | 701 int err = 0, prog_fd = 0; local 719 prog_fd = bpf_prog_load(pinfo->prog_type, NULL, "GPL", 721 if (prog_fd < 0) { 729 err = get_xlated_program(prog_fd, &buf, &cnt); 751 if (prog_fd) 752 close(prog_fd);
|
H A D | migrate_reuseport.c | 219 int i, err, prog_fd, reuseport = 1, qlen = QLEN; local 221 prog_fd = bpf_program__fd(skel->progs.migrate_reuseport); 247 &prog_fd, sizeof(prog_fd));
|
H A D | tcp_custom_syncookie.c | 54 .prog_fd = bpf_program__fd(skel->progs.tcp_custom_syncookie));
|
/linux-master/tools/testing/selftests/hid/progs/ |
H A D | hid.c | 8 int prog_fd; member in struct:attach_prog_args 62 ctx->prog_fd,
|
H A D | hid_bpf_helpers.h | 89 extern int hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, u32 flags) __ksym;
|
/linux-master/drivers/hid/bpf/ |
H A D | hid_bpf_dispatch.c | 206 static int do_hid_bpf_attach_prog(struct hid_device *hdev, int prog_fd, struct bpf_prog *prog, argument 224 fd = __hid_bpf_attach_prog(hdev, prog_type, prog_fd, prog, flags); 268 * hid_bpf_attach_prog - Attach the given @prog_fd to the given HID device 271 * @prog_fd: an fd in the user process representing the program to attach 280 hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, __u32 flags) argument 303 prog = bpf_prog_get(prog_fd); 309 fd = do_hid_bpf_attach_prog(hdev, prog_fd, prog, flags);
|
H A D | hid_bpf_jmp_table.c | 308 static int hid_bpf_insert_prog(int prog_fd, struct bpf_prog *prog) argument 335 err = skel_map_update_elem(map_fd, &index, &prog_fd, 0); 398 int prog_fd, struct bpf_prog *prog, __u32 flags) 428 prog_table_idx = hid_bpf_insert_prog(prog_fd, prog); 397 __hid_bpf_attach_prog(struct hid_device *hdev, enum hid_bpf_prog_type prog_type, int prog_fd, struct bpf_prog *prog, __u32 flags) argument
|
/linux-master/tools/testing/selftests/hid/ |
H A D | hid_bpf.c | 93 int prog_fd; member in struct:attach_prog_args 569 args.prog_fd = bpf_program__fd(prog); 767 int err, prog_fd; local 776 prog_fd = bpf_program__fd(self->skel->progs.hid_user_input_report); 783 err = bpf_prog_test_run_opts(prog_fd, &tattrs); 812 int err, cond_err, prog_fd; local 822 prog_fd = bpf_program__fd(self->skel->progs.hid_user_output_report); 830 err = bpf_prog_test_run_opts(prog_fd, &tattrs); 861 int err, prog_fd; local 868 prog_fd [all...] |
/linux-master/samples/hid/ |
H A D | hid_mouse.c | 137 args.prog_fd = bpf_program__fd(prog);
|