Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ipv6_portaddr_hash

Proto:static inline u32 ipv6_portaddr_hash(const struct net *net, const struct in6_addr *addr6, unsigned int port)

Type:u32

Parameter:

TypeParameterName
const struct net *net
const struct in6_addr *addr6
unsigned intport
708  mix = net_hash_mix(net)
710  If ipv6_addr_any(addr6) Then hash = jhash_1word(0, mix)
712  Else if Note that we must __force cast these to unsigned long to make sparse happy,* since all of the endian-annotated types are fixed size regardless of arch. Then hash = jhash_1word((__forceu32)s6_addr32[3], mix)
714  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.
717  Return hash ^ port