[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140317142644.GB26584@breakpoint.cc>
Date: Mon, 17 Mar 2014 15:26:44 +0100
From: Florian Westphal <fw@...len.de>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Pablo Neira Ayuso' <pablo@...filter.org>,
"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 36/38] netfilter: connlimit: use keyed locks
David Laight <David.Laight@...LAB.COM> wrote:
> From: Pablo Neira Ayuso
> > +#define CONNLIMIT_SLOTS 256
> > +#define CONNLIMIT_LOCK_SLOTS 32
>
> You might want to make these explicitly unsigned to ensure
> the divisions are unsigned (so can be done with a simple mask).
I can do this but I checked that at least on my machine gcc already
emits a 'add' instruction to reduce the hash value.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists