MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_hash_multiwriter_main

Function test_hash_multiwriter_main

dpdk/app/test/test_hash_multiwriter.c:257–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257static int
258test_hash_multiwriter_main(void)
259{
260 if (rte_lcore_count() < 2) {
261 printf("Not enough cores for distributor_autotest, expecting at least 2\n");
262 return TEST_SKIPPED;
263 }
264
265 setlocale(LC_NUMERIC, "");
266
267
268 if (!rte_tm_supported()) {
269 printf("Hardware transactional memory (lock elision) "
270 "is NOT supported\n");
271 } else {
272 printf("Hardware transactional memory (lock elision) "
273 "is supported\n");
274
275 printf("Test multi-writer with Hardware transactional memory\n");
276
277 use_htm = 1;
278 if (test_hash_multiwriter() < 0)
279 return -1;
280 }
281
282 printf("Test multi-writer without Hardware transactional memory\n");
283 use_htm = 0;
284 if (test_hash_multiwriter() < 0)
285 return -1;
286
287 return 0;
288}
289
290REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);

Callers

nothing calls this directly

Calls 4

rte_lcore_countFunction · 0.85
test_hash_multiwriterFunction · 0.85
printfFunction · 0.50
rte_tm_supportedFunction · 0.50

Tested by

no test coverage detected