diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 075ab4d5af5e..71fb37c70581 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3358,34 +3358,34 @@ static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq) | |||
3358 | } | 3358 | } |
3359 | 3359 | ||
3360 | /* This routine deals with acks during a TLP episode. | 3360 | /* This routine deals with acks during a TLP episode. |
3361 | * We mark the end of a TLP episode on receiving TLP dupack or when | ||
3362 | * ack is after tlp_high_seq. | ||
3361 | * Ref: loss detection algorithm in draft-dukkipati-tcpm-tcp-loss-probe. | 3363 | * Ref: loss detection algorithm in draft-dukkipati-tcpm-tcp-loss-probe. |
3362 | */ | 3364 | */ |
3363 | static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) | 3365 | static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) |
3364 | { | 3366 | { |
3365 | struct tcp_sock *tp = tcp_sk(sk); | 3367 | struct tcp_sock *tp = tcp_sk(sk); |
3366 | bool is_tlp_dupack = (ack == tp->tlp_high_seq) && | ||
3367 | !(flag & (FLAG_SND_UNA_ADVANCED | | ||
3368 | FLAG_NOT_DUP | FLAG_DATA_SACKED)); | ||
3369 | 3368 | ||
3370 | /* Mark the end of TLP episode on receiving TLP dupack or when | 3369 | if (before(ack, tp->tlp_high_seq)) |
3371 | * ack is after tlp_high_seq. | ||
3372 | */ | ||
3373 | if (is_tlp_dupack) { | ||
3374 | tp->tlp_high_seq = 0; | ||
3375 | return; | 3370 | return; |
3376 | } | ||
3377 | 3371 | ||
3378 | if (after(ack, tp->tlp_high_seq)) { | 3372 | if (flag & FLAG_DSACKING_ACK) { |
3373 | /* This DSACK means original and TLP probe arrived; no loss */ | ||
3374 | tp->tlp_high_seq = 0; | ||
3375 | } else if (after(ack, tp->tlp_high_seq)) { | ||
3376 | /* ACK advances: there was a loss, so reduce cwnd. Reset | ||
3377 | * tlp_high_seq in tcp_init_cwnd_reduction() | ||
3378 | */ | ||
3379 | tcp_init_cwnd_reduction(sk); | ||
3380 | tcp_set_ca_state(sk, TCP_CA_CWR); | ||
3381 | tcp_end_cwnd_reduction(sk); | ||
3382 | tcp_try_keep_open(sk); | ||
3383 | NET_INC_STATS_BH(sock_net(sk), | ||
3384 | LINUX_MIB_TCPLOSSPROBERECOVERY); | ||
3385 | } else if (!(flag & (FLAG_SND_UNA_ADVANCED | | ||
3386 | FLAG_NOT_DUP | FLAG_DATA_SACKED))) { | ||
3387 | /* Pure dupack: original and TLP probe arrived; no loss */ | ||
3379 | tp->tlp_high_seq = 0; | 3388 | tp->tlp_high_seq = 0; |
3380 | /* Don't reduce cwnd if DSACK arrives for TLP retrans. */ | ||
3381 | if (!(flag & FLAG_DSACKING_ACK)) { | ||
3382 | tcp_init_cwnd_reduction(sk); | ||
3383 | tcp_set_ca_state(sk, TCP_CA_CWR); | ||
3384 | tcp_end_cwnd_reduction(sk); | ||
3385 | tcp_try_keep_open(sk); | ||
3386 | NET_INC_STATS_BH(sock_net(sk), | ||
3387 | LINUX_MIB_TCPLOSSPROBERECOVERY); | ||
3388 | } | ||
3389 | } | 3389 | } |
3390 | } | 3390 | } |
3391 | 3391 | ||