Re: [Linux Kernel Network Bug Report] tcp_rmem[1] is not resulting in correct TCP window size since 3.4

2 messages, 1 author, 2021-02-10 · open the first message on its own page

Re: [Linux Kernel Network Bug Report] tcp_rmem[1] is not resulting in correct TCP window size since 3.4

From: Eric Dumazet <edumazet@google.com>
Date: 2021-02-10 15:38:26

On Wed, Feb 10, 2021 at 4:14 PM Zhibin Liu [off-list ref] 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


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 [off-list ref] instead of you. So I sent this mail.

Thanks,

Zhibin Liu | Software Engineer | zhibinliu@google.com | +86 21 6123 2345

Re: [Linux Kernel Network Bug Report] tcp_rmem[1] is not resulting in correct TCP window size since 3.4

From: Eric Dumazet <edumazet@google.com>
Date: 2021-02-10 15:46:32

On Wed, Feb 10, 2021 at 4:37 PM Eric Dumazet [off-list ref] wrote:
On Wed, Feb 10, 2021 at 4:14 PM Zhibin Liu [off-list ref] wrote:
quoted
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


quoted
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.
quoted
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 [off-list ref] instead of you. So I sent this mail.

Thanks,

Zhibin Liu | Software Engineer | zhibinliu@google.com | +86 21 6123 2345
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help