Lines Matching full:values
125 u32 *values = NULL, *values_percpu = NULL; in test_percpu_map_op_cpu_flag() local
134 values = calloc(entries, value_sz_cpus); in test_percpu_map_op_cpu_flag()
135 if (!ASSERT_OK_PTR(values, "calloc values")) in test_percpu_map_op_cpu_flag()
140 free(values); in test_percpu_map_op_cpu_flag()
145 memset(values, 0, value_sz_total); in test_percpu_map_op_cpu_flag()
149 err = bpf_map_lookup_elem_flags(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
153 err = bpf_map_update_elem(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
158 err = bpf_map_lookup_elem_flags(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
163 err = bpf_map_lookup_elem_flags(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
168 err = bpf_map_update_elem(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
173 err = bpf_map_update_elem(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
177 err = bpf_map__update_elem(map, keys, key_sz, values, value_sz, flags); in test_percpu_map_op_cpu_flag()
181 err = bpf_map_lookup_elem_flags(map_fd, keys, values, flags); in test_percpu_map_op_cpu_flag()
185 err = bpf_map__lookup_elem(map, keys, key_sz, values, value_sz, flags); in test_percpu_map_op_cpu_flag()
191 values[0] = 0; in test_percpu_map_op_cpu_flag()
194 err = bpf_map__update_elem(map, keys + i * key_sz, key_sz, values, in test_percpu_map_op_cpu_flag()
202 values[0] = value; in test_percpu_map_op_cpu_flag()
204 err = bpf_map__update_elem(map, keys + i * key_sz, key_sz, values, in test_percpu_map_op_cpu_flag()
212 err = bpf_map__lookup_elem(map, keys + i * key_sz, key_sz, values, in test_percpu_map_op_cpu_flag()
216 if (!ASSERT_EQ(values[0], j != cpu ? 0 : value, in test_percpu_map_op_cpu_flag()
228 err = bpf_map_update_batch(map_fd, keys, values, &count, &batch_opts); in test_percpu_map_op_cpu_flag()
233 memset(values, 0, value_sz_total); in test_percpu_map_op_cpu_flag()
235 /* clear values across all CPUs */ in test_percpu_map_op_cpu_flag()
238 err = bpf_map_update_batch(map_fd, keys, values, &count, &batch_opts); in test_percpu_map_op_cpu_flag()
244 /* update values on specified CPU */ in test_percpu_map_op_cpu_flag()
246 values[i] = value; in test_percpu_map_op_cpu_flag()
250 err = bpf_map_update_batch(map_fd, keys, values, &count, &batch_opts); in test_percpu_map_op_cpu_flag()
256 /* lookup values on specified CPU */ in test_percpu_map_op_cpu_flag()
259 memset(values, 0, entries * value_sz); in test_percpu_map_op_cpu_flag()
260 err = bpf_map_lookup_batch(map_fd, NULL, &batch, keys, values, &count, &batch_opts); in test_percpu_map_op_cpu_flag()
267 if (!ASSERT_EQ(values[i], value, in test_percpu_map_op_cpu_flag()
271 /* lookup values from all CPUs */ in test_percpu_map_op_cpu_flag()
297 free(values); in test_percpu_map_op_cpu_flag()