| 819 | } |
| 820 | |
| 821 | static int |
| 822 | check_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 | |
| 849 | static int |
| 850 | test_adjust_tuple_mb(uint32_t reta_sz, uint32_t bofs) |
no test coverage detected