diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-12-01 12:52:32 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-03 10:18:28 -0500 |
commit | 27da6d37e207e7ad9c692d3d0924f09e63a98e38 (patch) | |
tree | 192e4e3b567edec06ed12c2e7d7ac715ee7ba485 /net/ipv4/tcp.c | |
parent | 61b7c691c7317529375f90f0a81a331990b1ec1b (diff) | |
download | linux-27da6d37e207e7ad9c692d3d0924f09e63a98e38.tar.gz linux-27da6d37e207e7ad9c692d3d0924f09e63a98e38.tar.bz2 linux-27da6d37e207e7ad9c692d3d0924f09e63a98e38.zip |
tcp: Enable 2nd listener hashtable in TCP
Enable the second listener hashtable in TCP.
The scale is the same as UDP which is one slot per 2MB.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bf97317e6c97..180311636023 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3577,6 +3577,9 @@ void __init tcp_init(void) percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL); percpu_counter_init(&tcp_orphan_count, 0, GFP_KERNEL); inet_hashinfo_init(&tcp_hashinfo); + inet_hashinfo2_init(&tcp_hashinfo, "tcp_listen_portaddr_hash", + thash_entries, 21, /* one slot per 2 MB*/ + 0, 64 * 1024); tcp_hashinfo.bind_bucket_cachep = kmem_cache_create("tcp_bind_bucket", sizeof(struct inet_bind_bucket), 0, |