Re: [PATCH 5/7] netfilter: connlimit: use keyed locks

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

 



Jan Engelhardt <jengelh@xxxxxxx> wrote:
> On Friday 2014-03-07 14:37, Florian Westphal wrote:
> > 
> >+#define CONNLIMIT_SLOTS	256 /* power-of-two */
> >+#define CONNLIMIT_LOCK_SLOTS	32 /* power-of-two */
> 
> It's clear that 256 and 32 are powers of two. Or did you intend to
> write "these should be a power of two"? Which would then raise the
> question if they really need to be a power of two.

Right, the intent was to avoid mod instruction.

> 	BUILD_BUG_ON(CONNLIMIT_SLOTS % CONNLIMIT_LOCK_SLOTS != 0);

I like it.  Will change, thanks for suggesting this.
--
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