Lines Matching refs:key
91 unsigned long long key; member
130 unsigned long long key) in pfect_lru_lookup_or_insert() argument
136 if (!bpf_map_lookup_elem(lru->map_fd, &key, &node)) { in pfect_lru_lookup_or_insert()
153 bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); in pfect_lru_lookup_or_insert()
156 node->key = key; in pfect_lru_lookup_or_insert()
161 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); in pfect_lru_lookup_or_insert()
164 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_NOEXIST)); in pfect_lru_lookup_or_insert()
273 unsigned long long key, value = 1234; in do_test_lru_dist() local
283 key = dist_keys[i] + key_offset; in do_test_lru_dist()
285 pfect_lru_lookup_or_insert(&pfect_lru, key); in do_test_lru_dist()
287 if (!bpf_map_lookup_elem(lru_map_fd, &key, &value)) in do_test_lru_dist()
290 if (bpf_map_update_elem(lru_map_fd, &key, &value, BPF_NOEXIST)) { in do_test_lru_dist()
292 key, errno); in do_test_lru_dist()
337 unsigned long long key, value[nr_cpus]; in test_lru_loss0() local
357 for (key = 1; key <= 1000; key++) { in test_lru_loss0()
360 assert(bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST) == 0); in test_lru_loss0()
363 end_key = min(key, 900); in test_lru_loss0()
371 for (key = 1; key <= 1000; key++) { in test_lru_loss0()
372 if (bpf_map_lookup_elem(map_fd, &key, value)) { in test_lru_loss0()
373 if (key <= 100) in test_lru_loss0()
375 else if (key <= 900) in test_lru_loss0()
391 unsigned long long key, value[nr_cpus]; in test_lru_loss1() local
409 for (key = 1; key <= 1000; key++) in test_lru_loss1()
410 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_loss1()
412 for (key = 1; key <= 1000; key++) { in test_lru_loss1()
413 if (bpf_map_lookup_elem(map_fd, &key, value)) in test_lru_loss1()
429 unsigned long long key, value[nr_cpus]; in do_test_parallel_lru_loss() local
449 key = rn % nr_stable_elems + stable_base; in do_test_parallel_lru_loss()
450 bpf_map_lookup_elem(map_fd, &key, value); in do_test_parallel_lru_loss()
458 key = stable_base; in do_test_parallel_lru_loss()
460 if (bpf_map_lookup_elem(map_fd, &key, value)) in do_test_parallel_lru_loss()
462 key++; in do_test_parallel_lru_loss()