/external/linux-kselftest/tools/testing/selftests/bpf/ |
D | test_progs.c | 105 int err, prog_fd; in test_pkt_access() local 107 err = bpf_prog_load(file, BPF_PROG_TYPE_SCHED_CLS, &obj, &prog_fd); in test_pkt_access() 113 err = bpf_prog_test_run(prog_fd, 100000, &pkt_v4, sizeof(pkt_v4), in test_pkt_access() 119 err = bpf_prog_test_run(prog_fd, 100000, &pkt_v6, sizeof(pkt_v6), in test_pkt_access() 139 int err, prog_fd, map_fd; in test_xdp() local 141 err = bpf_prog_load(file, BPF_PROG_TYPE_XDP, &obj, &prog_fd); in test_xdp() 153 err = bpf_prog_test_run(prog_fd, 1, &pkt_v4, sizeof(pkt_v4), in test_xdp() 161 err = bpf_prog_test_run(prog_fd, 1, &pkt_v6, sizeof(pkt_v6), in test_xdp() 177 int err, prog_fd; in test_xdp_adjust_tail() local 179 err = bpf_prog_load(file, BPF_PROG_TYPE_XDP, &obj, &prog_fd); in test_xdp_adjust_tail() [all …]
|
D | test_skb_cgroup_id_user.c | 85 int prog_fd = -1; in get_map_fd_by_prog_id() local 88 prog_fd = bpf_prog_get_fd_by_id(prog_id); in get_map_fd_by_prog_id() 89 if (prog_fd < 0) { in get_map_fd_by_prog_id() 97 if (bpf_obj_get_info_by_fd(prog_fd, &info, &info_len)) { in get_map_fd_by_prog_id() 98 log_err("Failed to get info by prog fd %d", prog_fd); in get_map_fd_by_prog_id() 103 log_err("No maps found for prog fd %d", prog_fd); in get_map_fd_by_prog_id() 111 if (prog_fd >= 0) in get_map_fd_by_prog_id() 112 close(prog_fd); in get_map_fd_by_prog_id()
|
D | flow_dissector_load.c | 26 int i, fd, prog_fd, ret; in load_and_attach_program() local 31 &prog_fd); in load_and_attach_program() 40 prog_fd = bpf_program__fd(main_prog); in load_and_attach_program() 41 if (prog_fd < 0) in load_and_attach_program() 58 if (fd != prog_fd) { in load_and_attach_program() 65 ret = bpf_prog_attach(prog_fd, 0 /* Ignore */, BPF_FLOW_DISSECTOR, 0); in load_and_attach_program()
|
D | test_dev_cgroup.c | 30 int prog_fd, cgroup_fd; in main() local 34 &obj, &prog_fd)) { in main() 57 if (bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_DEVICE, 0)) { in main()
|
D | test_cgroup_storage.c | 40 int map_fd, percpu_map_fd, prog_fd, cgroup_fd; in main() local 69 prog_fd = bpf_load_program(BPF_PROG_TYPE_CGROUP_SKB, in main() 72 if (prog_fd < 0) { in main() 95 if (bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS, 0)) { in main()
|
D | test_netcnt.c | 42 int prog_fd, cgroup_fd; in main() local 56 &obj, &prog_fd)) { in main() 79 if (bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS, 0)) { in main()
|
D | test_tcpbpf_user.c | 93 int prog_fd, map_fd, sock_map_fd; in main() local 112 if (bpf_prog_load(file, BPF_PROG_TYPE_SOCK_OPS, &obj, &prog_fd)) { in main() 117 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
|
D | test_sockmap.c | 69 int prog_fd[11]; variable 781 err = bpf_prog_attach(prog_fd[0], map_fd[0], in run_options() 786 prog_fd[0], map_fd[0], err, strerror(errno)); in run_options() 790 err = bpf_prog_attach(prog_fd[1], map_fd[0], in run_options() 799 err = bpf_prog_attach(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS, 0); in run_options() 815 tx_prog_fd = prog_fd[3]; in run_options() 817 tx_prog_fd = prog_fd[4]; in run_options() 819 tx_prog_fd = prog_fd[5]; in run_options() 821 tx_prog_fd = prog_fd[6]; in run_options() 823 tx_prog_fd = prog_fd[9]; in run_options() [all …]
|
D | get_cgroup_id_user.c | 52 int err, bytes, efd, prog_fd, pmu_fd; in main() local 75 err = bpf_prog_load(file, BPF_PROG_TYPE_TRACEPOINT, &obj, &prog_fd); in main() 122 err = ioctl(pmu_fd, PERF_EVENT_IOC_SET_BPF, prog_fd); in main()
|
D | test_socket_cookie.c | 145 int prog_fd = -1; in run_test() local 152 err = bpf_prog_load_xattr(&attr, &pobj, &prog_fd); in run_test()
|
D | test_sock_addr.c | 691 int prog_fd; in load_path() local 698 if (bpf_prog_load_xattr(&attr, &obj, &prog_fd)) { in load_path() 704 return prog_fd; in load_path()
|
/external/bcc/introspection/ |
D | bps.c | 186 int prog_fd; in print_one_prog() local 189 prog_fd = bpf_prog_get_fd_by_id(prog_id); in print_one_prog() 190 if (prog_fd == -1) { in print_one_prog() 208 close(prog_fd); in print_one_prog() 216 ret = bpf_obj_get_info(prog_fd, &prog_info, &info_len); in print_one_prog() 220 close(prog_fd); in print_one_prog() 230 close(prog_fd); in print_one_prog() 280 int prog_fd; in print_all_progs() local 283 prog_fd = bpf_prog_get_fd_by_id(next_id); in print_all_progs() 284 if (prog_fd < 0) { in print_all_progs() [all …]
|
/external/iproute2/ip/ |
D | ipvrf.c | 264 int rc = -1, cg_fd, prog_fd = -1; in vrf_configure_cgroup() local 278 prog_fd = prog_load(ifindex); in vrf_configure_cgroup() 279 if (prog_fd < 0) { in vrf_configure_cgroup() 290 if (bpf_prog_attach_fd(prog_fd, cg_fd, BPF_CGROUP_INET_SOCK_CREATE)) { in vrf_configure_cgroup() 299 close(prog_fd); in vrf_configure_cgroup()
|
/external/strace/ |
D | bpf_attr.h | 168 uint32_t prog_fd; member 240 uint32_t prog_fd; member 244 offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
|
D | bpf_attr_check.c | 339 static_assert(SoM(struct BPF_PROG_TEST_RUN_struct, prog_fd) == SoM(union bpf_attr, test.prog_fd), 341 …ic_assert(offsetof(struct BPF_PROG_TEST_RUN_struct, prog_fd) == offsetof(union bpf_attr, test.prog… 546 …ssert(SoM(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd) == SoM(union bpf_attr, raw_tracepoint.pr… 548 …ffsetof(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd) == offsetof(union bpf_attr, raw_tracepoint…
|
/external/strace/tests-mx32/ |
D | bpf-obj_get_info_by_fd.c | 285 int prog_fd = try_bpf(BPF_PROG_LOAD, print_prog_load, in main() local 287 if (prog_fd < 0) in main() 357 .bpf_fd = prog_fd, in main() 396 prog_fd, old_prog_info_len); in main()
|
D | bpf.c | 751 .data = { .BPF_PROG_TEST_RUN_data = { .prog_fd = -1 } }, 752 .size = offsetofend(struct BPF_PROG_TEST_RUN_struct, prog_fd), 759 .prog_fd = -1, 1060 .prog_fd = 0xdeadbeef, 1063 prog_fd), 1070 .prog_fd = 0xdeadbeef, 1073 prog_fd),
|
/external/strace/tests-m32/ |
D | bpf-obj_get_info_by_fd.c | 285 int prog_fd = try_bpf(BPF_PROG_LOAD, print_prog_load, in main() local 287 if (prog_fd < 0) in main() 357 .bpf_fd = prog_fd, in main() 396 prog_fd, old_prog_info_len); in main()
|
D | bpf.c | 751 .data = { .BPF_PROG_TEST_RUN_data = { .prog_fd = -1 } }, 752 .size = offsetofend(struct BPF_PROG_TEST_RUN_struct, prog_fd), 759 .prog_fd = -1, 1060 .prog_fd = 0xdeadbeef, 1063 prog_fd), 1070 .prog_fd = 0xdeadbeef, 1073 prog_fd),
|
/external/strace/tests/ |
D | bpf-obj_get_info_by_fd.c | 285 int prog_fd = try_bpf(BPF_PROG_LOAD, print_prog_load, in main() local 287 if (prog_fd < 0) in main() 357 .bpf_fd = prog_fd, in main() 396 prog_fd, old_prog_info_len); in main()
|
D | bpf.c | 751 .data = { .BPF_PROG_TEST_RUN_data = { .prog_fd = -1 } }, 752 .size = offsetofend(struct BPF_PROG_TEST_RUN_struct, prog_fd), 759 .prog_fd = -1, 1060 .prog_fd = 0xdeadbeef, 1063 prog_fd), 1070 .prog_fd = 0xdeadbeef, 1073 prog_fd),
|
/external/bcc/src/lua/bpf/ |
D | bpf.lua | 1478 local prog_fd, err, log = S.bpf_prog_load(S.c.BPF_PROG.TRACEPOINT, prog.insn, prog.pc) 1479 assert(prog_fd, tostring(err)..': '..tostring(log)) 1481 t.reader:setbpf(prog_fd:getfd()) 1482 table.insert(t.progs, prog_fd) 1483 return prog_fd 1502 local prog_fd, err, log = S.bpf_prog_load(S.c.BPF_PROG.KPROBE, prog.insn, prog.pc) 1503 assert(prog_fd, tostring(err)..': '..tostring(log)) 1507 prog_fd:close() 1512 prog_fd:close() 1516 local ok, err = reader:setbpf(prog_fd:getfd()) [all …]
|
/external/strace/m4/ |
D | bpf_attr.m4 | 70 union bpf_attr.raw_tracepoint.prog_fd, 78 union bpf_attr.test.prog_fd,
|
/external/iproute2/lib/ |
D | bpf.c | 800 int prog_fd = bpf_obj_get(pathname, type); in bpf_obj_pinned() local 802 if (prog_fd < 0) in bpf_obj_pinned() 805 return prog_fd; in bpf_obj_pinned() 985 int ret, prog_fd, map_fd; in bpf_graft_map() local 989 prog_fd = bpf_parse(&type, &mode, &cfg, opt_tbl); in bpf_graft_map() 990 if (prog_fd < 0) in bpf_graft_map() 991 return prog_fd; in bpf_graft_map() 1019 ret = bpf_map_update(map_fd, &map_key, &prog_fd, BPF_ANY); in bpf_graft_map() 1025 close(prog_fd); in bpf_graft_map() 1029 int bpf_prog_attach_fd(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_attach_fd() argument [all …]
|
/external/iproute2/include/ |
D | bpf_util.h | 261 int bpf_prog_attach_fd(int prog_fd, int target_fd, enum bpf_attach_type type);
|