aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-02-22 01:56:19 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:23:01 -0400
commit9ead9a1d385ae2c52a6dcf2828d84ce66be04fc2 (patch)
tree3346cc7d0428f213ac7d07c41d1d0accc4a741f9
parent522e7548a9bd40305df41c0beae69448b7620d6b (diff)
[TCP] FRTO: Separated response from FRTO detection algorithm
FRTO spurious RTO detection algorithm (RFC4138) does not include response to a detected spurious RTO but can use different response algorithms. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/tcp_input.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b21e232d5d33..c5be3d0465f5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2467,6 +2467,15 @@ static int tcp_ack_update_window(struct sock *sk, struct tcp_sock *tp,
2467 return flag; 2467 return flag;
2468} 2468}
2469 2469
2470/* A very conservative spurious RTO response algorithm: reduce cwnd and
2471 * continue in congestion avoidance.
2472 */
2473static void tcp_conservative_spur_to_response(struct tcp_sock *tp)
2474{
2475 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
2476 tcp_moderate_cwnd(tp);
2477}
2478
2470static void tcp_process_frto(struct sock *sk, u32 prior_snd_una) 2479static void tcp_process_frto(struct sock *sk, u32 prior_snd_una)
2471{ 2480{
2472 struct tcp_sock *tp = tcp_sk(sk); 2481 struct tcp_sock *tp = tcp_sk(sk);
@@ -2488,12 +2497,7 @@ static void tcp_process_frto(struct sock *sk, u32 prior_snd_una)
2488 */ 2497 */
2489 tp->snd_cwnd = tcp_packets_in_flight(tp) + 2; 2498 tp->snd_cwnd = tcp_packets_in_flight(tp) + 2;
2490 } else { 2499 } else {
2491 /* Also the second ACK after RTO advances the window. 2500 tcp_conservative_spur_to_response(tp);
2492 * The RTO was likely spurious. Reduce cwnd and continue
2493 * in congestion avoidance
2494 */
2495 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
2496 tcp_moderate_cwnd(tp);
2497 } 2501 }
2498 2502
2499 /* F-RTO affects on two new ACKs following RTO. 2503 /* F-RTO affects on two new ACKs following RTO.