aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2017-11-07 18:33:43 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-10 04:09:19 -0500
commit0eb96bf754d7fa6635aa0b0f6650c74b8a6b1cc9 (patch)
treea3b7e8feaeef3a348435ad4827e66de62d776cd3 /net/ipv4/tcp_input.c
parent7ec318feeed10a64c0359ec4d10889cb4defa39a (diff)
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: a0370b3f3f2c ("tcp: enable RACK loss detection to trigger recovery") Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Reported-by: Roman Gushchin <guro@fb.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b2fc7163bd40..b6bb3cdfad09 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2615,7 +2615,6 @@ void tcp_simple_retransmit(struct sock *sk)
2615 struct tcp_sock *tp = tcp_sk(sk); 2615 struct tcp_sock *tp = tcp_sk(sk);
2616 struct sk_buff *skb; 2616 struct sk_buff *skb;
2617 unsigned int mss = tcp_current_mss(sk); 2617 unsigned int mss = tcp_current_mss(sk);
2618 u32 prior_lost = tp->lost_out;
2619 2618
2620 tcp_for_write_queue(skb, sk) { 2619 tcp_for_write_queue(skb, sk) {
2621 if (skb == tcp_send_head(sk)) 2620 if (skb == tcp_send_head(sk))
@@ -2632,7 +2631,7 @@ void tcp_simple_retransmit(struct sock *sk)
2632 2631
2633 tcp_clear_retrans_hints_partial(tp); 2632 tcp_clear_retrans_hints_partial(tp);
2634 2633
2635 if (prior_lost == tp->lost_out) 2634 if (!tp->lost_out)
2636 return; 2635 return;
2637 2636
2638 if (tcp_is_reno(tp)) 2637 if (tcp_is_reno(tp))