Searched refs:prog_fd (Results 101 - 125 of 156) sorted by relevance

1234567

/linux-master/samples/bpf/
H A Dtest_cgrp2_sock.c212 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 Dxdp_tx_iptunnel_user.c165 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 Dksyms_module.c27 err = bpf_prog_test_run_opts(skel->progs.load.prog_fd, &topts);
H A Dcheck_mtu.c85 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 Dbpf_nf.c56 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 Ddecap_sanity.c48 tc_attach.prog_fd = bpf_program__fd(skel->progs.decap_sanity);
H A Dmptcp.c158 int client_fd, prog_fd, map_fd, err; local
169 prog_fd = bpf_program__fd(sock_skel->progs._sockops);
171 err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0);
H A Dtoken.c638 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 Dctx_rewrite.c701 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 Dfib_lookup.c233 int prog_fd, err, ret, i; local
248 prog_fd = bpf_program__fd(skel->progs.fib_lookup);
271 err = bpf_prog_test_run_opts(prog_fd, &run_opts);
H A Dmigrate_reuseport.c219 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 Dtcp_custom_syncookie.c54 .prog_fd = bpf_program__fd(skel->progs.tcp_custom_syncookie));
H A Dxfrm_info.c75 .prog_fd = igr_fd);
77 .prog_fd = egr_fd);
/linux-master/tools/testing/selftests/bpf/
H A Dtesting_helpers.h18 struct bpf_object **pobj, int *prog_fd);
H A Dtest_sockmap.c66 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/lib/bpf/
H A Dbpf.c115 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
976 bpf_prog_test_run_opts(int prog_fd, struct bpf_test_run_opts *opts) argument
1156 bpf_prog_get_info_by_fd(int prog_fd, struct bpf_prog_info *info, __u32 *info_len) argument
1176 bpf_raw_tracepoint_open(const char *name, int prog_fd) argument
1283 bpf_prog_bind_map(int prog_fd, int map_fd, const struct bpf_prog_bind_opts *opts) argument
[all...]
H A Dnetlink.c322 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/tools/testing/selftests/hid/progs/
H A Dhid.c8 int prog_fd; member in struct:attach_prog_args
62 ctx->prog_fd,
H A Dhid_bpf_helpers.h89 extern int hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, u32 flags) __ksym;
/linux-master/tools/perf/util/
H A Dbpf_counter.c108 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/drivers/hid/bpf/
H A Dhid_bpf_dispatch.c248 static int do_hid_bpf_attach_prog(struct hid_device *hdev, int prog_fd, struct bpf_prog *prog, argument
266 fd = __hid_bpf_attach_prog(hdev, prog_type, prog_fd, prog, flags);
285 * hid_bpf_attach_prog - Attach the given @prog_fd to the given HID device
288 * @prog_fd: an fd in the user process representing the program to attach
297 hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, __u32 flags) argument
320 prog = bpf_prog_get(prog_fd);
326 fd = do_hid_bpf_attach_prog(hdev, prog_fd, prog, flags);
H A Dhid_bpf_jmp_table.c308 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/samples/hid/
H A Dhid_mouse.c137 args.prog_fd = bpf_program__fd(prog);
/linux-master/tools/testing/selftests/bpf/progs/
H A Dsyscall.c23 int prog_fd; member in struct:args
156 ctx->prog_fd = ret;
/linux-master/tools/bpf/bpftool/
H A Dbtf_dumper.c36 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);

Completed in 219 milliseconds

1234567