| rte_jhash.h(3) | Library Functions Manual | rte_jhash.h(3) |
rte_jhash.h
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <rte_config.h>
#include <rte_log.h>
#include <rte_byteorder.h>
#define RTE_JHASH_GOLDEN_RATIO 0xdeadbeef
static void rte_jhash_2hashes (const void *key, uint32_t
length, uint32_t *pc, uint32_t *pb)
static void rte_jhash_32b_2hashes (const uint32_t *k, uint32_t length,
uint32_t *pc, uint32_t *pb)
static uint32_t rte_jhash (const void *key, uint32_t length, uint32_t
initval)
static uint32_t rte_jhash_32b (const uint32_t *k, uint32_t length,
uint32_t initval)
static uint32_t rte_jhash_3words (uint32_t a, uint32_t b, uint32_t c,
uint32_t initval)
static uint32_t rte_jhash_2words (uint32_t a, uint32_t b, uint32_t
initval)
static uint32_t rte_jhash_1word (uint32_t a, uint32_t initval)
jhash functions.
Definition in file rte_jhash.h.
The golden ratio: an arbitrary value.
Definition at line 68 of file rte_jhash.h.
Same as rte_jhash, but takes two seeds and return two uint32_ts. pc and pb must be non-null, and *pc and *pb must both be initialized with seeds. If you pass in (*pb)=0, the output (*pc) will be the same as the return value from rte_jhash.
Parameters
Definition at line 236 of file rte_jhash.h.
Same as rte_jhash_32b, but takes two seeds and return two uint32_ts. pc and pb must be non-null, and *pc and *pb must both be initialized with seeds. If you pass in (*pb)=0, the output (*pc) will be the same as the return value from rte_jhash_32b.
Parameters
Definition at line 257 of file rte_jhash.h.
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.
Parameters
Returns
Definition at line 280 of file rte_jhash.h.
A special optimized version that handles 1 or more of uint32_ts. The length parameter here is the number of uint32_ts in the key.
Parameters
Returns
Definition at line 303 of file rte_jhash.h.
A special ultra-optimized versions that knows it is hashing exactly 3 words.
Parameters
Returns
Definition at line 340 of file rte_jhash.h.
A special ultra-optimized versions that knows it is hashing exactly 2 words.
Parameters
Returns
Definition at line 359 of file rte_jhash.h.
A special ultra-optimized versions that knows it is hashing exactly 1 word.
Parameters
Returns
Definition at line 376 of file rte_jhash.h.
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |