/* Description: This is the hashing function for the domain hash table, it returns the correct bucket number for the domain. The caller is responsibile for calling the rcu_read_lock() functions.  */
static u32 netlbl_domhsh_hash(const char *key)
/* Description: This is the hashing function for the domain hash table, it returns the correct bucket number for the domain. The caller is responsibile for calling the rcu_read_lock() functions.  */
static u32 netlbl_domhsh_hash(const char *key)
{
	u32 iter;
	u32 val;
	u32 len;
	for (iter = 0, val = 0, len = strlen(key); iter < len; iter++)
		val = (val << 4 | (val >> (8 * sizeof(u32) - 4))) ^ key[iter];
	return val & (rcu_dereference(netlbl_domhsh)->size - 1);
}