diff options
| author | Jakub Kicinski <[email protected]> | 2024-07-11 19:57:57 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-07-11 19:58:13 +0000 |
| commit | 7c8267275de6989a9b682a07d75e89395457ee01 (patch) | |
| tree | db28c44520d9f786a4142871b42eb80f0d205ddd /net/ipv4/tcp_input.c | |
| parent | net: pse-pd: pd692x0: Fix spelling mistake "availables" -> "available" (diff) | |
| parent | Merge tag 'net-6.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-7c8267275de6989a9b682a07d75e89395457ee01.tar.gz kernel-7c8267275de6989a9b682a07d75e89395457ee01.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
Conflicts:
net/sched/act_ct.c
26488172b029 ("net/sched: Fix UAF when resolving a clash")
3abbd7ed8b76 ("act_ct: prepare for stolen verdict coming from conntrack and nat engine")
No adjacent changes.
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 47dacb575f74..e0f54b9be850 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2129,8 +2129,16 @@ void tcp_clear_retrans(struct tcp_sock *tp) static inline void tcp_init_undo(struct tcp_sock *tp) { tp->undo_marker = tp->snd_una; + /* Retransmission still in flight may cause DSACKs later. */ - tp->undo_retrans = tp->retrans_out ? : -1; + /* First, account for regular retransmits in flight: */ + tp->undo_retrans = tp->retrans_out; + /* Next, account for TLP retransmits in flight: */ + if (tp->tlp_high_seq && tp->tlp_retrans) + tp->undo_retrans++; + /* Finally, avoid 0, because undo_retrans==0 means "can undo now": */ + if (!tp->undo_retrans) + tp->undo_retrans = -1; } static bool tcp_is_rack(const struct sock *sk) @@ -2209,6 +2217,7 @@ void tcp_enter_loss(struct sock *sk) tcp_set_ca_state(sk, TCP_CA_Loss); tp->high_seq = tp->snd_nxt; + tp->tlp_high_seq = 0; tcp_ecn_queue_cwr(tp); /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous |
