summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2010-12-02 01:36:00 +0000
committerlstewart <lstewart@FreeBSD.org>2010-12-02 01:36:00 +0000
commitf6f8b1d549789edac59dceae52ddfeef29a89206 (patch)
treed6d53b927036fc4994afbd2e5aeb064877082c11 /sys/netinet/tcp_output.c
parent234ab3f0356ccf170c37d91adc8adf9d1312e63e (diff)
downloadFreeBSD-src-f6f8b1d549789edac59dceae52ddfeef29a89206.zip
FreeBSD-src-f6f8b1d549789edac59dceae52ddfeef29a89206.tar.gz
- Reinstantiate the after_idle hook call in tcp_output(), which got lost
somewhere along the way due to mismerging r211464 in our development tree. - Capture the essence of r211464 in NewReno's after_idle() hook. We don't use V_ss_fltsz/V_ss_fltsz_local yet which needs to be revisited. Sponsored by: FreeBSD Foundation Submitted by: David Hayes <dahayes at swin edu au> MFC after: 9 weeks X-MFC with: r215166
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index bf42dac..b7ec6f7 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -148,7 +148,7 @@ tcp_output(struct tcpcb *tp)
{
struct socket *so = tp->t_inpcb->inp_socket;
long len, recwin, sendwin;
- int off, flags, error, rw;
+ int off, flags, error;
struct mbuf *m;
struct ip *ip = NULL;
struct ipovly *ipov = NULL;
@@ -182,37 +182,8 @@ tcp_output(struct tcpcb *tp)
* to send, then transmit; otherwise, investigate further.
*/
idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
- if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur) {
- /*
- * If we've been idle for more than one retransmit
- * timeout the old congestion window is no longer
- * current and we have to reduce it to the restart
- * window before we can transmit again.
- *
- * The restart window is the initial window or the last
- * CWND, whichever is smaller.
- *
- * This is done to prevent us from flooding the path with
- * a full CWND at wirespeed, overloading router and switch
- * buffers along the way.
- *
- * See RFC5681 Section 4.1. "Restarting Idle Connections".
- */
- if (V_tcp_do_rfc3390)
- rw = min(4 * tp->t_maxseg,
- max(2 * tp->t_maxseg, 4380));
-#ifdef INET6
- else if ((isipv6 ? in6_localaddr(&tp->t_inpcb->in6p_faddr) :
- in_localaddr(tp->t_inpcb->inp_faddr)))
-#else
- else if (in_localaddr(tp->t_inpcb->inp_faddr))
-#endif
- rw = V_ss_fltsz_local * tp->t_maxseg;
- else
- rw = V_ss_fltsz * tp->t_maxseg;
-
- tp->snd_cwnd = min(rw, tp->snd_cwnd);
- }
+ if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur)
+ cc_after_idle(tp);
tp->t_flags &= ~TF_LASTIDLE;
if (idle) {
if (tp->t_flags & TF_MORETOCOME) {
OpenPOWER on IntegriCloud