svn commit: r231353 - stable/8/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri Feb 10 07:21:30 UTC 2012
Author: tuexen
Date: Fri Feb 10 07:21:29 2012
New Revision: 231353
URL: http://svn.freebsd.org/changeset/base/231353
Log:
MFC r216672:
Provide a possibility to configure the inital congestion window to the
value defined in RFC 4960.
Modified:
stable/8/sys/netinet/sctp_cc_functions.c
stable/8/sys/netinet/sctp_sysctl.h
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/boot/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/e1000/ (props changed)
Modified: stable/8/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/8/sys/netinet/sctp_cc_functions.c Fri Feb 10 07:19:36 2012 (r231352)
+++ stable/8/sys/netinet/sctp_cc_functions.c Fri Feb 10 07:21:29 2012 (r231353)
@@ -52,15 +52,19 @@ sctp_set_initial_cc_param(struct sctp_tc
uint32_t cwnd_in_mtu;
assoc = &stcb->asoc;
- /*
- * We take the minimum of the burst limit and the initial congestion
- * window. The initial congestion window is at least two times the
- * MTU.
- */
cwnd_in_mtu = SCTP_BASE_SYSCTL(sctp_initial_cwnd);
- if ((assoc->max_burst > 0) && (cwnd_in_mtu > assoc->max_burst))
- cwnd_in_mtu = assoc->max_burst;
- net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
+ if (cwnd_in_mtu == 0) {
+ /* Using 0 means that the value of RFC 4960 is used. */
+ net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
+ } else {
+ /*
+ * We take the minimum of the burst limit and the initial
+ * congestion window.
+ */
+ if ((assoc->max_burst > 0) && (cwnd_in_mtu > assoc->max_burst))
+ cwnd_in_mtu = assoc->max_burst;
+ net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
+ }
net->ssthresh = assoc->peers_rwnd;
if (SCTP_BASE_SYSCTL(sctp_logging_level) &
Modified: stable/8/sys/netinet/sctp_sysctl.h
==============================================================================
--- stable/8/sys/netinet/sctp_sysctl.h Fri Feb 10 07:19:36 2012 (r231352)
+++ stable/8/sys/netinet/sctp_sysctl.h Fri Feb 10 07:21:29 2012 (r231353)
@@ -500,7 +500,7 @@ struct sctp_sysctl {
/* Initial congestion window in MTU */
#define SCTPCTL_INITIAL_CWND_DESC "Initial congestion window in MTUs"
-#define SCTPCTL_INITIAL_CWND_MIN 1
+#define SCTPCTL_INITIAL_CWND_MIN 0
#define SCTPCTL_INITIAL_CWND_MAX 0xffffffff
#define SCTPCTL_INITIAL_CWND_DEFAULT 3
More information about the svn-src-stable-8
mailing list