Add support for RFC 3390, which allows for a variable-sized

initial congestion window.
This commit is contained in:
Jeffrey Hsu 2003-03-13 01:43:45 +00:00
parent 6ec62361c8
commit da3a8a1a4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112171
2 changed files with 18 additions and 4 deletions

View File

@ -129,6 +129,11 @@ static int tcp_do_rfc3042 = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
&tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)");
static int tcp_do_rfc3390 = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
&tcp_do_rfc3390, 0,
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@ -2745,10 +2750,12 @@ tcp_mss(tp, offer)
* Set the slow-start flight size depending on whether this
* is a local network or not.
*/
if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
if (tcp_do_rfc3390)
tp->snd_cwnd = min(4 * mss, max(2 * mss, 4380));
else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
(!isipv6 && in_localaddr(inp->inp_faddr)))
tp->snd_cwnd = mss * ss_fltsz_local;
else
else
tp->snd_cwnd = mss * ss_fltsz;
if (rt->rt_rmx.rmx_ssthresh) {

View File

@ -129,6 +129,11 @@ static int tcp_do_rfc3042 = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
&tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)");
static int tcp_do_rfc3390 = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
&tcp_do_rfc3390, 0,
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@ -2745,10 +2750,12 @@ tcp_mss(tp, offer)
* Set the slow-start flight size depending on whether this
* is a local network or not.
*/
if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
if (tcp_do_rfc3390)
tp->snd_cwnd = min(4 * mss, max(2 * mss, 4380));
else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
(!isipv6 && in_localaddr(inp->inp_faddr)))
tp->snd_cwnd = mss * ss_fltsz_local;
else
else
tp->snd_cwnd = mss * ss_fltsz;
if (rt->rt_rmx.rmx_ssthresh) {