Lines Matching refs:next_key
39 long long key, next_key, first_key, value; in test_hashmap() local
109 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_hashmap()
110 (next_key == first_key)); in test_hashmap()
111 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_hashmap()
112 (next_key == 1 || next_key == 2) && in test_hashmap()
113 (next_key != first_key)); in test_hashmap()
114 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_hashmap()
126 assert(bpf_map_get_next_key(fd, NULL, &next_key) < 0 && in test_hashmap()
128 assert(bpf_map_get_next_key(fd, &key, &next_key) < 0 && in test_hashmap()
158 long long key, next_key, first_key; in test_hashmap_percpu() local
231 while (!bpf_map_get_next_key(fd, &key, &next_key)) { in test_hashmap_percpu()
233 assert(next_key == first_key); in test_hashmap_percpu()
236 assert((expected_key_mask & next_key) == next_key); in test_hashmap_percpu()
237 expected_key_mask &= ~next_key; in test_hashmap_percpu()
239 assert(bpf_map_lookup_elem(fd, &next_key, value) == 0); in test_hashmap_percpu()
244 key = next_key; in test_hashmap_percpu()
261 assert(bpf_map_get_next_key(fd, NULL, &next_key) < 0 && in test_hashmap_percpu()
263 assert(bpf_map_get_next_key(fd, &key, &next_key) < 0 && in test_hashmap_percpu()
294 long long key, value, next_key; in test_hashmap_walk() local
300 &next_key) == 0; i++) { in test_hashmap_walk()
301 key = next_key; in test_hashmap_walk()
309 next_key_valid = bpf_map_get_next_key(fd, &key, &next_key) == 0; in test_hashmap_walk()
313 key = next_key; in test_hashmap_walk()
319 &next_key) == 0; i++) { in test_hashmap_walk()
320 key = next_key; in test_hashmap_walk()
364 int key, next_key, fd; in test_arraymap() local
401 assert(bpf_map_get_next_key(fd, NULL, &next_key) == 0 && in test_arraymap()
402 next_key == 0); in test_arraymap()
403 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_arraymap()
404 next_key == 0); in test_arraymap()
405 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap()
406 next_key == 1); in test_arraymap()
407 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_arraymap()
421 int key, next_key, fd, i; in test_arraymap_percpu() local
460 assert(bpf_map_get_next_key(fd, NULL, &next_key) == 0 && in test_arraymap_percpu()
461 next_key == 0); in test_arraymap_percpu()
462 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_arraymap_percpu()
463 next_key == 0); in test_arraymap_percpu()
464 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap_percpu()
465 next_key == 1); in test_arraymap_percpu()
466 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_arraymap_percpu()