svn commit: r186123 - projects/tcp_ffcaia2008_8.x/sys/netinet
Lawrence Stewart
lstewart at FreeBSD.org
Mon Dec 15 00:11:46 PST 2008
Author: lstewart
Date: Mon Dec 15 08:11:45 2008
New Revision: 186123
URL: http://svn.freebsd.org/changeset/base/186123
Log:
Work on adding appropriate byte counting (RFC 3465) support to TCP.
Modified:
projects/tcp_ffcaia2008_8.x/sys/netinet/tcp_input.c
projects/tcp_ffcaia2008_8.x/sys/netinet/vinet.h
Modified: projects/tcp_ffcaia2008_8.x/sys/netinet/tcp_input.c
==============================================================================
--- projects/tcp_ffcaia2008_8.x/sys/netinet/tcp_input.c Mon Dec 15 07:51:59 2008 (r186122)
+++ projects/tcp_ffcaia2008_8.x/sys/netinet/tcp_input.c Mon Dec 15 08:11:45 2008 (r186123)
@@ -130,6 +130,15 @@ SYSCTL_V_INT(V_NET, vnet_inet, _net_inet
tcp_do_rfc3390, 0,
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
+static int tcp_do_rfc3465 = 1;
+static int tcp_abc_l_var = 1;
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW,
+ tcp_do_rfc3465, 0,
+ "Enable RFC 3465 (Appropriate Byte Counting)");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_RW,
+ tcp_abc_l_var, 1,
+ "Max # segments)");
+
int tcp_do_ecn = 0;
int tcp_ecn_maxretries = 1;
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN");
@@ -2113,7 +2122,10 @@ process_ACK:
!IN_FASTRECOVERY(tp)) {
u_int cw = tp->snd_cwnd;
u_int incr = tp->t_maxseg;
- if (cw > tp->snd_ssthresh)
+ if (V_tcp_do_rfc3465)
+ incr = min(acked,
+ V_tcp_abc_l_var * tp->t_maxseg);
+ else if (cw > tp->snd_ssthresh)
incr = max((incr * incr / cw), 1);
tp->snd_cwnd = min(cw+incr, TCP_MAXWIN<<tp->snd_scale);
}
Modified: projects/tcp_ffcaia2008_8.x/sys/netinet/vinet.h
==============================================================================
--- projects/tcp_ffcaia2008_8.x/sys/netinet/vinet.h Mon Dec 15 07:51:59 2008 (r186122)
+++ projects/tcp_ffcaia2008_8.x/sys/netinet/vinet.h Mon Dec 15 08:11:45 2008 (r186123)
@@ -124,6 +124,8 @@ struct vnet_inet {
int _drop_synfin;
int _tcp_do_rfc3042;
int _tcp_do_rfc3390;
+ int _tcp_do_rfc3465;
+ int _tcp_abc_l_var
int _tcp_do_ecn;
int _tcp_ecn_maxretries;
int _tcp_insecure_rst;
@@ -284,6 +286,7 @@ struct vnet_inet {
#define V_subnetsarelocal VNET_INET(subnetsarelocal)
#define V_tcb VNET_INET(tcb)
#define V_tcbinfo VNET_INET(tcbinfo)
+#define V_tcp_abc_l_var VNET_INET(tcp_abc_l_var)
#define V_tcp_autorcvbuf_inc VNET_INET(tcp_autorcvbuf_inc)
#define V_tcp_autorcvbuf_max VNET_INET(tcp_autorcvbuf_max)
#define V_tcp_autosndbuf_inc VNET_INET(tcp_autosndbuf_inc)
@@ -296,6 +299,7 @@ struct vnet_inet {
#define V_tcp_do_rfc1323 VNET_INET(tcp_do_rfc1323)
#define V_tcp_do_rfc3042 VNET_INET(tcp_do_rfc3042)
#define V_tcp_do_rfc3390 VNET_INET(tcp_do_rfc3390)
+#define V_tcp_do_rfc3465 VNET_INET(tcp_do_rfc3465)
#define V_tcp_do_sack VNET_INET(tcp_do_sack)
#define V_tcp_do_tso VNET_INET(tcp_do_tso)
#define V_tcp_ecn_maxretries VNET_INET(tcp_ecn_maxretries)
More information about the svn-src-projects
mailing list