diff options
author | Wei Wang <weiwan@google.com> | 2017-05-05 15:53:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-08 14:37:07 -0400 |
commit | 1b1fc3fddabfb8739ef2c8f04e05a9858b42c1f7 (patch) | |
tree | 96e7fc35b0e4ab664d4e68a0ed7a68398402090c /net/ipv4/tcp_output.c | |
parent | 82486aa6f1b9bc8145e6d0fa2bc0b44307f3b875 (diff) |
tcp: make congestion control optionally skip slow start after idle
Congestion control modules that want full control over congestion
control behavior do not want the cwnd modifications controlled by
the sysctl_tcp_slow_start_after_idle code path.
So skip those code paths for CC modules that use the cong_control()
API.
As an example, those cwnd effects are not desired for the BBR congestion
control algorithm.
Fixes: c0402760f565 ("tcp: new CC hook to set sending rate with rate_sample in any CA state")
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 60111a0fc201..4858e190f6ac 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1514,6 +1514,7 @@ static void tcp_cwnd_application_limited(struct sock *sk) | |||
1514 | 1514 | ||
1515 | static void tcp_cwnd_validate(struct sock *sk, bool is_cwnd_limited) | 1515 | static void tcp_cwnd_validate(struct sock *sk, bool is_cwnd_limited) |
1516 | { | 1516 | { |
1517 | const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops; | ||
1517 | struct tcp_sock *tp = tcp_sk(sk); | 1518 | struct tcp_sock *tp = tcp_sk(sk); |
1518 | 1519 | ||
1519 | /* Track the maximum number of outstanding packets in each | 1520 | /* Track the maximum number of outstanding packets in each |
@@ -1536,7 +1537,8 @@ static void tcp_cwnd_validate(struct sock *sk, bool is_cwnd_limited) | |||
1536 | tp->snd_cwnd_used = tp->packets_out; | 1537 | tp->snd_cwnd_used = tp->packets_out; |
1537 | 1538 | ||
1538 | if (sysctl_tcp_slow_start_after_idle && | 1539 | if (sysctl_tcp_slow_start_after_idle && |
1539 | (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) | 1540 | (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto && |
1541 | !ca_ops->cong_control) | ||
1540 | tcp_cwnd_application_limited(sk); | 1542 | tcp_cwnd_application_limited(sk); |
1541 | 1543 | ||
1542 | /* The following conditions together indicate the starvation | 1544 | /* The following conditions together indicate the starvation |