Google
  Web www.spinics.net

Re: [PATCH 05/10] Add divisor.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Corey Hickey wrote:
> Make hash divisor user-configurable.
> 

> @@ -120,7 +121,7 @@ static __inline__ unsigned sfq_fold_hash(struct sfq_sched_data *q, u32 h, u32 h1
>  	/* Have we any rotation primitives? If not, WHY? */
>  	h ^= (h1<<pert) ^ (h1>>(0x1F - pert));
>  	h ^= h>>10;
> -	return h & 0x3FF;
> +	return h & (q->hash_divisor-1);


This assumes that hash_divisor is a power of two, but this is
not enforced anywhere.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Kernel List]     [Site Home]     [Ethernet Bridging]     [Git]     [IETF Annouce]     [Linux Assembly]     [VLAN]     [Networking]     [Security]     [Bugtraq]     [Rubini]     [Photo]     [Singles Social Netowrking]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Linux Wireless]     [DDR & Rambus]     [Free Dating]     [Linux Resources]     [Wireless Reading Device]

Add to Google Powered by Linux