summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet2009-10-09 02:16:19 +0200
committerDavid S. Miller2009-10-13 12:44:02 +0200
commitf373b53b5fe67aa4a6f28f921a529cc90f88e79b (patch)
treeb2cae9152aed2e30b7a39c114678b9355ab5c14f /include
parentipv6: fix devconf after adding force_tllao option (diff)
downloadkernel-qcow2-linux-f373b53b5fe67aa4a6f28f921a529cc90f88e79b.tar.gz
kernel-qcow2-linux-f373b53b5fe67aa4a6f28f921a529cc90f88e79b.tar.xz
kernel-qcow2-linux-f373b53b5fe67aa4a6f28f921a529cc90f88e79b.zip
tcp: replace ehash_size by ehash_mask
Storing the mask (size - 1) instead of the size allows fast path to be a bit faster. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet_hashtables.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index d522dcf3031a..5f11c4a0daca 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -125,7 +125,7 @@ struct inet_hashinfo {
*/
struct inet_ehash_bucket *ehash;
spinlock_t *ehash_locks;
- unsigned int ehash_size;
+ unsigned int ehash_mask;
unsigned int ehash_locks_mask;
/* Ok, let's try this, I give up, we do need a local binding
@@ -158,7 +158,7 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket(
struct inet_hashinfo *hashinfo,
unsigned int hash)
{
- return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)];
+ return &hashinfo->ehash[hash & hashinfo->ehash_mask];
}
static inline spinlock_t *inet_ehash_lockp(