diff options
author | David S. Miller <davem@davemloft.net> | 2018-02-28 11:37:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-28 11:37:51 -0500 |
commit | 55e84dd7ec0a0f832a70b7fb39d8fb62f66b09fa (patch) | |
tree | 00bfcbae302e5015f89f4e31938bb297f18dc970 /net/ipv4/tcp_input.c | |
parent | c84316223bf7181bd0a6767ae07004b92dd1e51f (diff) | |
parent | fc68e171d376c322e6777a3d7ac2f0278b68b17f (diff) |
Merge branch 'tcp-revert-a-F-RTO-extension-due-to-broken-middle-boxes'
Yuchung Cheng says:
====================
tcp: revert a F-RTO extension due to broken middle-boxes
This patch series reverts a (non-standard) TCP F-RTO extension that aimed
to detect more spurious timeouts. Unfortunately it could result in poor
performance due to broken middle-boxes that modify TCP packets. E.g.
https://www.spinics.net/lists/netdev/msg484154.html
We believe the best and simplest solution is to just revert the change.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 575d3c1fb6e8..8d480542aa07 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1971,11 +1971,6 @@ void tcp_enter_loss(struct sock *sk) | |||
1971 | /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous | 1971 | /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous |
1972 | * loss recovery is underway except recurring timeout(s) on | 1972 | * loss recovery is underway except recurring timeout(s) on |
1973 | * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing | 1973 | * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing |
1974 | * | ||
1975 | * In theory F-RTO can be used repeatedly during loss recovery. | ||
1976 | * In practice this interacts badly with broken middle-boxes that | ||
1977 | * falsely raise the receive window, which results in repeated | ||
1978 | * timeouts and stop-and-go behavior. | ||
1979 | */ | 1974 | */ |
1980 | tp->frto = net->ipv4.sysctl_tcp_frto && | 1975 | tp->frto = net->ipv4.sysctl_tcp_frto && |
1981 | (new_recovery || icsk->icsk_retransmits) && | 1976 | (new_recovery || icsk->icsk_retransmits) && |
@@ -2631,18 +2626,14 @@ static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack, | |||
2631 | tcp_try_undo_loss(sk, false)) | 2626 | tcp_try_undo_loss(sk, false)) |
2632 | return; | 2627 | return; |
2633 | 2628 | ||
2634 | /* The ACK (s)acks some never-retransmitted data meaning not all | ||
2635 | * the data packets before the timeout were lost. Therefore we | ||
2636 | * undo the congestion window and state. This is essentially | ||
2637 | * the operation in F-RTO (RFC5682 section 3.1 step 3.b). Since | ||
2638 | * a retransmitted skb is permantly marked, we can apply such an | ||
2639 | * operation even if F-RTO was not used. | ||
2640 | */ | ||
2641 | if ((flag & FLAG_ORIG_SACK_ACKED) && | ||
2642 | tcp_try_undo_loss(sk, tp->undo_marker)) | ||
2643 | return; | ||
2644 | |||
2645 | if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */ | 2629 | if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */ |
2630 | /* Step 3.b. A timeout is spurious if not all data are | ||
2631 | * lost, i.e., never-retransmitted data are (s)acked. | ||
2632 | */ | ||
2633 | if ((flag & FLAG_ORIG_SACK_ACKED) && | ||
2634 | tcp_try_undo_loss(sk, true)) | ||
2635 | return; | ||
2636 | |||
2646 | if (after(tp->snd_nxt, tp->high_seq)) { | 2637 | if (after(tp->snd_nxt, tp->high_seq)) { |
2647 | if (flag & FLAG_DATA_SACKED || is_dupack) | 2638 | if (flag & FLAG_DATA_SACKED || is_dupack) |
2648 | tp->frto = 0; /* Step 3.a. loss was real */ | 2639 | tp->frto = 0; /* Step 3.a. loss was real */ |