diff options
| author | Jeffrey Hsu <hsu@FreeBSD.org> | 2004-01-20 21:40:25 +0000 | 
|---|---|---|
| committer | Jeffrey Hsu <hsu@FreeBSD.org> | 2004-01-20 21:40:25 +0000 | 
| commit | 61a36e3dfc9c0ae705d582a07752c26b71855c8d (patch) | |
| tree | 0d18cf0a68416ca5ff2991e110700036c550e05c /sys/netinet | |
| parent | 1aa9b6106892f28d5e873a4312a43b34ddf7494c (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/tcp_input.c | 11 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 11 | 
2 files changed, 10 insertions, 12 deletions
| diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 263dfd83f163..eef736cf34bc 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1859,13 +1859,12 @@ trimthenstep6:  					KASSERT(tp->t_dupacks == 1 ||  					    tp->t_dupacks == 2,  					    ("dupacks not 1 or 2")); -					if (tp->t_dupacks == 1) { +					if (tp->t_dupacks == 1)  						tp->snd_limited = 0; -						tp->snd_cwnd += tp->t_maxseg; -					} else { -						tp->snd_cwnd += -						    tp->t_maxseg * 2; -					} +					tp->snd_cwnd = +					    (tp->snd_nxt - tp->snd_una) + +					    (tp->t_dupacks - tp->snd_limited) * +					    tp->t_maxseg;  					(void) tcp_output(tp);  					sent = tp->snd_max - oldsndmax;  					if (sent > tp->t_maxseg) { diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 263dfd83f163..eef736cf34bc 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1859,13 +1859,12 @@ trimthenstep6:  					KASSERT(tp->t_dupacks == 1 ||  					    tp->t_dupacks == 2,  					    ("dupacks not 1 or 2")); -					if (tp->t_dupacks == 1) { +					if (tp->t_dupacks == 1)  						tp->snd_limited = 0; -						tp->snd_cwnd += tp->t_maxseg; -					} else { -						tp->snd_cwnd += -						    tp->t_maxseg * 2; -					} +					tp->snd_cwnd = +					    (tp->snd_nxt - tp->snd_una) + +					    (tp->t_dupacks - tp->snd_limited) * +					    tp->t_maxseg;  					(void) tcp_output(tp);  					sent = tp->snd_max - oldsndmax;  					if (sent > tp->t_maxseg) { | 
