Skip to content

tcp: fix receive autotune again

Eric Dumazet netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3trace: tcp: add three metrics to trace_tcp_rcvbuf_grow()include/trace/events/tcp.h+9 -00 replies
2/3tcp: add newval parameter to tcp_rcvbuf_grow()include/net/tcp.h net/ipv4/tcp_input.c net/mptcp/protocol.c+17 -163 replies
3/3tcp: fix too slow tcp_rcvbuf_grow() actionnet/ipv4/tcp_input.c net/mptcp/protocol.c+14 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 net 0/3] tcp: fix receive autotune again

Neal Cardwell found that recent kernels were having RWIN limited issues, even when net.ipv4.tcp_rmem[2] was set to a very big value like 512MB

He suspected that tcp_stream default buffer size (64KB) was triggering heuristic added in ea33537d8292 ("tcp: add receive queue awareness in tcp_rcv_space_adjust()").

After more testing, it turns out the bug was added earlier with commit 65c5287892e9 ("tcp: fix sk_rcvbuf overshoot").

I forgot once again that DRS has one RTT latency.

MPTCP also got the same issue.

This series :

- adds rcv_ssthresh, window_clamp and rcv_wnd to trace_tcp_rcvbuf_grow().
- Refactors code in a patch with no functional changes.
- Fixes the issue in the final patch.

v2: Rebased to net tree

    Changed mptcp_rcvbuf_grow() to read/write msk->rcvq_space.space (Paolo)

v1: https://lore.kernel.org/netdev/[email protected]/T/#ma0fc25b4fec0c616bdcd7633aa348043d4d39ee8

Eric Dumazet (3):
trace: tcp: add three metrics to trace_tcp_rcvbuf_grow()
tcp: add newval parameter to tcp_rcvbuf_grow()
tcp: fix too slow tcp_rcvbuf_grow() action

 include/net/tcp.h          |  2 +-
 include/trace/events/tcp.h |  9 +++++++++
 net/ipv4/tcp_input.c       | 21 ++++++++++++++-------
 net/mptcp/protocol.c       | 23 +++++++++++++++--------
 4 files changed, 39 insertions(+), 16 deletions(-)
Signature · 1 line
2.51.1.821.gb6fe4d2222-goog