/linux/samples/bpf/ |
A D | test_cgrp2_sock.c | 75 size_t insns_cnt; in prog_load() local 79 insns_cnt = sizeof(prog_start) + sizeof(prog_end); in prog_load() 81 insns_cnt += sizeof(prog_dev); in prog_load() 84 insns_cnt += sizeof(prog_mark); in prog_load() 87 insns_cnt += sizeof(prog_prio); in prog_load() 89 p = prog = malloc(insns_cnt); in prog_load() 116 insns_cnt /= sizeof(struct bpf_insn); in prog_load() 118 ret = bpf_load_program(BPF_PROG_TYPE_CGROUP_SOCK, prog, insns_cnt, in prog_load()
|
A D | sock_example.c | 61 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in test_sock() local 63 prog_fd = bpf_load_program(BPF_PROG_TYPE_SOCKET_FILTER, prog, insns_cnt, in test_sock()
|
A D | test_cgrp2_attach.c | 73 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in prog_load() local 76 prog, insns_cnt, "GPL", 0, in prog_load()
|
A D | fds_example.c | 61 size_t insns_cnt = sizeof(insns) / sizeof(struct bpf_insn); in bpf_prog_create() local 71 insns, insns_cnt, "GPL", 0, in bpf_prog_create()
|
/linux/tools/testing/selftests/bpf/ |
A D | test_stub.c | 26 size_t insns_cnt, const char *license, in bpf_test_load_program() argument 37 load_attr.insns_cnt = insns_cnt; in bpf_test_load_program()
|
A D | test_cgroup_storage.c | 38 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in main() local 70 prog, insns_cnt, "GPL", 0, in main()
|
A D | test_sock_addr.c | 646 const struct bpf_insn *insns, size_t insns_cnt) in load_insns() argument 655 load_attr.insns_cnt = insns_cnt; in load_insns()
|
A D | test_sock.c | 338 attr.insns_cnt = probe_prog_length(attr.insns); in load_sock_prog()
|
A D | test_lru_map.c | 82 prog.insns_cnt = ARRAY_SIZE(insns); in bpf_map_lookup_elem_with_ref_bit()
|
A D | test_sysctl.c | 1444 attr.insns_cnt = probe_prog_length(attr.insns); in load_sysctl_prog_insns()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | raw_tp_writable_test_run.c | 24 .insns_cnt = sizeof(trace_program) / sizeof(struct bpf_insn), in serial_test_raw_tp_writable_test_run() 42 .insns_cnt = sizeof(skb_program) / sizeof(struct bpf_insn), in serial_test_raw_tp_writable_test_run()
|
A D | fexit_stress.c | 27 .insns_cnt = sizeof(trace_program) / sizeof(struct bpf_insn), in test_fexit_stress() 40 .insns_cnt = sizeof(skb_program) / sizeof(struct bpf_insn), in test_fexit_stress()
|
A D | cgroup_attach_autodetach.c | 17 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in prog_load() local 20 prog, insns_cnt, "GPL", 0, in prog_load()
|
A D | cgroup_attach_override.c | 19 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in prog_load() local 22 prog, insns_cnt, "GPL", 0, in prog_load()
|
A D | raw_tp_writable_reject_nbd_invalid.c | 25 .insns_cnt = sizeof(program) / sizeof(struct bpf_insn), in test_raw_tp_writable_reject_nbd_invalid()
|
A D | cgroup_attach_multi.c | 66 size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); in prog_load_cnt() local 70 prog, insns_cnt, "GPL", 0, in prog_load_cnt()
|
A D | sockopt.c | 865 insns[attr.insns_cnt].code != (BPF_JMP | BPF_EXIT); in load_prog() 866 attr.insns_cnt++) { in load_prog() 868 attr.insns_cnt++; in load_prog()
|
/linux/tools/lib/bpf/ |
A D | libbpf_probes.c | 69 size_t insns_cnt, char *buf, size_t buf_len, __u32 ifindex) in probe_load() argument 120 xattr.insns_cnt = insns_cnt; in probe_load()
|
A D | bpf.h | 79 size_t insns_cnt; member 109 const struct bpf_insn *insns, size_t insns_cnt, 114 size_t insns_cnt, __u32 prog_flags,
|
A D | bpf.c | 394 p.insn_cnt = load_attr->insns_cnt; in bpf_load_program_xattr() 414 size_t insns_cnt, const char *license, in bpf_load_program() argument 425 load_attr.insns_cnt = insns_cnt; in bpf_load_program() 433 size_t insns_cnt, __u32 prog_flags, const char *license, in bpf_verify_program() argument 442 attr.insn_cnt = (__u32)insns_cnt; in bpf_verify_program()
|
A D | btf.h | 167 const char *sec_name, __u32 insns_cnt, 172 const char *sec_name, __u32 insns_cnt,
|
A D | xsk.c | 395 prog_attr.insns_cnt = ARRAY_SIZE(insns); in get_xsk_prog() 493 size_t insns_cnt[] = {sizeof(prog) / sizeof(struct bpf_insn), in xsk_load_xdp_prog() local 499 prog_fd = bpf_load_program(BPF_PROG_TYPE_XDP, progs[option], insns_cnt[option], in xsk_load_xdp_prog() 750 prog_attr.insns_cnt = ARRAY_SIZE(insns); in xsk_probe_bpf_link()
|
A D | libbpf.c | 303 size_t insns_cnt; member 614 prog->insns_cnt = 0; in bpf_program__exit() 676 prog->insns_cnt = prog->sec_insn_cnt; in bpf_object__init_prog() 4284 attr.insns_cnt = ARRAY_SIZE(insns); in bpf_object__probe_loading() 5425 if (insn_idx >= prog->insns_cnt) in bpf_core_apply_relo() 5913 new_cnt = main_prog->insns_cnt + subprog->insns_cnt; in bpf_object__reloc_code() 5920 main_prog->insns_cnt = new_cnt; in bpf_object__reloc_code() 6435 if (!insns || !insns_cnt) in load_program() 6443 load_attr.insn_cnt = insns_cnt; in load_program() 6639 prog->insns_cnt, &result); in bpf_program__load() [all …]
|
A D | btf.c | 2774 const char *sec_name, __u32 insns_cnt, in btf_ext_reloc_info() argument 2809 *insn_off = *insn_off / sizeof(struct bpf_insn) + insns_cnt; in btf_ext_reloc_info() 2821 const char *sec_name, __u32 insns_cnt, in btf_ext__reloc_func_info() argument 2825 insns_cnt, func_info, cnt); in btf_ext__reloc_func_info() 2830 const char *sec_name, __u32 insns_cnt, in btf_ext__reloc_line_info() argument 2834 insns_cnt, line_info, cnt); in btf_ext__reloc_line_info()
|
A D | libbpf.h | 460 struct bpf_insn *insns, int insns_cnt,
|