Lines Matching refs:skel
41 struct test_map_init *skel; in setup() local
44 skel = test_map_init__open(); in setup()
45 if (!ASSERT_OK_PTR(skel, "skel_open")) in setup()
48 err = bpf_map__set_type(skel->maps.hashmap1, map_type); in setup()
52 err = bpf_map__set_max_entries(skel->maps.hashmap1, map_sz); in setup()
56 err = test_map_init__load(skel); in setup()
60 *map_fd = bpf_map__fd(skel->maps.hashmap1); in setup()
68 return skel; in setup()
73 test_map_init__destroy(skel); in setup()
78 static int prog_run_insert_elem(struct test_map_init *skel, map_key_t key, in prog_run_insert_elem() argument
83 bss = skel->bss; in prog_run_insert_elem()
89 if (!ASSERT_OK(test_map_init__attach(skel), "skel_attach")) in prog_run_insert_elem()
95 test_map_init__detach(skel); in prog_run_insert_elem()
132 struct test_map_init *skel; in test_pcpu_map_init() local
137 skel = setup(BPF_MAP_TYPE_PERCPU_HASH, 1, &map_fd, 1); in test_pcpu_map_init()
138 if (!ASSERT_OK_PTR(skel, "prog_setup")) in test_pcpu_map_init()
148 err = prog_run_insert_elem(skel, key, TEST_VALUE); in test_pcpu_map_init()
161 test_map_init__destroy(skel); in test_pcpu_map_init()
172 struct test_map_init *skel; in test_pcpu_lru_map_init() local
179 skel = setup(BPF_MAP_TYPE_LRU_PERCPU_HASH, 2, &map_fd, 2); in test_pcpu_lru_map_init()
180 if (!ASSERT_OK_PTR(skel, "prog_setup")) in test_pcpu_lru_map_init()
185 err = prog_run_insert_elem(skel, key, TEST_VALUE); in test_pcpu_lru_map_init()
198 test_map_init__destroy(skel); in test_pcpu_lru_map_init()