[Midnightbsd-cvs] src [7777] trunk/sys/netinet: add experimental tcp extensions handler
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 4 17:17:37 EDT 2016
Revision: 7777
http://svnweb.midnightbsd.org/src/?rev=7777
Author: laffer1
Date: 2016-09-04 17:17:36 -0400 (Sun, 04 Sep 2016)
Log Message:
-----------
add experimental tcp extensions handler
Modified Paths:
--------------
trunk/sys/netinet/tcp_input.c
trunk/sys/netinet/tcp_var.h
Modified: trunk/sys/netinet/tcp_input.c
===================================================================
--- trunk/sys/netinet/tcp_input.c 2016-09-04 21:10:10 UTC (rev 7776)
+++ trunk/sys/netinet/tcp_input.c 2016-09-04 21:17:36 UTC (rev 7777)
@@ -155,6 +155,14 @@
&VNET_NAME(tcp_do_rfc3390), 0,
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
+SYSCTL_NODE(_net_inet_tcp, OID_AUTO, experimental, CTLFLAG_RW, 0,
+ "Experimental TCP extensions");
+
+VNET_DEFINE(int, tcp_do_initcwnd10) = 1;
+SYSCTL_VNET_INT(_net_inet_tcp_experimental, OID_AUTO, initcwnd10, CTLFLAG_RW,
+ &VNET_NAME(tcp_do_initcwnd10), 0,
+ "Enable draft-ietf-tcpm-initcwnd-05 (Increasing initial CWND to 10)");
+
VNET_DEFINE(int, tcp_do_rfc3465) = 1;
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW,
&VNET_NAME(tcp_do_rfc3465), 0,
@@ -165,7 +173,7 @@
&VNET_NAME(tcp_abc_l_var), 2,
"Cap the max cwnd increment during slow-start to this number of segments");
-SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN");
+static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN");
VNET_DEFINE(int, tcp_do_ecn) = 0;
SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW,
@@ -356,14 +364,12 @@
* RFC3390 says only do this if SYN or SYN/ACK didn't got lost.
* We currently check only in syncache_socket for that.
*/
-/* #define TCP_METRICS_CWND */
-#ifdef TCP_METRICS_CWND
- if (metrics.rmx_cwnd)
- tp->snd_cwnd = max(tp->t_maxseg, min(metrics.rmx_cwnd / 2,
- min(tp->snd_wnd, so->so_snd.sb_hiwat)));
- else
-#endif
- if (V_tcp_do_rfc3390)
+ if (tp->snd_cwnd == 1)
+ tp->snd_cwnd = tp->t_maxseg; /* SYN(-ACK) lost */
+ else if (V_tcp_do_initcwnd10)
+ tp->snd_cwnd = min(10 * tp->t_maxseg,
+ max(2 * tp->t_maxseg, 14600));
+ else if (V_tcp_do_rfc3390)
tp->snd_cwnd = min(4 * tp->t_maxseg,
max(2 * tp->t_maxseg, 4380));
#ifdef INET6
Modified: trunk/sys/netinet/tcp_var.h
===================================================================
--- trunk/sys/netinet/tcp_var.h 2016-09-04 21:10:10 UTC (rev 7776)
+++ trunk/sys/netinet/tcp_var.h 2016-09-04 21:17:36 UTC (rev 7777)
@@ -611,6 +611,7 @@
VNET_DECLARE(int, tcp_minmss);
VNET_DECLARE(int, tcp_delack_enabled);
VNET_DECLARE(int, tcp_do_rfc3390);
+VNET_DECLARE(int, tcp_do_initcwnd10);
VNET_DECLARE(int, path_mtu_discovery);
VNET_DECLARE(int, ss_fltsz);
VNET_DECLARE(int, ss_fltsz_local);
@@ -623,6 +624,7 @@
#define V_tcp_minmss VNET(tcp_minmss)
#define V_tcp_delack_enabled VNET(tcp_delack_enabled)
#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390)
+#define V_tcp_do_initcwnd10 VNET(tcp_do_initcwnd10)
#define V_path_mtu_discovery VNET(path_mtu_discovery)
#define V_ss_fltsz VNET(ss_fltsz)
#define V_ss_fltsz_local VNET(ss_fltsz_local)
More information about the Midnightbsd-cvs
mailing list