Home
last modified time | relevance | path

Searched refs:next_key (Results 1 – 25 of 52) sorted by relevance

123

/linux-6.15/samples/bpf/
H A Dlwt_len_hist_user.c34 uint64_t key = 0, next_key, max_key = 0; in main() local
45 while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { in main()
46 if (next_key >= MAX_INDEX) { in main()
47 fprintf(stderr, "Key %lu out of bounds\n", next_key); in main()
51 bpf_map_lookup_elem(map_fd, &next_key, values); in main()
57 data[next_key] = sum; in main()
58 if (sum && next_key > max_key) in main()
59 max_key = next_key; in main()
64 key = next_key; in main()
H A Dsockex3_user.c80 struct flow_key_record key = {}, next_key; in main() local
85 while (bpf_map_get_next_key(hash_map_fd, &key, &next_key) == 0) { in main()
86 bpf_map_lookup_elem(hash_map_fd, &next_key, &value); in main()
88 inet_ntoa((struct in_addr){htonl(next_key.src)}), in main()
89 next_key.port16[0], in main()
90 inet_ntoa((struct in_addr){htonl(next_key.dst)}), in main()
91 next_key.port16[1], in main()
93 key = next_key; in main()
H A Dspintest_user.c14 long key, next_key, value; in main() local
58 while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { in main()
59 bpf_map_lookup_elem(map_fd, &next_key, &value); in main()
60 assert(next_key == value); in main()
62 key = next_key; in main()
73 while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) in main()
74 bpf_map_delete_elem(map_fd, &next_key); in main()
H A Dsockex2_user.c49 int key = 0, next_key; in main() local
52 while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { in main()
53 bpf_map_lookup_elem(map_fd, &next_key, &value); in main()
55 inet_ntoa((struct in_addr){htonl(next_key)}), in main()
57 key = next_key; in main()
H A Dtracex4_user.c31 __u64 key, next_key; in print_old_objects() local
37 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_old_objects()
38 bpf_map_lookup_elem(fd, &next_key, &v); in print_old_objects()
39 key = next_key; in print_old_objects()
44 next_key, (val - v.val) / 1000000000ll, v.ip); in print_old_objects()
H A Doffwaketime_user.c79 struct key_t key = {}, next_key; in print_stacks() local
82 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_stacks()
83 bpf_map_lookup_elem(fd, &next_key, &value); in print_stacks()
84 print_stack(&next_key, value); in print_stacks()
85 key = next_key; in print_stacks()
H A Dsampleip_user.c92 __u64 key, next_key; in print_ip_map() local
100 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_ip_map()
101 bpf_map_lookup_elem(fd, &next_key, &value); in print_ip_map()
102 counts[i].ip = next_key; in print_ip_map()
104 key = next_key; in print_ip_map()
H A Dtrace_event_user.c102 struct key_t key = {}, next_key; in print_stacks() local
108 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_stacks()
109 bpf_map_lookup_elem(fd, &next_key, &value); in print_stacks()
110 print_stack(&next_key, value); in print_stacks()
111 bpf_map_delete_elem(fd, &next_key); in print_stacks()
112 key = next_key; in print_stacks()
/linux-6.15/tools/testing/selftests/bpf/
H A Dtest_maps.c106 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()
109 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_hashmap()
230 assert((expected_key_mask & next_key) == next_key); in test_hashmap_percpu()
238 key = next_key; in test_hashmap_percpu()
296 key = next_key; in test_hashmap_walk()
308 key = next_key; in test_hashmap_walk()
399 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap()
401 assert(bpf_map_get_next_key(fd, &next_key, &next_key) < 0 && in test_arraymap()
458 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_arraymap_percpu()
[all …]
H A Dtest_lru_map.c95 unsigned long long next_key = 0; in map_subset() local
99 while (!bpf_map_get_next_key(map1, &next_key, &next_key)) { in map_subset()
100 assert(!bpf_map_lookup_elem(map1, &next_key, value1)); in map_subset()
101 ret = bpf_map_lookup_elem(map0, &next_key, value0); in map_subset()
104 next_key, strerror(errno), errno); in map_subset()
109 next_key, value0[0], value1[0]); in map_subset()
/linux-6.15/tools/testing/selftests/bpf/map_tests/
H A Dlpm_trie_map_basic_ops.c1007 struct lpm_trie_bytes_key key, next_key; in test_lpm_trie_iterate_strs() local
1072 i, next_key.prefixlen, (len + 1) * 8); in test_lpm_trie_iterate_strs()
1076 cur = &next_key; in test_lpm_trie_iterate_strs()
1078 err = bpf_map_get_next_key(fd, cur, &next_key); in test_lpm_trie_iterate_strs()
1089 i, next_key.prefixlen, (len + 1) * 8); in test_lpm_trie_iterate_strs()
1093 cur = &next_key; in test_lpm_trie_iterate_strs()
1098 err = bpf_map_get_next_key(fd, cur, &next_key); in test_lpm_trie_iterate_strs()
1112 struct lpm_trie_int_key key, next_key; in test_lpm_trie_iterate_ints() local
1140 i, next_key.prefixlen); in test_lpm_trie_iterate_ints()
1143 cur = &next_key; in test_lpm_trie_iterate_ints()
[all …]
H A Dlpm_trie_map_get_next_key.c34 struct test_lpm_key next_key; in get_next_key_fn() local
41 bpf_map_get_next_key(ctx->map_fd, &ctx->key, &next_key); in get_next_key_fn()
/linux-6.15/Documentation/bpf/
H A Dmap_lpm_trie.rst94 int bpf_map_get_next_key (int fd, const void *cur_key, void *next_key)
182 struct ipv4_lpm_key next_key;
187 err = bpf_map_get_next_key(map_fd, cur_key, &next_key);
191 bpf_map_lookup_elem(map_fd, &next_key, &value);
195 cur_key = &next_key;
H A Dmap_hash.rst126 int bpf_map_get_next_key(int fd, const void *cur_key, void *next_key)
203 struct key next_key;
208 err = bpf_map_get_next_key(map_fd, cur_key, &next_key);
212 bpf_map_lookup_elem(map_fd, &next_key, &value);
216 cur_key = &next_key;
/linux-6.15/drivers/net/ethernet/netronome/nfp/bpf/
H A Dcmsg.c406 void *next_key) in nfp_bpf_ctrl_getfirst_entry() argument
409 NULL, NULL, 0, next_key, NULL); in nfp_bpf_ctrl_getfirst_entry()
413 void *key, void *next_key) in nfp_bpf_ctrl_getnext_entry() argument
416 key, NULL, 0, next_key, NULL); in nfp_bpf_ctrl_getnext_entry()
H A Dmain.h599 void *next_key);
606 void *key, void *next_key);
H A Doffload.c309 void *key, void *next_key) in nfp_bpf_map_get_next_key() argument
312 return nfp_bpf_ctrl_getfirst_entry(offmap, next_key); in nfp_bpf_map_get_next_key()
313 return nfp_bpf_ctrl_getnext_entry(offmap, key, next_key); in nfp_bpf_map_get_next_key()
/linux-6.15/tools/perf/ui/tui/
H A Dutil.c139 goto next_key; in ui_browser__input_window()
158 next_key: in ui_browser__input_window()
/linux-6.15/drivers/char/
H A Drandom.c675 u8 seed[BLAKE2S_HASH_SIZE], next_key[BLAKE2S_HASH_SIZE]; in extract_entropy() local
703 blake2s(next_key, (u8 *)&block, seed, sizeof(next_key), sizeof(block), sizeof(seed)); in extract_entropy()
704 blake2s_init_key(&input_pool.hash, BLAKE2S_HASH_SIZE, next_key, sizeof(next_key)); in extract_entropy()
707 memzero_explicit(next_key, sizeof(next_key)); in extract_entropy()
/linux-6.15/kernel/bpf/
H A Dreuseport_array.c317 void *next_key) in reuseport_array_get_next_key() argument
321 u32 *next = (u32 *)next_key; in reuseport_array_get_next_key()
H A Dlpm_trie.c660 struct bpf_lpm_trie_key_u8 *key = _key, *next_key = _next_key; in trie_get_next_key() local
746 next_key->prefixlen = next_node->prefixlen; in trie_get_next_key()
747 memcpy((void *)next_key + offsetof(struct bpf_lpm_trie_key_u8, data), in trie_get_next_key()
H A Dbpf_inode_storage.c179 void *next_key) in notsupp_get_next_key() argument
H A Ddevmap.c254 static int dev_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in dev_map_get_next_key() argument
258 u32 *next = next_key; in dev_map_get_next_key()
290 void *next_key) in dev_map_hash_get_next_key() argument
293 u32 idx, *next = next_key; in dev_map_hash_get_next_key()
/linux-6.15/net/xdp/
H A Dxskmap.c104 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in xsk_map_get_next_key() argument
108 u32 *next = next_key; in xsk_map_get_next_key()
/linux-6.15/fs/btrfs/
H A Drelocation.c1042 if (next_key) { in replace_path()
1043 next_key->objectid = (u64)-1; in replace_path()
1044 next_key->type = (u8)-1; in replace_path()
1045 next_key->offset = (u64)-1; in replace_path()
1495 struct btrfs_key next_key; in merge_reloc_root() local
1536 WARN_ON(memcmp(&key, &next_key, sizeof(key))); in merge_reloc_root()
1551 memset(&next_key, 0, sizeof(next_key)); in merge_reloc_root()
1589 btrfs_comp_cpu_keys(&next_key, &key) >= 0) { in merge_reloc_root()
1593 &next_key, level, max_level); in merge_reloc_root()
1623 invalidate_extent_cache(root, &key, &next_key); in merge_reloc_root()
[all …]

123