[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJ1P8tS-tWtqKEuZw9vQSzDSpgHo24=yYCSHqeJzC8+uQ@mail.gmail.com>
Date: Wed, 10 Feb 2021 16:45:03 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Zhibin Liu <zhibinliu@...gle.com>
Cc: netdev <netdev@...r.kernel.org>,
Tianpeng Jin <tianpengjin@...gle.com>,
Chunlei Zhu <chunleiz@...gle.com>,
Weiming Liu <weimingliu@...gle.com>,
Yuchung Cheng <ycheng@...gle.com>,
Neal Cardwell <ncardwell@...gle.com>
Subject: Re: [Linux Kernel Network Bug Report] tcp_rmem[1] is not resulting in
correct TCP window size since 3.4
On Wed, Feb 10, 2021 at 4:37 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Wed, Feb 10, 2021 at 4:14 PM Zhibin Liu <zhibinliu@...gle.com> wrote:
> >
> > Hi, Linux Kernel Networking TCP maintainers,
> >
> > I sent this bug report mail following the reporting bug guideline.
> >
> > Here is the details of the bug:
> > tcp_rmem[1] has value 87380, which will result in a window of 65535 when tcp_adv_win_scale=2. (87380 - 87380/2^2 = 65535)
> >
> > But since 3.4, commit b49960a05e32121d29316cfdf653894b88ac9190, tcp_adv_win_scale default value is changed from 2 to 1.
> >
> > The change causes tcp_rmem[1] with value 87380 will result in a window of 43690, instead of expected 65535.
>
>
> win of 65535 was used in SYN and SYNACK way after commit
> b49960a05e32121d (this commit is 8 years old : Wed May 2 02:28:41
> 2012)
>
> Change was done by Yuchung in 2018
> in commit a337531b942bd8a03e7052444d7e36972aac2d92 tcp: up initial
> rmem to 128KB and SYN rwin to around 64KB
>
>
One thing to consider is that tcp_rmem[1] was overridden with a bigger
value depending on MSS of the connection
at connect() or accept() time.
On these old kernels, this was done in tcp_fixup_rcvbuf()
So I suggest you use getsockopt( ... SO_RCVBUF ) right after connect()
or accept() to double check what is the actual value for sk->sk_rcvbuf
>
> >
> > Now the doc Documentation/networking/ip-sysctl.rst is still mentioning 87380 tcp_rmem[1] will result in 65535 window size with default tcp_adv_win_scale.
> >
> > tcp_rmem[1] should be changed from 87380 to 131070.
>
>
> Do you have a packetdrill test demonstrating the issue, on recent
> upstream kernels ?
>
> I suspect you use an old kernel with missing backports.
>
> >
> > At same time, tcp_rmem[2] should be changed from "between 87380B and 6MB" to "between 131070B and 6MB".
> >
> > I've fired a bug in Kernel Bugzilla, too. The bug is assigned to Stephen Hemminger <stephen@...workplumber.org> instead of you. So I sent this mail.
> >
> > Thanks,
> >
> > Zhibin Liu | Software Engineer | zhibinliu@...gle.com | +86 21 6123 2345
Powered by blists - more mailing lists