Lines Matching refs:key

85 	unsigned long long key;  member
124 unsigned long long key) in pfect_lru_lookup_or_insert() argument
130 if (!bpf_map_lookup_elem(lru->map_fd, &key, &node)) { in pfect_lru_lookup_or_insert()
147 bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); in pfect_lru_lookup_or_insert()
150 node->key = key; in pfect_lru_lookup_or_insert()
155 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); in pfect_lru_lookup_or_insert()
158 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_NOEXIST)); in pfect_lru_lookup_or_insert()
270 unsigned long long key, value = 1234; in do_test_lru_dist() local
280 key = dist_keys[i] + key_offset; in do_test_lru_dist()
282 pfect_lru_lookup_or_insert(&pfect_lru, key); in do_test_lru_dist()
284 if (!bpf_map_lookup_elem(lru_map_fd, &key, &value)) in do_test_lru_dist()
287 if (bpf_map_update_elem(lru_map_fd, &key, &value, BPF_NOEXIST)) { in do_test_lru_dist()
289 key, errno); in do_test_lru_dist()
334 unsigned long long key, value[nr_cpus]; in test_lru_loss0() local
354 for (key = 1; key <= 1000; key++) { in test_lru_loss0()
357 assert(bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST) == 0); in test_lru_loss0()
360 end_key = min(key, 900); in test_lru_loss0()
368 for (key = 1; key <= 1000; key++) { in test_lru_loss0()
369 if (bpf_map_lookup_elem(map_fd, &key, value)) { in test_lru_loss0()
370 if (key <= 100) in test_lru_loss0()
372 else if (key <= 900) in test_lru_loss0()
388 unsigned long long key, value[nr_cpus]; in test_lru_loss1() local
406 for (key = 1; key <= 1000; key++) in test_lru_loss1()
407 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_loss1()
409 for (key = 1; key <= 1000; key++) { in test_lru_loss1()
410 if (bpf_map_lookup_elem(map_fd, &key, value)) in test_lru_loss1()
426 unsigned long long key, value[nr_cpus]; in do_test_parallel_lru_loss() local
446 key = rn % nr_stable_elems + stable_base; in do_test_parallel_lru_loss()
447 bpf_map_lookup_elem(map_fd, &key, value); in do_test_parallel_lru_loss()
455 key = stable_base; in do_test_parallel_lru_loss()
457 if (bpf_map_lookup_elem(map_fd, &key, value)) in do_test_parallel_lru_loss()
459 key++; in do_test_parallel_lru_loss()