Home
last modified time | relevance | path

Searched refs:next_key_p (Results 1 – 2 of 2) sorted by relevance

/linux-6.1.9/tools/testing/selftests/bpf/
Dtest_lpm_map.c535 struct bpf_lpm_trie_key *key_p, *next_key_p; in test_lpm_get_next_key() local
542 next_key_p = alloca(key_size); in test_lpm_get_next_key()
560 assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -ENOENT); in test_lpm_get_next_key()
578 memset(next_key_p, 0, key_size); in test_lpm_get_next_key()
579 assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); in test_lpm_get_next_key()
580 assert(next_key_p->prefixlen == 16 && next_key_p->data[0] == 192 && in test_lpm_get_next_key()
581 next_key_p->data[1] == 168); in test_lpm_get_next_key()
583 memcpy(key_p, next_key_p, key_size); in test_lpm_get_next_key()
584 assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -ENOENT); in test_lpm_get_next_key()
596 memset(next_key_p, 0, key_size); in test_lpm_get_next_key()
[all …]
Dtest_progs.c552 __u32 key, next_key, *cur_key_p, *next_key_p; in compare_stack_ips() local
559 next_key_p = &key; in compare_stack_ips()
560 while (bpf_map_get_next_key(smap_fd, cur_key_p, next_key_p) == 0) { in compare_stack_ips()
561 err = bpf_map_lookup_elem(smap_fd, next_key_p, val_buf1); in compare_stack_ips()
564 err = bpf_map_lookup_elem(amap_fd, next_key_p, val_buf2); in compare_stack_ips()
573 key = *next_key_p; in compare_stack_ips()
575 next_key_p = &next_key; in compare_stack_ips()