As Stanislav Meduna already postet, one part of the problem is in
tcp.c cleanup_rbuf():
if((copied >= rcv_window_now) &&
((rcv_window_now + tp->mss_cache) <= tp->window_clamp))
tcp_read_wakeup(sk);
I'm embarrased, what a stupid bug. Good spotting.
I was trying to avoid the calculation of the new window when possible
because I knew the window selection path often had some multiples in
it, crap.
Please try this patch:
--- net/ipv4/tcp.c.~1~ Mon Feb 22 10:17:20 1999
+++ net/ipv4/tcp.c Sun Mar 7 06:26:23 1999
@@ -1070,6 +1070,7 @@
if(copied > 0) {
struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
__u32 rcv_window_now = tcp_receive_window(tp);
+ __u32 new_window = __tcp_select_window(sk);
/* We won't be raising the window any further than
* the window-clamp allows. Our window selection
@@ -1077,7 +1078,7 @@
* checks are necessary to prevent spurious ACKs
* which don't advertize a larger window.
*/
- if((copied >= rcv_window_now) &&
+ if((new_window && (new_window >= rcv_window_now * 2)) &&
((rcv_window_now + tp->mss_cache) <= tp->window_clamp))
tcp_read_wakeup(sk);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/