Lines Matching refs:hash
42 * The largest amount of the data which the hash may be calculated over
54 uint32_t hash = 0;
56 hash ^= cache[pos * (UINT8_MAX + 1) + *input];
59 return (hash);
66 uint32_t hash = 0;
69 hash ^= toeplitz_hash(sp->s_toeplitz_cache, src_addr, pos, addr_size);
71 hash ^= toeplitz_hash(sp->s_toeplitz_cache, dst_addr, pos, addr_size);
74 hash ^= toeplitz_hash(sp->s_toeplitz_cache,
77 hash ^= toeplitz_hash(sp->s_toeplitz_cache,
80 return (hash);
84 * The algorithm to calculate RSS Toeplitz hash is essentially as follows:
88 * - Let the initial value of the hash be zero
90 * window at a given bit position into the resulting hash
93 * resulting hash is just a XOR of subhashes for every input bit:
106 * Therefore we may pre-calculate the value of each byte sub-hash H_i_(i+7)
108 * then just assemble the hash of the packet byte-by-byte instead of
113 * - and the hash is 32-bit wide
117 * cache lookup is about 15 times faster than direct hash calculation