Home
last modified time | relevance | path

Searched refs:prog_cnt (Results 1 – 25 of 30) sorted by relevance

12

/linux/tools/testing/selftests/bpf/prog_tests/
A Dcgroup_attach_multi.c157 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 Dhelper_restricted.c8 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 Dcgroup_link.c41 __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 Dtp_attach_query.c69 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 Dfexit_bpf2bpf.c9 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 Dcgroup_attach_autodetach.c26 __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 Dflow_dissector_reattach.c24 __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 Dsk_lookup.c522 __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 Dtest_lirc_mode2_user.c54 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 Dtest_dev_cgroup.c28 __u32 prog_cnt; in main() local
49 &prog_cnt)) { in main()
/linux/samples/bpf/
A Dtest_cgrp2_sock2.c35 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 Dcgroup.c93 __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 Dgen.c656 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 Dnet.c488 __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 Dnet_namespace.c252 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 Dcgroup.c788 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 Dcore.c1983 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 Diterators.skel.h129 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 Dbpf-lirc.c318 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 Dbpf.c807 __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 Dbpf.h244 __u32 *prog_ids, __u32 *prog_cnt);
A Dlibbpf.h971 int prog_cnt; member
/linux/kernel/trace/
A Dbpf_trace.c1871 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 Dperf_event.h486 __u32 prog_cnt; member
/linux/include/uapi/linux/
A Dperf_event.h486 __u32 prog_cnt; member

Completed in 62 milliseconds

12