Add a sysctl for newreno (default to off).
This commit is contained in:
parent
c94e60002d
commit
8e8f38e0f2
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: sysctl.3,v 1.32 1998/09/10 10:46:03 mouse Exp $
|
.\" $NetBSD: sysctl.3,v 1.33 1998/10/06 00:20:46 matt Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1993
|
.\" Copyright (c) 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
@ -563,6 +563,7 @@ The currently defined protocols and names are:
|
|||||||
.It tcp keepintvl integer yes
|
.It tcp keepintvl integer yes
|
||||||
.It tcp keepcnt integer yes
|
.It tcp keepcnt integer yes
|
||||||
.It tcp slowhz integer no
|
.It tcp slowhz integer no
|
||||||
|
.It tcp newreno integer yes
|
||||||
.It udp checksum integer yes
|
.It udp checksum integer yes
|
||||||
.It udp sendspace integer yes
|
.It udp sendspace integer yes
|
||||||
.It udp recvspace integer yes
|
.It udp recvspace integer yes
|
||||||
@ -681,6 +682,9 @@ response is received from the peer.
|
|||||||
The units for tcp.keepidle and tcp.keepintvl; those variables are in ticks
|
The units for tcp.keepidle and tcp.keepintvl; those variables are in ticks
|
||||||
of a clock that ticks tcp.slowhz times per second. (That is, their values
|
of a clock that ticks tcp.slowhz times per second. (That is, their values
|
||||||
must be divided by the tcp.slowhz value to get times in seconds.)
|
must be divided by the tcp.slowhz value to get times in seconds.)
|
||||||
|
.It Li tcp.newreno
|
||||||
|
Returns 1 if the use of J. Hoe's NewReno congestion control algorithm is
|
||||||
|
enabled. This algorithm improves the start-up behavior of TCP connections.
|
||||||
.It Li udp.checksum
|
.It Li udp.checksum
|
||||||
Returns 1 when UDP checksums are being computed and checked.
|
Returns 1 when UDP checksums are being computed and checked.
|
||||||
Disabling UDP checksums is strongly discouraged.
|
Disabling UDP checksums is strongly discouraged.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tcp_input.c,v 1.68 1998/10/04 21:33:53 matt Exp $ */
|
/* $NetBSD: tcp_input.c,v 1.69 1998/10/06 00:20:44 matt Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -1217,7 +1217,13 @@ after_listen:
|
|||||||
* If the congestion window was inflated to account
|
* If the congestion window was inflated to account
|
||||||
* for the other side's cached packets, retract it.
|
* for the other side's cached packets, retract it.
|
||||||
*/
|
*/
|
||||||
if (tp->t_dupacks >= tcprexmtthresh && !tcp_newreno(tp, ti)) {
|
if (tcp_do_newreno) {
|
||||||
|
if (tp->t_dupacks >= tcprexmtthresh &&
|
||||||
|
tp->snd_cwnd > tp->snd_ssthresh)
|
||||||
|
tp->snd_cwnd = tp->snd_ssthresh;
|
||||||
|
tp->t_dupacks = 0;
|
||||||
|
} else if (tp->t_dupacks >= tcprexmtthresh
|
||||||
|
&& !tcp_newreno(tp, ti)) {
|
||||||
tp->snd_cwnd = tp->snd_ssthresh;
|
tp->snd_cwnd = tp->snd_ssthresh;
|
||||||
/*
|
/*
|
||||||
* Window inflation should have left us with approx.
|
* Window inflation should have left us with approx.
|
||||||
@ -1278,7 +1284,7 @@ after_listen:
|
|||||||
|
|
||||||
if (cw > tp->snd_ssthresh)
|
if (cw > tp->snd_ssthresh)
|
||||||
incr = incr * incr / cw;
|
incr = incr * incr / cw;
|
||||||
if (SEQ_GEQ(ti->ti_ack, tp->snd_recover))
|
if (!tcp_do_newreno || SEQ_GEQ(ti->ti_ack, tp->snd_recover))
|
||||||
tp->snd_cwnd = min(cw + incr,TCP_MAXWIN<<tp->snd_scale);
|
tp->snd_cwnd = min(cw + incr,TCP_MAXWIN<<tp->snd_scale);
|
||||||
}
|
}
|
||||||
if (acked > so->so_snd.sb_cc) {
|
if (acked > so->so_snd.sb_cc) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tcp_output.c,v 1.44 1998/10/04 21:33:53 matt Exp $ */
|
/* $NetBSD: tcp_output.c,v 1.45 1998/10/06 00:20:45 matt Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -712,7 +712,7 @@ out:
|
|||||||
if (maxburst < 0)
|
if (maxburst < 0)
|
||||||
printf("tcp_output: maxburst exceeded by %d\n", -maxburst);
|
printf("tcp_output: maxburst exceeded by %d\n", -maxburst);
|
||||||
#endif
|
#endif
|
||||||
if (sendalot && --maxburst)
|
if (sendalot && (!tcp_do_newreno || --maxburst))
|
||||||
goto again;
|
goto again;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tcp_subr.c,v 1.59 1998/09/19 04:02:52 mycroft Exp $ */
|
/* $NetBSD: tcp_subr.c,v 1.60 1998/10/06 00:20:45 matt Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -113,6 +113,7 @@ int tcp_do_rfc1323 = 1; /* window scaling / timestamps (obsolete) */
|
|||||||
int tcp_do_sack = 1; /* selective acknowledgement */
|
int tcp_do_sack = 1; /* selective acknowledgement */
|
||||||
int tcp_do_win_scale = 1; /* RFC1323 window scaling */
|
int tcp_do_win_scale = 1; /* RFC1323 window scaling */
|
||||||
int tcp_do_timestamps = 1; /* RFC1323 timestamps */
|
int tcp_do_timestamps = 1; /* RFC1323 timestamps */
|
||||||
|
int tcp_do_newreno = 0; /* Use the New Reno algorithms */
|
||||||
int tcp_ack_on_push = 0; /* set to enable immediate ACK-on-PUSH */
|
int tcp_ack_on_push = 0; /* set to enable immediate ACK-on-PUSH */
|
||||||
int tcp_init_win = 1;
|
int tcp_init_win = 1;
|
||||||
int tcp_mss_ifmtu = 0;
|
int tcp_mss_ifmtu = 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tcp_var.h,v 1.54 1998/10/04 21:33:53 matt Exp $ */
|
/* $NetBSD: tcp_var.h,v 1.55 1998/10/06 00:20:45 matt Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -386,7 +386,8 @@ struct tcpstat {
|
|||||||
#define TCPCTL_KEEPINTVL 18 /* keepalive probe interval */
|
#define TCPCTL_KEEPINTVL 18 /* keepalive probe interval */
|
||||||
#define TCPCTL_KEEPCNT 19 /* keepalive count */
|
#define TCPCTL_KEEPCNT 19 /* keepalive count */
|
||||||
#define TCPCTL_SLOWHZ 20 /* PR_SLOWHZ (read-only) */
|
#define TCPCTL_SLOWHZ 20 /* PR_SLOWHZ (read-only) */
|
||||||
#define TCPCTL_MAXID 21
|
#define TCPCTL_NEWRENO 21 /* NewReno Congestion Control */
|
||||||
|
#define TCPCTL_MAXID 22
|
||||||
|
|
||||||
#define TCPCTL_NAMES { \
|
#define TCPCTL_NAMES { \
|
||||||
{ 0, 0 }, \
|
{ 0, 0 }, \
|
||||||
@ -410,6 +411,7 @@ struct tcpstat {
|
|||||||
{ "keepintvl", CTLTYPE_INT }, \
|
{ "keepintvl", CTLTYPE_INT }, \
|
||||||
{ "keepcnt", CTLTYPE_INT }, \
|
{ "keepcnt", CTLTYPE_INT }, \
|
||||||
{ "slowhz", CTLTYPE_INT }, \
|
{ "slowhz", CTLTYPE_INT }, \
|
||||||
|
{ "newreno", CTLTYPE_INT }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
@ -420,6 +422,7 @@ extern int tcp_do_rfc1323; /* enabled/disabled? */
|
|||||||
extern int tcp_do_sack; /* SACK enabled/disabled? */
|
extern int tcp_do_sack; /* SACK enabled/disabled? */
|
||||||
extern int tcp_do_win_scale; /* RFC1323 window scaling enabled/disabled? */
|
extern int tcp_do_win_scale; /* RFC1323 window scaling enabled/disabled? */
|
||||||
extern int tcp_do_timestamps; /* RFC1323 timestamps enabled/disabled? */
|
extern int tcp_do_timestamps; /* RFC1323 timestamps enabled/disabled? */
|
||||||
|
extern int tcp_do_newreno; /* Use the New Reno algorithms */
|
||||||
extern int tcp_mssdflt; /* default seg size */
|
extern int tcp_mssdflt; /* default seg size */
|
||||||
extern int tcp_init_win; /* initial window */
|
extern int tcp_init_win; /* initial window */
|
||||||
extern int tcp_mss_ifmtu; /* take MSS from interface, not in_maxmtu */
|
extern int tcp_mss_ifmtu; /* take MSS from interface, not in_maxmtu */
|
||||||
@ -458,6 +461,7 @@ extern u_long syn_cache_count;
|
|||||||
{ 1, 0, &tcp_keepintvl }, \
|
{ 1, 0, &tcp_keepintvl }, \
|
||||||
{ 1, 0, &tcp_keepcnt }, \
|
{ 1, 0, &tcp_keepcnt }, \
|
||||||
{ 1, 1, 0, PR_SLOWHZ }, \
|
{ 1, 1, 0, PR_SLOWHZ }, \
|
||||||
|
{ 1, 0, &tcp_do_newreno }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
int tcp_attach __P((struct socket *));
|
int tcp_attach __P((struct socket *));
|
||||||
|
Loading…
Reference in New Issue
Block a user