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;
69 void checkMapInvalid(BpfMap<uint32_t, uint32_t>& map) { in checkMapInvalid() argument
74 void checkMapValid(BpfMap<uint32_t, uint32_t>& map) { in checkMapValid() argument
79 void writeToMapAndCheck(BpfMap<uint32_t, uint32_t>& map, uint32_t key, uint32_t value) { in writeToMapAndCheck() argument
81 uint32_t value_read; in writeToMapAndCheck()
86 void checkValueAndStatus(uint32_t refValue, Result<uint32_t> value) { in checkValueAndStatus()
91 void populateMap(uint32_t total, BpfMap<uint32_t, uint32_t>& map) { in populateMap() argument
92 for (uint32_t key = 0; key < total; key++) { in populateMap()
93 uint32_t value = key * 10; in populateMap()
98 void expectMapEmpty(BpfMap<uint32_t, uint32_t>& map) { in expectMapEmpty() argument
106 BpfMap<uint32_t, uint32_t> testMap1; in TEST_F()
109 BpfMap<uint32_t, uint32_t> testMap2(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
114 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
115 uint32_t key = TEST_KEY1; in TEST_F()
116 uint32_t value_write = TEST_VALUE1; in TEST_F()
118 Result<uint32_t> value_read = testMap.readValue(key); in TEST_F()
120 Result<uint32_t> key_read = testMap.getFirstKey(); in TEST_F()
128 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
129 uint32_t key = TEST_KEY1; in TEST_F()
130 uint32_t value_write = TEST_VALUE1; in TEST_F()
140 BpfMap<uint32_t, uint32_t> testMap1(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
141 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
143 uint32_t key = TEST_KEY1; in TEST_F()
145 uint32_t value = TEST_VALUE1; in TEST_F()
151 BpfMap<uint32_t, uint32_t> testMap1(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
155 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
158 uint32_t key = TEST_KEY1; in TEST_F()
159 uint32_t value = TEST_VALUE1; in TEST_F()
161 Result<uint32_t> value_read = testMap2.readValue(key); in TEST_F()
166 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
170 const auto iterateWithDeletion = [&totalCount, &totalSum](const uint32_t& key, in TEST_F()
171 BpfMap<uint32_t, uint32_t>& map) { in TEST_F() argument
172 EXPECT_GE((uint32_t)TEST_MAP_SIZE, key); in TEST_F()
179 EXPECT_EQ(((1 + TEST_MAP_SIZE - 1) * (TEST_MAP_SIZE - 1)) / 2, (uint32_t)totalSum); in TEST_F()
184 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
188 const auto iterateWithDeletion = [&totalCount, &totalSum](const uint32_t& key, in TEST_F()
189 const uint32_t& value, in TEST_F()
190 BpfMap<uint32_t, uint32_t>& map) { in TEST_F() argument
191 EXPECT_GE((uint32_t)TEST_MAP_SIZE, key); in TEST_F()
199 EXPECT_EQ(((1 + TEST_MAP_SIZE - 1) * (TEST_MAP_SIZE - 1)) * 5, (uint32_t)totalSum); in TEST_F()
204 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
206 uint32_t key = TEST_KEY1; in TEST_F()
207 uint32_t value_write = TEST_VALUE1; in TEST_F()
234 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()