Lines Matching refs:map_fd
31 int map_fd; in create_map() local
33 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map()
36 if (map_fd == -1) in create_map()
39 return map_fd; in create_map()
555 static void do_test_lru_sanity5(unsigned long long last_key, int map_fd) in do_test_lru_sanity5() argument
560 assert(!bpf_map_lookup_elem_with_ref_bit(map_fd, last_key, value)); in do_test_lru_sanity5()
564 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in do_test_lru_sanity5()
565 assert(!bpf_map_lookup_elem_with_ref_bit(map_fd, key, value)); in do_test_lru_sanity5()
568 assert(bpf_map_lookup_elem(map_fd, &last_key, value) == -1 && in do_test_lru_sanity5()
577 int map_fd; in test_lru_sanity5() local
585 map_fd = create_map(map_type, map_flags, 1); in test_lru_sanity5()
586 assert(map_fd != -1); in test_lru_sanity5()
590 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity5()
597 do_test_lru_sanity5(key, map_fd); in test_lru_sanity5()
612 close(map_fd); in test_lru_sanity5()