aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-10 03:49:14 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-11 01:39:57 -0400
commit51c5d0c4b169bf762f09e0d5b283a7f0b2a45739 (patch)
tree9dd99b27be4dc469954a2d67515593c9f71cbcd0 /net/ipv4/tcp.c
parentab92bb2f679d66c7e12a6b1c0cdd76fe308f6546 (diff)
tcp: Maintain dynamic metrics in local cache.
Maintain a local hash table of TCP dynamic metrics blobs. Computed TCP metrics are no longer maintained in the route metrics. The table uses RCU and an extremely simple hash so that it has low latency and low overhead. A simple hash is legitimate because we only make metrics blobs for fully established connections. Some tweaking of the default hash table sizes, metric timeouts, and the hash chain length limit certainly could use some tweaking. But the basic design seems sound. With help from Eric Dumazet and Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 3ba605f60e4..29aa0c800cd 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3563,6 +3563,8 @@ void __init tcp_init(void)
3563 pr_info("Hash tables configured (established %u bind %u)\n", 3563 pr_info("Hash tables configured (established %u bind %u)\n",
3564 tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size); 3564 tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size);
3565 3565
3566 tcp_metrics_init();
3567
3566 tcp_register_congestion_control(&tcp_reno); 3568 tcp_register_congestion_control(&tcp_reno);
3567 3569
3568 memset(&tcp_secret_one.secrets[0], 0, sizeof(tcp_secret_one.secrets)); 3570 memset(&tcp_secret_one.secrets[0], 0, sizeof(tcp_secret_one.secrets));