diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-09 02:16:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 12:44:02 +0200 |
commit | f373b53b5fe67aa4a6f28f921a529cc90f88e79b (patch) | |
tree | b2cae9152aed2e30b7a39c114678b9355ab5c14f /net/ipv4/inet_hashtables.c | |
parent | ipv6: fix devconf after adding force_tllao option (diff) | |
download | linux-f373b53b5fe67aa4a6f28f921a529cc90f88e79b.tar.xz 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 'net/ipv4/inet_hashtables.c')
-rw-r--r-- | net/ipv4/inet_hashtables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 625cc5f64c94..a45aaf3d48b1 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -209,7 +209,7 @@ struct sock * __inet_lookup_established(struct net *net, * have wildcards anyways. */ unsigned int hash = inet_ehashfn(net, daddr, hnum, saddr, sport); - unsigned int slot = hash & (hashinfo->ehash_size - 1); + unsigned int slot = hash & hashinfo->ehash_mask; struct inet_ehash_bucket *head = &hashinfo->ehash[slot]; rcu_read_lock(); |