Lines Matching refs:map_flags

28 static int create_map(int map_type, int map_flags, unsigned int size)  in create_map()  argument
30 LIBBPF_OPTS(bpf_map_create_opts, opts, .map_flags = map_flags); in create_map()
149 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
156 map_flags); in test_lru_sanity0()
160 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity0()
161 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
163 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0()
240 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
248 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity1()
253 map_flags); in test_lru_sanity1()
261 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1()
316 static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity2() argument
325 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity2()
330 map_flags); in test_lru_sanity2()
338 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity2()
423 static void test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity3() argument
431 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity3()
436 map_flags); in test_lru_sanity3()
444 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity3()
487 static void test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity4() argument
495 map_flags); in test_lru_sanity4()
499 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity4()
500 lru_map_fd = create_map(map_type, map_flags, in test_lru_sanity4()
503 lru_map_fd = create_map(map_type, map_flags, 3 * tgt_free); in test_lru_sanity4()
563 static void test_lru_sanity5(int map_type, int map_flags) in test_lru_sanity5() argument
569 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity5()
573 map_flags); in test_lru_sanity5()
575 map_fd = create_map(map_type, map_flags, 1); in test_lru_sanity5()
610 static void test_lru_sanity6(int map_type, int map_flags, int tgt_free) in test_lru_sanity6() argument
617 if (!(map_flags & BPF_F_NO_COMMON_LRU)) in test_lru_sanity6()
621 map_flags); in test_lru_sanity6()
628 lru_map_fd = create_map(map_type, map_flags, map_size * nr_cpus); in test_lru_sanity6()
677 static void test_lru_sanity7(int map_type, int map_flags) in test_lru_sanity7() argument
684 map_flags); in test_lru_sanity7()
688 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity7()
689 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity7()
691 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity7()
768 static void test_lru_sanity8(int map_type, int map_flags) in test_lru_sanity8() argument
775 map_flags); in test_lru_sanity8()
779 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity8()
780 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity8()
782 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity8()
854 int map_flags[] = {0, BPF_F_NO_COMMON_LRU}; in main() local
866 for (f = 0; f < ARRAY_SIZE(map_flags); f++) { in main()
867 unsigned int tgt_free = (map_flags[f] & BPF_F_NO_COMMON_LRU) ? in main()
871 test_lru_sanity0(map_types[t], map_flags[f]); in main()
872 test_lru_sanity1(map_types[t], map_flags[f], tgt_free); in main()
873 test_lru_sanity2(map_types[t], map_flags[f], tgt_free); in main()
874 test_lru_sanity3(map_types[t], map_flags[f], tgt_free); in main()
875 test_lru_sanity4(map_types[t], map_flags[f], tgt_free); in main()
876 test_lru_sanity5(map_types[t], map_flags[f]); in main()
877 test_lru_sanity6(map_types[t], map_flags[f], tgt_free); in main()
878 test_lru_sanity7(map_types[t], map_flags[f]); in main()
879 test_lru_sanity8(map_types[t], map_flags[f]); in main()