Lines Matching refs:daddr

19 static inline unsigned int __xfrm4_daddr_saddr_hash(const xfrm_address_t *daddr,  in __xfrm4_daddr_saddr_hash()  argument
22 u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4; in __xfrm4_daddr_saddr_hash()
26 static inline unsigned int __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr, in __xfrm6_daddr_saddr_hash() argument
29 return __xfrm6_addr_hash(daddr) ^ __xfrm6_addr_hash(saddr); in __xfrm6_daddr_saddr_hash()
44 static inline unsigned int __xfrm4_dpref_spref_hash(const xfrm_address_t *daddr, in __xfrm4_dpref_spref_hash() argument
49 return jhash_2words(ntohl(daddr->a4) & __bits2mask32(dbits), in __xfrm4_dpref_spref_hash()
75 static inline unsigned int __xfrm6_dpref_spref_hash(const xfrm_address_t *daddr, in __xfrm6_dpref_spref_hash() argument
80 return __xfrm6_pref_hash(daddr, dbits) ^ in __xfrm6_dpref_spref_hash()
84 static inline unsigned int __xfrm_dst_hash(const xfrm_address_t *daddr, in __xfrm_dst_hash() argument
92 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
95 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
101 static inline unsigned int __xfrm_src_hash(const xfrm_address_t *daddr, in __xfrm_src_hash() argument
109 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
112 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
119 __xfrm_spi_hash(const xfrm_address_t *daddr, __be32 spi, u8 proto, in __xfrm_spi_hash() argument
125 h ^= __xfrm4_addr_hash(daddr); in __xfrm_spi_hash()
128 h ^= __xfrm6_addr_hash(daddr); in __xfrm_spi_hash()
150 const xfrm_address_t *daddr = &sel->daddr; in __sel_hash() local
160 h = __xfrm4_dpref_spref_hash(daddr, saddr, dbits, sbits); in __sel_hash()
168 h = __xfrm6_dpref_spref_hash(daddr, saddr, dbits, sbits); in __sel_hash()
175 static inline unsigned int __addr_hash(const xfrm_address_t *daddr, in __addr_hash() argument
185 h = __xfrm4_dpref_spref_hash(daddr, saddr, dbits, sbits); in __addr_hash()
189 h = __xfrm6_dpref_spref_hash(daddr, saddr, dbits, sbits); in __addr_hash()