* The most generic version, hashes an arbitrary sequence * of bytes. No alignment or length assumptions are made about * the input key. For keys not aligned to four byte boundaries * or a multiple of four bytes in length, the memory region * just after may be read (but not used in the computation). * This may cross a page boundary. * * @param key * Key to calculate hash of. * @param l
| 277 | * Calculated hash value. |
| 278 | */ |
| 279 | static inline uint32_t |
| 280 | rte_jhash(const void *key, uint32_t length, uint32_t initval) |
| 281 | { |
| 282 | uint32_t initval2 = 0; |
| 283 | |
| 284 | rte_jhash_2hashes(key, length, &initval, &initval2); |
| 285 | |
| 286 | return initval; |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | * A special optimized version that handles 1 or more of uint32_ts. |