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>
This commit is contained in:

committed by
David S. Miller

parent
c3faca053d
commit
f373b53b5f
@@ -774,7 +774,7 @@ skip_listen_ht:
|
||||
if (!(r->idiag_states & ~(TCPF_LISTEN | TCPF_SYN_RECV)))
|
||||
goto unlock;
|
||||
|
||||
for (i = s_i; i < hashinfo->ehash_size; i++) {
|
||||
for (i = s_i; i <= hashinfo->ehash_mask; i++) {
|
||||
struct inet_ehash_bucket *head = &hashinfo->ehash[i];
|
||||
spinlock_t *lock = inet_ehash_lockp(hashinfo, i);
|
||||
struct sock *sk;
|
||||
|
Reference in New Issue
Block a user