aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-10-27 10:47:23 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-28 06:24:38 -0400
commitd06a99045837d3f4d5431793c4c390b0daf2a08d (patch)
tree27cb4b6e7f5f54a2f6356dc1ec5c263b216eb26e /net/ipv4/tcp_output.c
parent4540c0cf98b8892a642d2453eec20ae3eb5696fb (diff)
tcp: Namespace-ify sysctl_tcp_tso_win_divisor
Signed-off-by: Eric Dumazet <edumazet@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.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 55a0aa4b96df..60df3ab52166 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -53,12 +53,6 @@ int sysctl_tcp_workaround_signed_windows __read_mostly = 0;
53/* Default TSQ limit of four TSO segments */ 53/* Default TSQ limit of four TSO segments */
54int sysctl_tcp_limit_output_bytes __read_mostly = 262144; 54int sysctl_tcp_limit_output_bytes __read_mostly = 262144;
55 55
56/* This limits the percentage of the congestion window which we
57 * will allow a single TSO frame to consume. Building TSO frames
58 * which are too large can cause TCP streams to be bursty.
59 */
60int sysctl_tcp_tso_win_divisor __read_mostly = 3;
61
62static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, 56static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
63 int push_one, gfp_t gfp); 57 int push_one, gfp_t gfp);
64 58
@@ -1988,7 +1982,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
1988 if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len)) 1982 if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len))
1989 goto send_now; 1983 goto send_now;
1990 1984
1991 win_divisor = ACCESS_ONCE(sysctl_tcp_tso_win_divisor); 1985 win_divisor = ACCESS_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tso_win_divisor);
1992 if (win_divisor) { 1986 if (win_divisor) {
1993 u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); 1987 u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);
1994 1988