Lines Matching refs:uint32_t

47 constexpr uint32_t TEST_MAP_SIZE = 10;
48 constexpr uint32_t TEST_KEY1 = 1;
49 constexpr uint32_t TEST_VALUE1 = 10;
73 void checkMapInvalid(BpfMap<uint32_t, uint32_t>& map) { in checkMapInvalid() argument
78 void checkMapValid(BpfMap<uint32_t, uint32_t>& map) { in checkMapValid() argument
83 void writeToMapAndCheck(BpfMap<uint32_t, uint32_t>& map, uint32_t key, uint32_t value) { in writeToMapAndCheck() argument
85 uint32_t value_read; in writeToMapAndCheck()
90 void checkValueAndStatus(uint32_t refValue, Result<uint32_t> value) { in checkValueAndStatus()
95 void populateMap(uint32_t total, BpfMap<uint32_t, uint32_t>& map) { in populateMap() argument
96 for (uint32_t key = 0; key < total; key++) { in populateMap()
97 uint32_t value = key * 10; in populateMap()
102 void expectMapEmpty(BpfMap<uint32_t, uint32_t>& map) { in expectMapEmpty() argument
112 BpfMap<uint32_t, uint32_t> testMap1; in TEST_F()
115 BpfMap<uint32_t, uint32_t> testMap2(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
122 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
123 uint32_t key = TEST_KEY1; in TEST_F()
124 uint32_t value_write = TEST_VALUE1; in TEST_F()
126 Result<uint32_t> value_read = testMap.readValue(key); in TEST_F()
128 Result<uint32_t> key_read = testMap.getFirstKey(); in TEST_F()
138 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
139 uint32_t key = TEST_KEY1; in TEST_F()
140 uint32_t value_write = TEST_VALUE1; in TEST_F()
152 BpfMap<uint32_t, uint32_t> testMap1(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
153 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
155 uint32_t key = TEST_KEY1; in TEST_F()
157 uint32_t value = TEST_VALUE1; in TEST_F()
165 BpfMap<uint32_t, uint32_t> testMap1(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
169 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
172 uint32_t key = TEST_KEY1; in TEST_F()
173 uint32_t value = TEST_VALUE1; in TEST_F()
175 Result<uint32_t> value_read = testMap2.readValue(key); in TEST_F()
182 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
186 const auto iterateWithDeletion = [&totalCount, &totalSum](const uint32_t& key, in TEST_F()
187 BpfMap<uint32_t, uint32_t>& map) { in TEST_F() argument
188 EXPECT_GE((uint32_t)TEST_MAP_SIZE, key); in TEST_F()
195 EXPECT_EQ(((1 + TEST_MAP_SIZE - 1) * (TEST_MAP_SIZE - 1)) / 2, (uint32_t)totalSum); in TEST_F()
202 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
206 const auto iterateWithDeletion = [&totalCount, &totalSum](const uint32_t& key, in TEST_F()
207 const uint32_t& value, in TEST_F()
208 BpfMap<uint32_t, uint32_t>& map) { in TEST_F() argument
209 EXPECT_GE((uint32_t)TEST_MAP_SIZE, key); in TEST_F()
217 EXPECT_EQ(((1 + TEST_MAP_SIZE - 1) * (TEST_MAP_SIZE - 1)) * 5, (uint32_t)totalSum); in TEST_F()
224 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
226 uint32_t key = TEST_KEY1; in TEST_F()
227 uint32_t value_write = TEST_VALUE1; in TEST_F()
256 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()