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>
This commit is contained in:
committed by
David S. Miller
parent
a3dcaf17ee
commit
356d1833b6
@@ -220,7 +220,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss,
|
||||
(*rcv_wscale) = 0;
|
||||
if (wscale_ok) {
|
||||
/* Set window scaling on max possible window */
|
||||
space = max_t(u32, space, sysctl_tcp_rmem[2]);
|
||||
space = max_t(u32, space, sock_net(sk)->ipv4.sysctl_tcp_rmem[2]);
|
||||
space = max_t(u32, space, sysctl_rmem_max);
|
||||
space = min_t(u32, space, *window_clamp);
|
||||
while (space > U16_MAX && (*rcv_wscale) < TCP_MAX_WSCALE) {
|
||||
|
||||
Reference in New Issue
Block a user