Lines Matching refs:cpu

82 static void test_hash_prealloc(int cpu)  in test_hash_prealloc()  argument
91 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_hash_prealloc()
120 static void do_test_lru(enum test_type test, int cpu) in do_test_lru() argument
129 if (test == INNER_LRU_HASH_PREALLOC && cpu) { in do_test_lru()
140 assert(cpu < MAX_NR_CPUS); in do_test_lru()
146 inner_lru_map_fds[cpu] = in do_test_lru()
152 if (inner_lru_map_fds[cpu] == -1) { in do_test_lru()
158 ret = bpf_map_update_elem(outer_fd, &cpu, in do_test_lru()
159 &inner_lru_map_fds[cpu], in do_test_lru()
163 cpu, strerror(errno), errno); in do_test_lru()
199 cpu, test_name, in do_test_lru()
203 static void test_lru_hash_prealloc(int cpu) in test_lru_hash_prealloc() argument
205 do_test_lru(LRU_HASH_PREALLOC, cpu); in test_lru_hash_prealloc()
208 static void test_nocommon_lru_hash_prealloc(int cpu) in test_nocommon_lru_hash_prealloc() argument
210 do_test_lru(NOCOMMON_LRU_HASH_PREALLOC, cpu); in test_nocommon_lru_hash_prealloc()
213 static void test_inner_lru_hash_prealloc(int cpu) in test_inner_lru_hash_prealloc() argument
215 do_test_lru(INNER_LRU_HASH_PREALLOC, cpu); in test_inner_lru_hash_prealloc()
218 static void test_lru_hash_lookup(int cpu) in test_lru_hash_lookup() argument
220 do_test_lru(LRU_HASH_LOOKUP, cpu); in test_lru_hash_lookup()
223 static void test_percpu_hash_prealloc(int cpu) in test_percpu_hash_prealloc() argument
232 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_percpu_hash_prealloc()
235 static void test_hash_kmalloc(int cpu) in test_hash_kmalloc() argument
244 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_hash_kmalloc()
247 static void test_percpu_hash_kmalloc(int cpu) in test_percpu_hash_kmalloc() argument
256 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_percpu_hash_kmalloc()
259 static void test_lpm_kmalloc(int cpu) in test_lpm_kmalloc() argument
268 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_lpm_kmalloc()
271 static void test_hash_lookup(int cpu) in test_hash_lookup() argument
280 cpu, max_cnt * 1000000000ll * 64 / (time_get_ns() - start_time)); in test_hash_lookup()
283 static void test_array_lookup(int cpu) in test_array_lookup() argument
292 cpu, max_cnt * 1000000000ll * 64 / (time_get_ns() - start_time)); in test_array_lookup()
300 typedef void (*test_func)(int cpu);
331 static void loop(int cpu) in loop() argument
337 CPU_SET(cpu, &cpuset); in loop()
342 test_funcs[i](cpu); in loop()