Lines Matching refs:map_fd
32 int map_fd; in create_map() local
34 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map()
37 if (map_fd == -1) in create_map()
40 return map_fd; in create_map()
492 static void do_test_lru_sanity5(unsigned long long last_key, int map_fd) in do_test_lru_sanity5() argument
497 assert(!bpf_map_lookup_elem(map_fd, &last_key, value)); in do_test_lru_sanity5()
502 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in do_test_lru_sanity5()
503 assert(!bpf_map_lookup_elem(map_fd, &key, value)); in do_test_lru_sanity5()
506 assert(bpf_map_lookup_elem(map_fd, &last_key, value)); in do_test_lru_sanity5()
514 int map_fd; in test_lru_sanity5() local
522 map_fd = create_map(map_type, map_flags, 1); in test_lru_sanity5()
523 assert(map_fd != -1); in test_lru_sanity5()
527 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity5()
534 do_test_lru_sanity5(key, map_fd); in test_lru_sanity5()
549 close(map_fd); in test_lru_sanity5()