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

Function check_adj_tuple

dpdk/app/test/test_thash.c:821–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821static int
822check_adj_tuple(const uint8_t tuple[TUPLE_SZ], const uint8_t *key,
823 uint32_t dhv, uint32_t ohv, uint32_t adjust, uint32_t reta_sz,
824 const char *prefix)
825{
826 uint32_t hash, hashlsb;
827
828 hash = calc_tuple_hash(tuple, key);
829 hashlsb = hash & HASH_MSK(reta_sz);
830
831 printf("%s(%s) for tuple:\n", __func__, prefix);
832 rte_memdump(stdout, NULL, tuple, TUPLE_SZ);
833 printf("\treta_sz: %u,\n"
834 "\torig hash: %#x,\n"
835 "\tdesired: %#x,\n"
836 "\tadjust: %#x,\n"
837 "\tactual: %#x,\n",
838 reta_sz, ohv, dhv, adjust, hashlsb);
839
840 if (dhv == hashlsb) {
841 printf("\t***Succeeded\n");
842 return 0;
843 }
844
845 printf("\t***Failed\n");
846 return -1;
847}
848
849static int
850test_adjust_tuple_mb(uint32_t reta_sz, uint32_t bofs)

Callers 1

test_adjust_tuple_mbFunction · 0.85

Calls 3

calc_tuple_hashFunction · 0.85
rte_memdumpFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected