Page MenuHomeFreeBSD

D19047.id.diff
No OneTemporary

D19047.id.diff

Index: sys/netinet/tcp_output.c
===================================================================
--- sys/netinet/tcp_output.c
+++ sys/netinet/tcp_output.c
@@ -210,7 +210,7 @@
struct tcpopt to;
unsigned int wanted_cookie = 0;
unsigned int dont_sendalot = 0;
-#if 0
+#if 1
int maxburst = TCP_MAXBURST;
#endif
#ifdef INET6
@@ -255,6 +255,14 @@
idle = 0;
}
}
+ /*
+ * Compute a reasonable burst limit
+ */
+ maxburst = tp->snd_cwnd -
+ (abs((tp->snd_max - tp->snd_una) - (tp->snd_cwnd>>1)) /
+ (tp->snd_cwnd>>1)) * (tp->snd_cwnd>>1);
+ maxburst = max(maxburst, tcp_compute_initwnd(tp->t_maxseg)) /
+ tp->t_maxseg;
again:
/*
* If we've recently taken a timeout, snd_max will be greater than
@@ -1599,7 +1607,7 @@
tp->t_flags &= ~(TF_ACKNOW | TF_DELACK);
if (tcp_timer_active(tp, TT_DELACK))
tcp_timer_activate(tp, TT_DELACK, 0);
-#if 0
+#if 1
/*
* This completely breaks TCP if newreno is turned on. What happens
* is that if delayed-acks are turned on on the receiver, this code
@@ -1608,9 +1616,10 @@
*/
if (sendalot && --maxburst)
goto again;
-#endif
+#else
if (sendalot)
goto again;
+#endif
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 4, 11:34 PM (19 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16463028
Default Alt Text
D19047.id.diff (1 KB)

Event Timeline