Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\rhashtable.h Create Date:2022-07-28 06:07:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rht_key_get_hash

Proto:static inline unsigned int rht_key_get_hash(struct rhashtable *ht, const void *key, const struct rhashtable_params params, unsigned int hash_rnd)

Type:unsigned int

Parameter:

TypeParameterName
struct rhashtable *ht
const void *key
const struct rhashtable_paramsparams
unsigned inthash_rnd
132  If Not __builtin_constant_p(key_len) Then hash = hashfn(key, key_len, hash_rnd)
134  Else if key_len Then
135  key_len = key_len
137  If hashfn Then hash = hashfn(key, key_len, hash_rnd)
139  Else if key_len & sizeof(u32) - 1 Then hash = jhash - hash an arbitrary key*@k: sequence of bytes as key*@length: the length of the key*@initval: the previous hash, or an arbitray value* The generic version, hashes an arbitrary sequence of bytes.
141  Else hash = jhash2 - hash an array of u32's*@k: the key which must be an array of u32's*@length: the number of u32's in the key*@initval: the previous hash, or an arbitray value* Returns the hash value of the key.
143  Else
144  key_len = key_len
146  If hashfn Then hash = hashfn(key, key_len, hash_rnd)
148  Else hash = jhash - hash an arbitrary key*@k: sequence of bytes as key*@length: the length of the key*@initval: the previous hash, or an arbitray value* The generic version, hashes an arbitrary sequence of bytes.
152  Return hash