aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-11-07 03:29:28 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-10 00:34:58 -0500
commit356d1833b638bd465672aefeb71def3ab93fc17d (patch)
tree68354249261e8de8d367bfc21bb2969ecb9053d6 /net/ipv4/tcp_output.c
parenta3dcaf17ee54f1d01d22cc2b22cab0b4f60d78cf (diff)
tcp: Namespace-ify sysctl_tcp_rmem and sysctl_tcp_wmem
Note that when a new netns is created, it inherits its sysctl_tcp_rmem and sysctl_tcp_wmem from initial netns. This change is needed so that we can refine TCP rcvbuf autotuning, to take RTT into consideration. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Wei Wang <weiwan@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index a9d917e4dad5..9b98d35aa0d8 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -220,7 +220,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss,
220 (*rcv_wscale) = 0; 220 (*rcv_wscale) = 0;
221 if (wscale_ok) { 221 if (wscale_ok) {
222 /* Set window scaling on max possible window */ 222 /* Set window scaling on max possible window */
223 space = max_t(u32, space, sysctl_tcp_rmem[2]); 223 space = max_t(u32, space, sock_net(sk)->ipv4.sysctl_tcp_rmem[2]);
224 space = max_t(u32, space, sysctl_rmem_max); 224 space = max_t(u32, space, sysctl_rmem_max);
225 space = min_t(u32, space, *window_clamp); 225 space = min_t(u32, space, *window_clamp);
226 while (space > U16_MAX && (*rcv_wscale) < TCP_MAX_WSCALE) { 226 while (space > U16_MAX && (*rcv_wscale) < TCP_MAX_WSCALE) {