/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | cgroup_attach_multi.c | 157 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 161 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 162 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 167 prog_cnt = 2; in serial_test_cgroup_attach_multi() 172 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 178 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 179 CHECK_FAIL(prog_cnt != 1); in serial_test_cgroup_attach_multi() 272 prog_cnt = 4; in serial_test_cgroup_attach_multi() 275 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 276 CHECK_FAIL(prog_cnt != 3); in serial_test_cgroup_attach_multi() [all …]
|
A D | helper_restricted.c | 8 int prog_i = 0, prog_cnt; in test_helper_restricted() local 19 prog_cnt = test->skeleton->prog_cnt; in test_helper_restricted() 21 for (int j = 0; j < prog_cnt; ++j) { in test_helper_restricted() 32 } while (++prog_i < prog_cnt); in test_helper_restricted()
|
A D | cgroup_link.c | 41 __u32 prog_ids[ARRAY_SIZE(cgs)], prog_cnt = 0, attach_flags, prog_id; in serial_test_cgroup_link() local 77 &prog_cnt); in serial_test_cgroup_link() 80 if (CHECK(prog_cnt != 1, "effect_cnt", "exp %d, got %d\n", 1, prog_cnt)) in serial_test_cgroup_link() 86 &prog_cnt); in serial_test_cgroup_link() 89 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 90 cg_nr, prog_cnt)) in serial_test_cgroup_link() 96 prog_ids, &prog_cnt); in serial_test_cgroup_link() 99 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 100 cg_nr, prog_cnt)) in serial_test_cgroup_link() 102 for (i = 1; i < prog_cnt; i++) { in serial_test_cgroup_link()
|
A D | tp_attach_query.c | 69 if (CHECK(err || query->prog_cnt != 0, in serial_test_tp_attach_query() 72 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 85 if (CHECK(err || query->prog_cnt != 2, in serial_test_tp_attach_query() 88 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 103 if (CHECK(!err || errno != ENOSPC || query->prog_cnt != 2, in serial_test_tp_attach_query() 106 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 112 if (CHECK(err || query->prog_cnt != (i + 1), in serial_test_tp_attach_query() 115 err, errno, query->prog_cnt)) in serial_test_tp_attach_query()
|
A D | fexit_bpf2bpf.c | 9 static int check_data_map(struct bpf_object *obj, int prog_cnt, bool reset) in check_data_map() argument 17 result = malloc((prog_cnt + 32 /* spare */) * sizeof(__u64)); in check_data_map() 34 for (i = 0; i < prog_cnt; i++) { in check_data_map() 55 int prog_cnt, in test_fexit_bpf2bpf_common() argument 81 link = calloc(sizeof(struct bpf_link *), prog_cnt); in test_fexit_bpf2bpf_common() 85 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common() 102 for (i = 0; i < prog_cnt; i++) { in test_fexit_bpf2bpf_common() 146 if (check_data_map(obj, prog_cnt, false)) in test_fexit_bpf2bpf_common() 150 for (i = 0; i < prog_cnt; i++) in test_fexit_bpf2bpf_common()
|
A D | cgroup_attach_autodetach.c | 26 __u32 duration = 0, prog_cnt = 4, attach_flags; in serial_test_cgroup_attach_autodetach() local 60 prog_ids, &prog_cnt), in serial_test_cgroup_attach_autodetach()
|
A D | flow_dissector_reattach.c | 24 __u32 prog_cnt = ARRAY_SIZE(prog_ids); in query_attached_prog_id() local 28 prog_ids, &prog_cnt); in query_attached_prog_id() 34 return prog_cnt == 1 ? prog_ids[0] : 0; in query_attached_prog_id()
|
A D | sk_lookup.c | 522 __u32 prog_cnt = 3; in query_lookup_prog() local 544 &attach_flags, prog_ids, &prog_cnt); in query_lookup_prog() 554 if (CHECK(prog_cnt != 3, "bpf_prog_query", in query_lookup_prog() 555 "wrong program count on query: %u", prog_cnt)) in query_lookup_prog()
|
/linux/tools/testing/selftests/bpf/ |
A D | test_lirc_mode2_user.c | 54 u32 prog_ids[10], prog_flags[10], prog_cnt; in main() local 87 prog_cnt = 10; in main() 89 &prog_cnt); in main() 95 if (prog_cnt != 0) { in main() 155 prog_cnt = 10; in main() 157 &prog_cnt); in main() 163 if (prog_cnt != 1) { in main()
|
A D | test_dev_cgroup.c | 28 __u32 prog_cnt; in main() local 49 &prog_cnt)) { in main()
|
/linux/samples/bpf/ |
A D | test_cgrp2_sock2.c | 35 int cg_fd, err, ret = EXIT_FAILURE, filter_id = 0, prog_cnt = 0; in main() local 61 progs[prog_cnt] = prog; in main() 62 prog_cnt++; in main() 65 if (filter_id >= prog_cnt) { in main()
|
/linux/tools/bpf/bpftool/ |
A D | cgroup.c | 93 __u32 prog_cnt = 0; in count_attached_bpf_progs() local 97 NULL, &prog_cnt); in count_attached_bpf_progs() 101 return prog_cnt; in count_attached_bpf_progs() 128 __u32 prog_cnt, iter; in show_attached_bpf_progs() local 133 prog_cnt = ARRAY_SIZE(prog_ids); in show_attached_bpf_progs() 135 prog_ids, &prog_cnt); in show_attached_bpf_progs() 139 if (prog_cnt == 0) in show_attached_bpf_progs() 157 for (iter = 0; iter < prog_cnt; iter++) in show_attached_bpf_progs()
|
A D | gen.c | 656 size_t i, map_cnt = 0, prog_cnt = 0, file_sz, mmap_sz; in do_skeleton() local 740 prog_cnt++; in do_skeleton() 795 if (prog_cnt) { in do_skeleton() 973 if (prog_cnt) { in do_skeleton() 984 prog_cnt in do_skeleton()
|
A D | net.c | 488 __u32 prog_cnt; in query_flow_dissector() local 498 prog_cnt = ARRAY_SIZE(prog_ids); in query_flow_dissector() 500 &attach_flags, prog_ids, &prog_cnt); in query_flow_dissector() 514 if (prog_cnt == 1) in query_flow_dissector()
|
/linux/kernel/bpf/ |
A D | net_namespace.c | 252 u32 prog_cnt = 0, flags = 0; in __netns_bpf_prog_query() local 257 prog_cnt = bpf_prog_array_length(run_array); in __netns_bpf_prog_query() 261 if (copy_to_user(&uattr->query.prog_cnt, &prog_cnt, sizeof(prog_cnt))) in __netns_bpf_prog_query() 263 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in __netns_bpf_prog_query() 267 attr->query.prog_cnt); in __netns_bpf_prog_query()
|
A D | cgroup.c | 788 if (copy_to_user(&uattr->query.prog_cnt, &cnt, sizeof(cnt))) in __cgroup_bpf_query() 790 if (attr->query.prog_cnt == 0 || !prog_ids || !cnt) in __cgroup_bpf_query() 793 if (attr->query.prog_cnt < cnt) { in __cgroup_bpf_query() 794 cnt = attr->query.prog_cnt; in __cgroup_bpf_query()
|
A D | core.c | 1983 struct bpf_prog_array *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags) in bpf_prog_array_alloc() argument 1985 if (prog_cnt) in bpf_prog_array_alloc() 1988 (prog_cnt + 1), in bpf_prog_array_alloc() 2208 u32 *prog_cnt) in bpf_prog_array_copy_info() argument 2215 *prog_cnt = cnt; in bpf_prog_array_copy_info()
|
/linux/kernel/bpf/preload/iterators/ |
A D | iterators.skel.h | 129 s->prog_cnt = 2; in iterators_bpf__create_skeleton() 131 s->progs = (struct bpf_prog_skeleton *)calloc(s->prog_cnt, s->prog_skel_sz); in iterators_bpf__create_skeleton()
|
/linux/drivers/media/rc/ |
A D | bpf-lirc.c | 318 if (copy_to_user(&uattr->query.prog_cnt, &cnt, sizeof(cnt))) { in lirc_prog_query() 328 if (attr->query.prog_cnt != 0 && prog_ids && cnt) in lirc_prog_query() 330 attr->query.prog_cnt); in lirc_prog_query()
|
/linux/tools/lib/bpf/ |
A D | bpf.c | 807 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument 816 attr.query.prog_cnt = *prog_cnt; in bpf_prog_query() 823 *prog_cnt = attr.query.prog_cnt; in bpf_prog_query()
|
A D | bpf.h | 244 __u32 *prog_ids, __u32 *prog_cnt);
|
A D | libbpf.h | 971 int prog_cnt; member
|
/linux/kernel/trace/ |
A D | bpf_trace.c | 1871 u32 *ids, prog_cnt, ids_len; in perf_event_query_prog_array() local 1896 ret = bpf_prog_array_copy_info(progs, ids, ids_len, &prog_cnt); in perf_event_query_prog_array() 1899 if (copy_to_user(&uquery->prog_cnt, &prog_cnt, sizeof(prog_cnt)) || in perf_event_query_prog_array()
|
/linux/tools/include/uapi/linux/ |
A D | perf_event.h | 486 __u32 prog_cnt; member
|
/linux/include/uapi/linux/ |
A D | perf_event.h | 486 __u32 prog_cnt; member
|