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

Function test_big_tuple_gfni

dpdk/app/test/test_thash.c:350–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350static int
351test_big_tuple_gfni(void)
352{
353 uint32_t arr[16];
354 uint32_t arr_softrss[16];
355 uint32_t hash_1, hash_2;
356 uint64_t rss_key_matrixes[RTE_DIM(big_rss_key)];
357 unsigned int i, size = RTE_DIM(arr) * sizeof(uint32_t);
358
359 if (!rte_thash_gfni_supported())
360 return TEST_SKIPPED;
361
362 /* Convert RSS key into matrixes */
363 rte_thash_complete_matrix(rss_key_matrixes, big_rss_key,
364 RTE_DIM(big_rss_key));
365
366 for (i = 0; i < RTE_DIM(arr); i++) {
367 arr[i] = rte_rand();
368 arr_softrss[i] = rte_be_to_cpu_32(arr[i]);
369 }
370
371 hash_1 = rte_softrss(arr_softrss, RTE_DIM(arr), big_rss_key);
372 hash_2 = rte_thash_gfni(rss_key_matrixes, (uint8_t *)arr, size);
373
374 if (hash_1 != hash_2)
375 return -TEST_FAILED;
376
377 return TEST_SUCCESS;
378}
379
380static int
381test_create_invalid(void)

Callers

nothing calls this directly

Calls 5

rte_thash_gfni_supportedFunction · 0.85
rte_randFunction · 0.85
rte_softrssFunction · 0.85
rte_thash_gfniFunction · 0.50

Tested by

no test coverage detected