From: "David S. Miller" <davem@davemloft.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: vandrove@vc.cvut.cz, netdev@oss.sgi.com
Subject: Re: Known problems with TCP window size on 2.6.7?
Date: Wed, 27 Oct 2004 14:53:56 -0700 [thread overview]
Message-ID: <20041027145356.6c22959e.davem@davemloft.net> (raw)
In-Reply-To: <E1CMml4-0001Cm-00@gondolin.me.apana.org.au>
On Wed, 27 Oct 2004 22:18:30 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Petr Vandrovec <vandrove@vc.cvut.cz> wrote:
> > are there some known problems with 2.6.7 and TCP window growing up over limits?
>
> No.
Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7
which I believe was first fixed in 2.6.8 or so. It was fixed by this
patch:
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/07/22 14:01:38-07:00 davem@nuts.davemloft.net
# [TCP]: Do not overflow 16-bit window field in tcp_select_window().
#
# Signed-off-by: David S. Miller <davem@redhat.com>
#
# net/ipv4/tcp_output.c
# 2004/07/22 14:01:10-07:00 davem@nuts.davemloft.net +8 -0
# [TCP]: Do not overflow 16-bit window field in tcp_select_window().
#
# Signed-off-by: David S. Miller <davem@redhat.com>
#
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00
+++ b/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00
@@ -168,6 +168,14 @@
tp->rcv_wnd = new_win;
tp->rcv_wup = tp->rcv_nxt;
+ /* Make sure we do not exceed the maximum possible
+ * scaled window.
+ */
+ if (!tp->rcv_wscale)
+ new_win = min(new_win, MAX_TCP_WINDOW);
+ else
+ new_win = min(new_win, (65535U << tp->rcv_wscale));
+
/* RFC1323 scaling applied */
new_win >>= tp->rcv_wscale;
next prev parent reply other threads:[~2004-10-27 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-27 11:06 Known problems with TCP window size on 2.6.7? Petr Vandrovec
2004-10-27 12:18 ` Herbert Xu
2004-10-27 21:53 ` David S. Miller [this message]
2004-10-27 22:07 ` Herbert Xu
2004-10-27 23:19 ` Petr Vandrovec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041027145356.6c22959e.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
--cc=vandrove@vc.cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).