summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-03-22 18:09:21 +0000
committerwollman <wollman@FreeBSD.org>1996-03-22 18:09:21 +0000
commitacfe4c4467db308020c97e72d3b390ee773f337c (patch)
treeabd55e1ebb0eb00f663828297dcb5cd2f74c9bf4 /sys/netinet/tcp_var.h
parentc29bc64893c71ac25bb21b6ce4c543fa1a1b3755 (diff)
downloadFreeBSD-src-acfe4c4467db308020c97e72d3b390ee773f337c.zip
FreeBSD-src-acfe4c4467db308020c97e72d3b390ee773f337c.tar.gz
A number of performance-reducing flaws fixed based on comments
from Larry Peterson &co. at Arizona: - Header prediction for ACKs did not exclude Fast Retransmit/Recovery. - srtt calculation tended to get ``stuck'' and could never decrease when below 8. It still can't, but the scaling factors are adjusted so that this artifact does not cause as bad an effect on the RTO value as it used to. The paper also points out the incr/8 error that has been long since fixed, and the problems with ACKing frequency resulting from the use of options which I suspect to be fixed already as well (as part of the T/TCP work). Obtained from: Brakmo & Peterson, ``Performance Problems in BSD4.4 TCP''
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index d53251a0..3035143 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $Id: tcp_var.h,v 1.29 1996/02/26 21:47:13 guido Exp $
+ * $Id: tcp_var.h,v 1.30 1996/02/27 15:12:53 bde Exp $
*/
#ifndef _NETINET_TCP_VAR_H_
@@ -191,10 +191,18 @@ struct rmxp_tao {
* and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the
* binary point, and is smoothed with an ALPHA of 0.75.
*/
+#ifdef notdef
#define TCP_RTT_SCALE 8 /* multiplier for srtt; 3 bits frac. */
#define TCP_RTT_SHIFT 3 /* shift for srtt; 3 bits frac. */
#define TCP_RTTVAR_SCALE 4 /* multiplier for rttvar; 2 bits */
#define TCP_RTTVAR_SHIFT 2 /* shift for rttvar; 2 bits */
+#else
+#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */
+#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */
+#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */
+#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */
+#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */
+#endif
/*
* The initial retransmission should happen at rtt + 4 * rttvar.
@@ -206,11 +214,25 @@ struct rmxp_tao {
* 1.5 tick we need. But, because the bias is
* statistical, we have to test that we don't drop below
* the minimum feasible timer (which is 2 ticks).
+#ifdef notdef
* This macro assumes that the value of TCP_RTTVAR_SCALE
* is the same as the multiplier for rttvar.
+#else
+ * This version of the macro adapted from a paper by Lawrence
+ * Brakmo and Larry Peterson which outlines a problem caused
+ * by insufficient precision in the original implementation,
+ * which results in inappropriately large RTO values for very
+ * fast networks.
+#endif
*/
+#ifdef notdef
#define TCP_REXMTVAL(tp) \
(((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar)
+#else
+#define TCP_REXMTVAL(tp) \
+ ((((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_RTTVAR_SHIFT)) \
+ + ((tp)->t_rttvar) >> TCP_RTTVAR_SHIFT))
+#endif
/* XXX
* We want to avoid doing m_pullup on incoming packets but that
OpenPOWER on IntegriCloud