Lines Matching refs:map_flags

29 static int create_map(int map_type, int map_flags, unsigned int size)  in create_map()  argument
34 sizeof(unsigned long long), size, map_flags); in create_map()
159 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
166 map_flags); in test_lru_sanity0()
170 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity0()
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()
256 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
264 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity1()
269 map_flags); in test_lru_sanity1()
277 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1()
332 static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity2() argument
341 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity2()
346 map_flags); in test_lru_sanity2()
354 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity2()
440 static void test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity3() argument
448 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity3()
453 map_flags); in test_lru_sanity3()
461 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity3()
504 static void test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity4() argument
512 map_flags); in test_lru_sanity4()
516 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity4()
517 lru_map_fd = create_map(map_type, map_flags, in test_lru_sanity4()
520 lru_map_fd = create_map(map_type, map_flags, 3 * tgt_free); in test_lru_sanity4()
581 static void test_lru_sanity5(int map_type, int map_flags) in test_lru_sanity5() argument
587 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity5()
591 map_flags); in test_lru_sanity5()
593 map_fd = create_map(map_type, map_flags, 1); in test_lru_sanity5()
628 static void test_lru_sanity6(int map_type, int map_flags, int tgt_free) in test_lru_sanity6() argument
635 if (!(map_flags & BPF_F_NO_COMMON_LRU)) in test_lru_sanity6()
639 map_flags); in test_lru_sanity6()
646 lru_map_fd = create_map(map_type, map_flags, map_size * nr_cpus); in test_lru_sanity6()
695 static void test_lru_sanity7(int map_type, int map_flags) in test_lru_sanity7() argument
702 map_flags); in test_lru_sanity7()
706 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity7()
707 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity7()
709 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity7()
791 static void test_lru_sanity8(int map_type, int map_flags) in test_lru_sanity8() argument
798 map_flags); in test_lru_sanity8()
802 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity8()
803 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity8()
805 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity8()
882 int map_flags[] = {0, BPF_F_NO_COMMON_LRU}; in main() local
891 for (f = 0; f < sizeof(map_flags) / sizeof(*map_flags); f++) { in main()
892 unsigned int tgt_free = (map_flags[f] & BPF_F_NO_COMMON_LRU) ? in main()
896 test_lru_sanity0(map_types[t], map_flags[f]); in main()
897 test_lru_sanity1(map_types[t], map_flags[f], tgt_free); in main()
898 test_lru_sanity2(map_types[t], map_flags[f], tgt_free); in main()
899 test_lru_sanity3(map_types[t], map_flags[f], tgt_free); in main()
900 test_lru_sanity4(map_types[t], map_flags[f], tgt_free); in main()
901 test_lru_sanity5(map_types[t], map_flags[f]); in main()
902 test_lru_sanity6(map_types[t], map_flags[f], tgt_free); in main()
903 test_lru_sanity7(map_types[t], map_flags[f]); in main()
904 test_lru_sanity8(map_types[t], map_flags[f]); in main()