aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2010-08-29 15:23:14 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-30 16:45:28 -0400
commit89858ad14307a398961a0f1414b04053c1475e4f (patch)
tree860eca4c0fb4c9c470d407407ba051ae814c9dfa /net/dccp/ccids/ccid3.c
parent4886fcad6e12572afbd230dfab1b268eace20d6d (diff)
dccp ccid-3: use per-route RTO or TCP RTO as fallback
This makes RTAX_RTO_MIN also available to CCID-3, replacing the compile-time RTO lower bound with a per-route tunable value. The original Kconfig option solved the problem that a very low RTT (in the order of HZ) can trigger too frequent and unnecessary reductions of the sending rate. This tunable does not affect the initial RTO value of 2 seconds specified in RFC 5348, section 4.2 and Appendix B. But like the hardcoded Kconfig value, it allows to adapt to network conditions. The same effect as the original Kconfig option of 100ms is now achieved by > ip route replace to unicast 192.168.0.0/24 rto_min 100j dev eth0 (assuming HZ=1000). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r--net/dccp/ccids/ccid3.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 4340672a817c..278e17069322 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -460,13 +460,12 @@ done_computing_x:
460 sk->sk_write_space(sk); 460 sk->sk_write_space(sk);
461 461
462 /* 462 /*
463 * Update timeout interval for the nofeedback timer. 463 * Update timeout interval for the nofeedback timer. In order to control
464 * We use a configuration option to increase the lower bound. 464 * rate halving on networks with very low RTTs (<= 1 ms), use per-route
465 * This can help avoid triggering the nofeedback timer too 465 * tunable RTAX_RTO_MIN value as the lower bound.
466 * often ('spinning') on LANs with small RTTs.
467 */ 466 */
468 hc->tx_t_rto = max_t(u32, 4 * hc->tx_rtt, (CONFIG_IP_DCCP_CCID3_RTO * 467 hc->tx_t_rto = max_t(u32, 4 * hc->tx_rtt,
469 (USEC_PER_SEC / 1000))); 468 USEC_PER_SEC/HZ * tcp_rto_min(sk));
470 /* 469 /*
471 * Schedule no feedback timer to expire in 470 * Schedule no feedback timer to expire in
472 * max(t_RTO, 2 * s/X) = max(t_RTO, 2 * t_ipi) 471 * max(t_RTO, 2 * s/X) = max(t_RTO, 2 * t_ipi)