Re: [PATCH 3/4] netfilter: xtables: use xt_table for hook instantiation

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

 



On Wednesday 2010-02-10 16:33, Patrick McHardy wrote:
>Jan Engelhardt wrote:
>> +static unsigned int xt_hookmask_bitcount(unsigned int mask)
>> +{
>> +	unsigned int bits = 0;
>> +
>> +	for (; mask != 0; mask >>= 1)
>> +		if (mask & 1)
>> +			++bits;
>> +	return bits;
>> +}
>
>Why not use hweight32()?

Seriously, I looked for popcount (which is how this is called in 
hardware), and was disappointed. Thanks for pointing out hweight.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux