aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-02-22 02:03:35 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:23:05 -0400
commit7b0eb22b1d3b049306813a4aaa52966650f7491c (patch)
treea5a126032d0c69b9c5977754d42efd301b7ab442 /net/ipv4/tcp_input.c
parent7487c48c4fd15d1e2542be1183b783562cfe10bc (diff)
[TCP] FRTO: Use Disorder state during operation instead of Open
Retransmission counter assumptions are to be changed. Forcing reason to do this exist: Using sysctl in check would be racy as soon as FRTO starts to ignore some ACKs (doing that in the following patches). Userspace may disable it at any moment giving nice oops if timing is right. frto_counter would be inaccessible from userspace, but with SACK enhanced FRTO retrans_out can include other than head, and possibly leaving it non-zero after spurious RTO, boom again. Luckily, solution seems rather simple: never go directly to Open state but use Disorder instead. This does not really change much, since TCP could anyway change its state to Disorder during FRTO using path tcp_fastretrans_alert -> tcp_try_to_open (e.g., when a SACK block makes ACK dubious). Besides, Disorder seems to be the state where TCP should be if not recovering (in Recovery or Loss state) while having some retransmissions in-flight (see tcp_try_to_open), which is exactly what happens with FRTO. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 194e880af51e..e806839acdd9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1286,7 +1286,8 @@ void tcp_enter_frto(struct sock *sk)
1286 } 1286 }
1287 tcp_sync_left_out(tp); 1287 tcp_sync_left_out(tp);
1288 1288
1289 tcp_set_ca_state(sk, TCP_CA_Open); 1289 tcp_set_ca_state(sk, TCP_CA_Disorder);
1290 tp->high_seq = tp->snd_nxt;
1290 tp->frto_highmark = tp->snd_nxt; 1291 tp->frto_highmark = tp->snd_nxt;
1291 tp->frto_counter = 1; 1292 tp->frto_counter = 1;
1292} 1293}
@@ -2014,8 +2015,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
2014 /* E. Check state exit conditions. State can be terminated 2015 /* E. Check state exit conditions. State can be terminated
2015 * when high_seq is ACKed. */ 2016 * when high_seq is ACKed. */
2016 if (icsk->icsk_ca_state == TCP_CA_Open) { 2017 if (icsk->icsk_ca_state == TCP_CA_Open) {
2017 if (!sysctl_tcp_frto) 2018 BUG_TRAP(tp->retrans_out == 0);
2018 BUG_TRAP(tp->retrans_out == 0);
2019 tp->retrans_stamp = 0; 2019 tp->retrans_stamp = 0;
2020 } else if (!before(tp->snd_una, tp->high_seq)) { 2020 } else if (!before(tp->snd_una, tp->high_seq)) {
2021 switch (icsk->icsk_ca_state) { 2021 switch (icsk->icsk_ca_state) {