Lines Matching refs:next_key
35 long long key, next_key, first_key, value; in test_hashmap() local
104 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_hashmap()
105 (next_key == first_key)); in test_hashmap()
106 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_hashmap()
107 (next_key == 1 || next_key == 2) && in test_hashmap()
108 (next_key != first_key)); in test_hashmap()
109 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_hashmap()
121 assert(bpf_map_get_next_key(fd, NULL, &next_key) < 0 && in test_hashmap()
123 assert(bpf_map_get_next_key(fd, &key, &next_key) < 0 && in test_hashmap()
152 long long key, next_key, first_key; in test_hashmap_percpu() local
225 while (!bpf_map_get_next_key(fd, &key, &next_key)) { in test_hashmap_percpu()
227 assert(next_key == first_key); in test_hashmap_percpu()
230 assert((expected_key_mask & next_key) == next_key); in test_hashmap_percpu()
231 expected_key_mask &= ~next_key; in test_hashmap_percpu()
233 assert(bpf_map_lookup_elem(fd, &next_key, value) == 0); in test_hashmap_percpu()
238 key = next_key; in test_hashmap_percpu()
255 assert(bpf_map_get_next_key(fd, NULL, &next_key) < 0 && in test_hashmap_percpu()
257 assert(bpf_map_get_next_key(fd, &key, &next_key) < 0 && in test_hashmap_percpu()
289 long long key, value[VALUE_SIZE], next_key; in test_hashmap_walk() local
295 &next_key) == 0; i++) { in test_hashmap_walk()
296 key = next_key; in test_hashmap_walk()
304 next_key_valid = bpf_map_get_next_key(fd, &key, &next_key) == 0; in test_hashmap_walk()
308 key = next_key; in test_hashmap_walk()
314 &next_key) == 0; i++) { in test_hashmap_walk()
315 key = next_key; in test_hashmap_walk()
359 int key, next_key, fd; in test_arraymap() local
395 assert(bpf_map_get_next_key(fd, NULL, &next_key) == 0 && in test_arraymap()
396 next_key == 0); in test_arraymap()
397 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_arraymap()
398 next_key == 0); in test_arraymap()
399 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap()
400 next_key == 1); in test_arraymap()
401 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_arraymap()
415 int key, next_key, fd, i; in test_arraymap_percpu() local
454 assert(bpf_map_get_next_key(fd, NULL, &next_key) == 0 && in test_arraymap_percpu()
455 next_key == 0); in test_arraymap_percpu()
456 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_arraymap_percpu()
457 next_key == 0); in test_arraymap_percpu()
458 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap_percpu()
459 next_key == 1); in test_arraymap_percpu()
460 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_arraymap_percpu()