/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A 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, in test_lru_sanity0() 242 int lru_map_fd, expected_map_fd; test_lru_sanity1() local 319 int lru_map_fd, expected_map_fd; test_lru_sanity2() local 425 int lru_map_fd, expected_map_fd; test_lru_sanity3() local 488 int lru_map_fd, expected_map_fd; test_lru_sanity4() local 611 int lru_map_fd, expected_map_fd; test_lru_sanity6() local 679 int lru_map_fd, expected_map_fd; test_lru_sanity7() local 770 int lru_map_fd, expected_map_fd; test_lru_sanity8() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
H A D | test_lru_map.c | 162 int lru_map_fd, expected_map_fd; in test_lru_sanity0() local 171 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0() 173 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0() 174 assert(lru_map_fd != -1); in test_lru_sanity0() 184 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0() 189 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0() 193 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0() 200 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0() 204 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -1 && in test_lru_sanity0() 208 assert(!bpf_map_update_elem(lru_map_fd, in test_lru_sanity0() 251 int lru_map_fd, expected_map_fd; test_lru_sanity1() local 328 int lru_map_fd, expected_map_fd; test_lru_sanity2() local 435 int lru_map_fd, expected_map_fd; test_lru_sanity3() local 498 int lru_map_fd, expected_map_fd; test_lru_sanity4() local 622 int lru_map_fd, expected_map_fd; test_lru_sanity6() local 690 int lru_map_fd, expected_map_fd; test_lru_sanity7() local 786 int lru_map_fd, expected_map_fd; test_lru_sanity8() local [all...] |
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | test_lru_dist.c | 276 unsigned int lru_map_fd = ((unsigned int *)data)[0]; in do_test_lru_dist() local 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() 291 printf("bpf_map_update_elem(lru_map_fd, %llu): errno:%d\n", in do_test_lru_dist() 307 close(lru_map_fd); in do_test_lru_dist() 314 int lru_map_fd; in test_parallel_lru_dist() local 320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 323 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 325 assert(lru_map_fd != -1); in test_parallel_lru_dist() 327 child_data[0] = lru_map_fd; in test_parallel_lru_dist() [all...] |
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | test_lru_dist.c | 273 unsigned int lru_map_fd = ((unsigned int *)data)[0]; in do_test_lru_dist() local 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() 288 printf("bpf_map_update_elem(lru_map_fd, %llu): errno:%d\n", in do_test_lru_dist() 304 close(lru_map_fd); in do_test_lru_dist() 311 int lru_map_fd; in test_parallel_lru_dist() local 317 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 322 assert(lru_map_fd != -1); in test_parallel_lru_dist() 324 child_data[0] = lru_map_fd; in test_parallel_lru_dist() [all...] |