diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4f6cfbc57775..a906e0200ff2 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2687,7 +2687,6 @@ static void tcp_enter_recovery(struct sock *sk, bool ece_ack) | |||
2687 | */ | 2687 | */ |
2688 | static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack) | 2688 | static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack) |
2689 | { | 2689 | { |
2690 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
2691 | struct tcp_sock *tp = tcp_sk(sk); | 2690 | struct tcp_sock *tp = tcp_sk(sk); |
2692 | bool recovered = !before(tp->snd_una, tp->high_seq); | 2691 | bool recovered = !before(tp->snd_una, tp->high_seq); |
2693 | 2692 | ||
@@ -2713,12 +2712,9 @@ static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack) | |||
2713 | 2712 | ||
2714 | if (recovered) { | 2713 | if (recovered) { |
2715 | /* F-RTO RFC5682 sec 3.1 step 2.a and 1st part of step 3.a */ | 2714 | /* F-RTO RFC5682 sec 3.1 step 2.a and 1st part of step 3.a */ |
2716 | icsk->icsk_retransmits = 0; | ||
2717 | tcp_try_undo_recovery(sk); | 2715 | tcp_try_undo_recovery(sk); |
2718 | return; | 2716 | return; |
2719 | } | 2717 | } |
2720 | if (flag & FLAG_DATA_ACKED) | ||
2721 | icsk->icsk_retransmits = 0; | ||
2722 | if (tcp_is_reno(tp)) { | 2718 | if (tcp_is_reno(tp)) { |
2723 | /* A Reno DUPACK means new data in F-RTO step 2.b above are | 2719 | /* A Reno DUPACK means new data in F-RTO step 2.b above are |
2724 | * delivered. Lower inflight to clock out (re)tranmissions. | 2720 | * delivered. Lower inflight to clock out (re)tranmissions. |
@@ -3405,8 +3401,10 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3405 | icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) | 3401 | icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) |
3406 | tcp_rearm_rto(sk); | 3402 | tcp_rearm_rto(sk); |
3407 | 3403 | ||
3408 | if (after(ack, prior_snd_una)) | 3404 | if (after(ack, prior_snd_una)) { |
3409 | flag |= FLAG_SND_UNA_ADVANCED; | 3405 | flag |= FLAG_SND_UNA_ADVANCED; |
3406 | icsk->icsk_retransmits = 0; | ||
3407 | } | ||
3410 | 3408 | ||
3411 | prior_fackets = tp->fackets_out; | 3409 | prior_fackets = tp->fackets_out; |
3412 | 3410 | ||