Searched refs:lru_map_fd (Results 1 – 2 of 2) sorted by relevance
/Linux-v6.1/tools/testing/selftests/bpf/ |
D | test_lru_map.c | 151 int lru_map_fd, expected_map_fd; in test_lru_sanity0() local 160 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0() 162 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0() 163 assert(lru_map_fd != -1); in test_lru_sanity0() 173 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0() 178 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -EEXIST); in test_lru_sanity0() 181 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -EINVAL); in test_lru_sanity0() 187 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -ENOENT); in test_lru_sanity0() 190 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -ENOENT); in test_lru_sanity0() 193 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0() [all …]
|
/Linux-v6.1/samples/bpf/ |
D | test_lru_dist.c | 278 unsigned int lru_map_fd = ((unsigned int *)data)[0]; in do_test_lru_dist() local 289 if (!bpf_map_lookup_elem(lru_map_fd, &key, &value)) in do_test_lru_dist() 292 if (bpf_map_update_elem(lru_map_fd, &key, &value, BPF_NOEXIST)) { in do_test_lru_dist() 309 close(lru_map_fd); in do_test_lru_dist() 316 int lru_map_fd; in test_parallel_lru_dist() local 322 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 325 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 327 assert(lru_map_fd != -1); in test_parallel_lru_dist() 329 child_data[0] = lru_map_fd; in test_parallel_lru_dist() 334 close(lru_map_fd); in test_parallel_lru_dist()
|