Skip to content

net: tcp: support probing OOM

[email protected] lkml netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 5 repliesApplied 4/4
  2. v33 patches 2 repliesSuperseded
  3. v23 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches13 repliesSuperseded

Changes in v4 from the cover letter

- make the timeout "2 * TCP_RTO_MAX" in the 3rd patch
- tp->retrans_stamp is not based on jiffies and can't be compared with icsk->icsk_timeout in the 3rd patch. Fix it.
- introduce the 4th patch

Patches in v4 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: tcp: send zero-window ACK when no memoryinclude/net/inet_connection_sock.h net/ipv4/tcp_input.c net/ipv4/tcp_output.c+25 -101 replyApplied
2/4net: tcp: allow zero-window ACK update the windownet/ipv4/tcp_input.c+1 -11 replyApplied
3/4net: tcp: fix unexcepted socket die when snd_wnd is 0net/ipv4/tcp_timer.c+17 -11 replyApplied
4/4net: tcp: refactor the dbg message in tcp_retransmit_timer()net/ipv4/tcp_timer.c+13 -101 replyApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric Dumazet
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 0/4] net: tcp: support probing OOM

From: Menglong Dong <[email protected]>

In this series, we make some small changes to make the tcp retransmission become zero-window probes if the receiver drops the skb because of memory pressure.

In the 1st patch, we reply a zero-window ACK if the skb is dropped because out of memory, instead of dropping the skb silently.

In the 2nd patch, we allow a zero-window ACK to update the window.

In the 3rd patch, fix unexcepted socket die when snd_wnd is 0 in tcp_retransmit_timer().

In the 4th patch, we refactor the debug message in tcp_retransmit_timer() to make it more correct.

After these changes, the tcp can probe the OOM of the receiver forever.

Changes since v3:
- make the timeout "2 * TCP_RTO_MAX" in the 3rd patch
- tp->retrans_stamp is not based on jiffies and can't be compared with icsk->icsk_timeout in the 3rd patch. Fix it.
- introduce the 4th patch

Changes since v2:
- refactor the code to avoid code duplication in the 1st patch
- use after() instead of max() in tcp_rtx_probe0_timed_out()

Changes since v1:
- send 0 rwin ACK for the receive queue empty case when necessary in the 1st patch
- send the ACK immediately by using the ICSK_ACK_NOW flag in the 1st patch
- consider the case of the connection restart from idle, as Neal comment, in the 3rd patch

Menglong Dong (4):
net: tcp: send zero-window ACK when no memory
net: tcp: allow zero-window ACK update the window
net: tcp: fix unexcepted socket die when snd_wnd is 0
net: tcp: refactor the dbg message in tcp_retransmit_timer()

 include/net/inet_connection_sock.h |  3 ++-
 net/ipv4/tcp_input.c               | 20 ++++++++++-----
 net/ipv4/tcp_output.c              | 14 +++++++---
 net/ipv4/tcp_timer.c               | 41 ++++++++++++++++++++++--------
 4 files changed, 56 insertions(+), 22 deletions(-)
Signature · 1 line
2.40.1