Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dcgroup_attach_multi.c79 __u32 prog_ids[4], prog_cnt = 0, attach_flags, saved_prog_id; in test_cgroup_attach_multi() local
156 BPF_F_QUERY_EFFECTIVE, NULL, NULL, &prog_cnt)); in test_cgroup_attach_multi()
157 CHECK_FAIL(prog_cnt != 4); in test_cgroup_attach_multi()
161 prog_ids, &prog_cnt)); in test_cgroup_attach_multi()
162 CHECK_FAIL(prog_cnt != 4); in test_cgroup_attach_multi()
167 prog_cnt = 2; in test_cgroup_attach_multi()
170 prog_ids, &prog_cnt) != -1); in test_cgroup_attach_multi()
172 CHECK_FAIL(prog_cnt != 4); in test_cgroup_attach_multi()
178 prog_ids, &prog_cnt)); in test_cgroup_attach_multi()
179 CHECK_FAIL(prog_cnt != 1); in test_cgroup_attach_multi()
[all …]
Dtp_attach_query.c69 if (CHECK(err || query->prog_cnt != 0, in test_tp_attach_query()
72 err, errno, query->prog_cnt)) in test_tp_attach_query()
85 if (CHECK(err || query->prog_cnt != 2, in test_tp_attach_query()
88 err, errno, query->prog_cnt)) in test_tp_attach_query()
103 if (CHECK(!err || errno != ENOSPC || query->prog_cnt != 2, in test_tp_attach_query()
106 err, errno, query->prog_cnt)) in test_tp_attach_query()
112 if (CHECK(err || query->prog_cnt != (i + 1), in test_tp_attach_query()
115 err, errno, query->prog_cnt)) in test_tp_attach_query()
Dcgroup_link.c41 __u32 prog_ids[ARRAY_SIZE(cgs)], prog_cnt = 0, attach_flags, prog_id; in test_cgroup_link() local
78 &prog_cnt); in test_cgroup_link()
81 if (CHECK(prog_cnt != 1, "effect_cnt", "exp %d, got %d\n", 1, prog_cnt)) in test_cgroup_link()
87 &prog_cnt); in test_cgroup_link()
90 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in test_cgroup_link()
91 cg_nr, prog_cnt)) in test_cgroup_link()
97 prog_ids, &prog_cnt); in test_cgroup_link()
100 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in test_cgroup_link()
101 cg_nr, prog_cnt)) in test_cgroup_link()
103 for (i = 1; i < prog_cnt; i++) { in test_cgroup_link()
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
75 link = calloc(sizeof(struct bpf_link *), prog_cnt); in test_fexit_bpf2bpf_common()
76 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common()
90 for (i = 0; i < prog_cnt; i++) { in test_fexit_bpf2bpf_common()
114 if (check_data_map(obj, prog_cnt, false)) in test_fexit_bpf2bpf_common()
118 for (i = 0; i < prog_cnt; i++) in test_fexit_bpf2bpf_common()
Dcgroup_attach_autodetach.c26 __u32 duration = 0, prog_cnt = 4, attach_flags; in test_cgroup_attach_autodetach() local
60 prog_ids, &prog_cnt), in test_cgroup_attach_autodetach()
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()
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()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
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()
Dtest_dev_cgroup.c28 __u32 prog_cnt; in main() local
49 &prog_cnt)) { in main()
Dtest_netcnt.c46 __u32 prog_cnt; in main() local
77 &prog_cnt)) { in main()
/kernel/linux/linux-5.10/tools/bpf/bpftool/
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()
Dgen.c274 size_t i, map_cnt = 0, prog_cnt = 0, file_sz, mmap_sz; in do_skeleton() local
335 prog_cnt++; in do_skeleton()
368 if (prog_cnt) { in do_skeleton()
523 if (prog_cnt) { in do_skeleton()
534 prog_cnt in do_skeleton()
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()
/kernel/linux/linux-5.10/kernel/bpf/
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()
/kernel/linux/linux-5.10/kernel/bpf/preload/iterators/
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()
/kernel/linux/linux-5.10/drivers/media/rc/
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()
/kernel/linux/linux-5.10/samples/bpf/
Dbpf_load.c39 int prog_cnt; variable
128 if (prog_cnt == MAX_PROGS) in load_and_attach()
138 prog_fd[prog_cnt++] = fd; in load_and_attach()
164 event_fd[prog_cnt - 1] = efd; in load_and_attach()
248 event_fd[prog_cnt - 1] = efd; in load_and_attach()
Dbpf_load.h32 extern int prog_cnt;
Dtest_cgrp2_sock2.c54 if (filter_id >= prog_cnt) { in main()
/kernel/linux/linux-5.10/tools/lib/bpf/
Dbpf.c656 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument
665 attr.query.prog_cnt = *prog_cnt; in bpf_prog_query()
671 *prog_cnt = attr.query.prog_cnt; in bpf_prog_query()
Dbpf.h236 __u32 *prog_ids, __u32 *prog_cnt);
/kernel/linux/linux-5.10/kernel/trace/
Dbpf_trace.c1977 u32 *ids, prog_cnt, ids_len; in perf_event_query_prog_array() local
2002 ret = bpf_prog_array_copy_info(progs, ids, ids_len, &prog_cnt); in perf_event_query_prog_array()
2005 if (copy_to_user(&uquery->prog_cnt, &prog_cnt, sizeof(prog_cnt)) || in perf_event_query_prog_array()
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dperf_event.h237 __u32 prog_cnt; member
/kernel/linux/linux-5.10/tools/include/uapi/linux/
Dperf_event.h455 __u32 prog_cnt; member
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
Dperf_event.h262 __u32 prog_cnt; member

12