Skip to content

Commit 0eb96bf

Browse files
yuchungchengdavem330
authored andcommitted
tcp: fix tcp_fastretrans_alert warning
This patch fixes the cause of an WARNING indicatng TCP has pending retransmission in Open state in tcp_fastretrans_alert(). The root cause is a bad interaction between path mtu probing, if enabled, and the RACK loss detection. Upong receiving a SACK above the sequence of the MTU probing packet, RACK could mark the probe packet lost in tcp_fastretrans_alert(), prior to calling tcp_simple_retransmit(). tcp_simple_retransmit() only enters Loss state if it newly marks the probe packet lost. If the probe packet is already identified as lost by RACK, the sender remains in Open state with some packets marked lost and retransmitted. Then the next SACK would trigger the warning. The likely scenario is that the probe packet was lost due to its size or network congestion. The actual impact of this warning is small by potentially entering fast recovery an ACK later. The simple fix is always entering recovery (Loss) state if some packet is marked lost during path MTU probing. Fixes: a0370b3 ("tcp: enable RACK loss detection to trigger recovery") Reported-by: Oleksandr Natalenko <[email protected]> Reported-by: Alexei Starovoitov <[email protected]> Reported-by: Roman Gushchin <[email protected]> Signed-off-by: Yuchung Cheng <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Acked-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7ec318f commit 0eb96bf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ipv4/tcp_input.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,6 @@ void tcp_simple_retransmit(struct sock *sk)
26152615
struct tcp_sock *tp = tcp_sk(sk);
26162616
struct sk_buff *skb;
26172617
unsigned int mss = tcp_current_mss(sk);
2618-
u32 prior_lost = tp->lost_out;
26192618

26202619
tcp_for_write_queue(skb, sk) {
26212620
if (skb == tcp_send_head(sk))
@@ -2632,7 +2631,7 @@ void tcp_simple_retransmit(struct sock *sk)
26322631

26332632
tcp_clear_retrans_hints_partial(tp);
26342633

2635-
if (prior_lost == tp->lost_out)
2634+
if (!tp->lost_out)
26362635
return;
26372636

26382637
if (tcp_is_reno(tp))

0 commit comments

Comments
 (0)