Commit 6408d206 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

[TCP] FRTO: Ignore some uninteresting ACKs

Handles RFC4138 shortcoming (in step 2); it should also have case
c) which ignores ACKs that are not duplicates nor advance window
(opposite dir data, winupdate).
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7b0eb22b
...@@ -2495,9 +2495,9 @@ static void tcp_conservative_spur_to_response(struct tcp_sock *tp) ...@@ -2495,9 +2495,9 @@ static void tcp_conservative_spur_to_response(struct tcp_sock *tp)
/* F-RTO spurious RTO detection algorithm (RFC4138) /* F-RTO spurious RTO detection algorithm (RFC4138)
* *
* F-RTO affects during two new ACKs following RTO. State (ACK number) is kept * F-RTO affects during two new ACKs following RTO (well, almost, see inline
* in frto_counter. When ACK advances window (but not to or beyond highest * comments). State (ACK number) is kept in frto_counter. When ACK advances
* sequence sent before RTO): * window (but not to or beyond highest sequence sent before RTO):
* On First ACK, send two new segments out. * On First ACK, send two new segments out.
* On Second ACK, RTO was likely spurious. Do spurious response (response * On Second ACK, RTO was likely spurious. Do spurious response (response
* algorithm is not part of the F-RTO detection algorithm * algorithm is not part of the F-RTO detection algorithm
...@@ -2527,6 +2527,13 @@ static void tcp_process_frto(struct sock *sk, u32 prior_snd_una, int flag) ...@@ -2527,6 +2527,13 @@ static void tcp_process_frto(struct sock *sk, u32 prior_snd_una, int flag)
if (flag&FLAG_DATA_ACKED) if (flag&FLAG_DATA_ACKED)
inet_csk(sk)->icsk_retransmits = 0; inet_csk(sk)->icsk_retransmits = 0;
/* RFC4138 shortcoming in step 2; should also have case c): ACK isn't
* duplicate nor advances window, e.g., opposite dir data, winupdate
*/
if ((tp->snd_una == prior_snd_una) && (flag&FLAG_NOT_DUP) &&
!(flag&FLAG_FORWARD_PROGRESS))
return;
if (tp->snd_una == prior_snd_una || if (tp->snd_una == prior_snd_una ||
!before(tp->snd_una, tp->frto_highmark)) { !before(tp->snd_una, tp->frto_highmark)) {
tcp_enter_frto_loss(sk); tcp_enter_frto_loss(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment