lkml.org 
[lkml]   [1999]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: TCP window updates [Was: PROBLEM: Sending mail-attachment]
   Date: Sun, 7 Mar 1999 15:16:25 +0100 (CET)
From: Matthias Moeller <mattes@ice.robin.de>

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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.109 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site