Home
last modified time | relevance | path

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

12

/Linux-v4.19/samples/bpf/
Dtracex2_user.c44 struct hist_key key = {}, next_key; in print_hist_for_pid() local
53 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_hist_for_pid()
54 if (memcmp(&next_key, task, SIZE)) { in print_hist_for_pid()
55 key = next_key; in print_hist_for_pid()
58 bpf_map_lookup_elem(fd, &next_key, values); in print_hist_for_pid()
62 ind = next_key.index; in print_hist_for_pid()
68 key = next_key; in print_hist_for_pid()
83 struct hist_key key = {}, next_key; in print_hist() local
88 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_hist()
92 if (memcmp(&tasks[i], &next_key, SIZE) == 0) in print_hist()
[all …]
Dlwt_len_hist_user.c36 uint64_t key = 0, next_key, max_key = 0; in main() local
47 while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { in main()
48 if (next_key >= MAX_INDEX) { in main()
49 fprintf(stderr, "Key %lu out of bounds\n", next_key); in main()
53 bpf_map_lookup_elem(map_fd, &next_key, values); in main()
59 data[next_key] = sum; in main()
60 if (sum && next_key > max_key) in main()
61 max_key = next_key; in main()
66 key = next_key; in main()
Dspintest_user.c15 long key, next_key, value; in main() local
36 while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { in main()
37 bpf_map_lookup_elem(map_fd[0], &next_key, &value); in main()
38 assert(next_key == value); in main()
41 key = next_key; in main()
46 while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) in main()
47 bpf_map_delete_elem(map_fd[0], &next_key); in main()
Dsockex3_user.c67 struct bpf_flow_keys key = {}, next_key; in main() local
72 while (bpf_map_get_next_key(map_fd[2], &key, &next_key) == 0) { in main()
73 bpf_map_lookup_elem(map_fd[2], &next_key, &value); in main()
75 inet_ntoa((struct in_addr){htonl(next_key.src)}), in main()
76 next_key.port16[0], in main()
77 inet_ntoa((struct in_addr){htonl(next_key.dst)}), in main()
78 next_key.port16[1], in main()
80 key = next_key; in main()
Dsockex2_user.c41 int key = 0, next_key; in main() local
44 while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { in main()
45 bpf_map_lookup_elem(map_fd[0], &next_key, &value); in main()
47 inet_ntoa((struct in_addr){htonl(next_key)}), in main()
49 key = next_key; in main()
Dtracex4_user.c36 __u64 key, next_key; in print_old_objects() local
42 while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { in print_old_objects()
43 bpf_map_lookup_elem(map_fd[0], &next_key, &v); in print_old_objects()
44 key = next_key; in print_old_objects()
49 next_key, (val - v.val) / 1000000000ll, v.ip); in print_old_objects()
Doffwaketime_user.c78 struct key_t key = {}, next_key; in print_stacks() local
81 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_stacks()
82 bpf_map_lookup_elem(fd, &next_key, &value); in print_stacks()
83 print_stack(&next_key, value); in print_stacks()
84 key = next_key; in print_stacks()
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()
Dtrace_event_user.c100 struct key_t key = {}, next_key; in print_stacks() local
106 while (bpf_map_get_next_key(fd, &key, &next_key) == 0) { in print_stacks()
107 bpf_map_lookup_elem(fd, &next_key, &value); in print_stacks()
108 print_stack(&next_key, value); in print_stacks()
109 bpf_map_delete_elem(fd, &next_key); in print_stacks()
110 key = next_key; in print_stacks()
/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_maps.c47 long long key, next_key, first_key, value; in test_hashmap() local
110 assert(bpf_map_get_next_key(fd, &key, &next_key) == 0 && in test_hashmap()
111 (next_key == first_key)); in test_hashmap()
112 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == 0 && in test_hashmap()
113 (next_key == 1 || next_key == 2) && in test_hashmap()
114 (next_key != first_key)); in test_hashmap()
115 assert(bpf_map_get_next_key(fd, &next_key, &next_key) == -1 && in test_hashmap()
127 assert(bpf_map_get_next_key(fd, NULL, &next_key) == -1 && in test_hashmap()
129 assert(bpf_map_get_next_key(fd, &key, &next_key) == -1 && in test_hashmap()
159 long long key, next_key, first_key; in test_hashmap_percpu() local
[all …]
Dtest_lru_map.c45 unsigned long long next_key = 0; in map_subset() local
49 while (!bpf_map_get_next_key(map1, &next_key, &next_key)) { in map_subset()
50 assert(!bpf_map_lookup_elem(map1, &next_key, value1)); in map_subset()
51 ret = bpf_map_lookup_elem(map0, &next_key, value0); in map_subset()
54 next_key, strerror(errno), errno); in map_subset()
59 next_key, value0[0], value1[0]); in map_subset()
/Linux-v4.19/fs/btrfs/
Dtree-checker.c646 struct btrfs_key key, next_key; in btrfs_check_node() local
663 btrfs_node_key_to_cpu(node, &next_key, slot + 1); in btrfs_check_node()
679 if (btrfs_comp_cpu_keys(&key, &next_key) >= 0) { in btrfs_check_node()
683 next_key.objectid, next_key.type, in btrfs_check_node()
684 next_key.offset); in btrfs_check_node()
Dreada.c136 struct btrfs_key next_key; in __readahead_hook() local
140 btrfs_node_key_to_cpu(eb, &next_key, i + 1); in __readahead_hook()
142 next_key = re->top; in __readahead_hook()
166 btrfs_comp_cpu_keys(&next_key, &rc->key_start) > 0) in __readahead_hook()
167 reada_add_block(rc, bytenr, &next_key, n_gen); in __readahead_hook()
Drelocation.c1740 struct btrfs_path *path, struct btrfs_key *next_key, in replace_path() argument
1782 if (next_key) { in replace_path()
1783 next_key->objectid = (u64)-1; in replace_path()
1784 next_key->type = (u8)-1; in replace_path()
1785 next_key->offset = (u64)-1; in replace_path()
1799 if (next_key && slot + 1 < btrfs_header_nritems(parent)) in replace_path()
1800 btrfs_node_key_to_cpu(parent, next_key, slot + 1); in replace_path()
2129 struct btrfs_key next_key; in merge_reloc_root() local
2168 btrfs_node_key_to_cpu(path->nodes[level], &next_key, in merge_reloc_root()
2170 WARN_ON(memcmp(&key, &next_key, sizeof(key))); in merge_reloc_root()
[all …]
/Linux-v4.19/drivers/net/ethernet/netronome/nfp/bpf/
Dcmsg.c418 void *next_key) in nfp_bpf_ctrl_getfirst_entry() argument
421 NULL, NULL, 0, next_key, NULL); in nfp_bpf_ctrl_getfirst_entry()
425 void *key, void *next_key) in nfp_bpf_ctrl_getnext_entry() argument
428 key, NULL, 0, next_key, NULL); in nfp_bpf_ctrl_getnext_entry()
Dmain.h500 void *next_key);
507 void *key, void *next_key);
Doffload.c330 void *key, void *next_key) in nfp_bpf_map_get_next_key() argument
333 return nfp_bpf_ctrl_getfirst_entry(offmap, next_key); in nfp_bpf_map_get_next_key()
334 return nfp_bpf_ctrl_getnext_entry(offmap, key, next_key); in nfp_bpf_map_get_next_key()
/Linux-v4.19/tools/perf/ui/tui/
Dutil.c137 goto next_key; in ui_browser__input_window()
156 next_key: in ui_browser__input_window()
/Linux-v4.19/kernel/bpf/
Dxskmap.c96 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in xsk_map_get_next_key() argument
100 u32 *next = next_key; in xsk_map_get_next_key()
Dreuseport_array.c338 void *next_key) in reuseport_array_get_next_key() argument
342 u32 *next = (u32 *)next_key; in reuseport_array_get_next_key()
Dlpm_trie.c602 struct bpf_lpm_trie_key *key = _key, *next_key = _next_key; in trie_get_next_key() local
683 next_key->prefixlen = next_node->prefixlen; in trie_get_next_key()
684 memcpy((void *)next_key + offsetof(struct bpf_lpm_trie_key, data), in trie_get_next_key()
Dsyscall.c894 #define BPF_MAP_GET_NEXT_KEY_LAST_FIELD next_key
899 void __user *unext_key = u64_to_user_ptr(attr->next_key); in map_get_next_key()
902 void *key, *next_key; in map_get_next_key() local
930 next_key = kmalloc(map->key_size, GFP_USER); in map_get_next_key()
931 if (!next_key) in map_get_next_key()
935 err = bpf_map_offload_get_next_key(map, key, next_key); in map_get_next_key()
940 err = map->ops->map_get_next_key(map, key, next_key); in map_get_next_key()
947 if (copy_to_user(unext_key, next_key, map->key_size) != 0) in map_get_next_key()
953 kfree(next_key); in map_get_next_key()
/Linux-v4.19/tools/lib/bpf/
Dbpf.h90 int bpf_map_get_next_key(int fd, const void *key, void *next_key);
Dbpf.c300 int bpf_map_get_next_key(int fd, const void *key, void *next_key) in bpf_map_get_next_key() argument
307 attr.next_key = ptr_to_u64(next_key); in bpf_map_get_next_key()
/Linux-v4.19/include/linux/
Dbpf.h35 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
94 void *key, void *next_key);
667 void *key, void *next_key);

12