/* * Hash operations for net_peer<->connection */ static unsigned conn_hashfn(struct cfs_hash *hs, const void *key, unsigned mask) { return cfs_hash_djb2_hash(key, sizeof(struct lnet_process_id), mask); }
/* * Hash operations for net_peer<->connection */ static unsigned conn_hashfn(cfs_hash_t *hs, void *key, unsigned mask) { return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask); }
/** * Hash the pool name for use by the cfs_hash handlers. * * Use the standard DJB2 hash function for ASCII strings in Lustre. * * \param[in] hash_body hash structure where this key is embedded (unused) * \param[in] key key to be hashed (in this case the pool name) * \param[in] mask bitmask to limit the hash value to the desired size * * \retval computed hash value from \a key and limited by \a mask */ static __u32 pool_hashfn(cfs_hash_t *hash_body, const void *key, unsigned mask) { return cfs_hash_djb2_hash(key, strnlen(key, LOV_MAXPOOLNAME), mask); }