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

Function rte_softrss_be

dpdk/lib/hash/rte_thash.h:205–219  ·  view source on GitHub ↗

* Optimized implementation. * If you want the calculated hash value matches NIC RSS value * you have to use special converted key with rte_convert_rss_key() fn. * @param input_tuple * Pointer to input tuple * @param input_len * Length of input_tuple in 4-bytes chunks * @param *rss_key * Pointer to RSS hash key. * @return * Calculated hash value. */

Source from the content-addressed store, hash-verified

203 * Calculated hash value.
204 */
205static inline uint32_t
206rte_softrss_be(uint32_t *input_tuple, uint32_t input_len,
207 const uint8_t *rss_key)
208{
209 uint32_t i, j, map, ret = 0;
210
211 for (j = 0; j < input_len; j++) {
212 for (map = input_tuple[j]; map; map &= (map - 1)) {
213 i = rte_bsf32(map);
214 ret ^= ((const uint32_t *)rss_key)[j] << (31 - i) |
215 (uint32_t)((uint64_t)(((const uint32_t *)rss_key)[j + 1]) >> (i + 1));
216 }
217 }
218 return ret;
219}
220
221/**
222 * Indicates if GFNI implementations of the Toeplitz hash are supported.

Callers 3

rxa_do_softrssFunction · 0.50
run_rss_calcFunction · 0.50
test_toeplitz_hash_calcFunction · 0.50

Calls 1

rte_bsf32Function · 0.50

Tested by 2

run_rss_calcFunction · 0.40
test_toeplitz_hash_calcFunction · 0.40