aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorKenneth Klette Jonassen <kennetkl@ifi.uio.no>2015-04-30 19:10:59 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-03 23:18:01 -0400
commit138998fdd12e7362756e158d00856a2aabd5f0c1 (patch)
tree6cdf2b4989efdd1ef26dada62d5b4b6c1c3e1d72 /net/ipv4/tcp_input.c
parent31231a8a873026410eab438c5757430546a517d1 (diff)
tcp: invoke pkts_acked hook on every ACK
Invoking pkts_acked is currently conditioned on FLAG_ACKED: receiving a cumulative ACK of new data, or ACK with SYN flag set. Remove this condition so that CC may get RTT measurements from all SACKs. Cc: Yuchung Cheng <ycheng@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Neal Cardwell <ncardwell@google.com> Signed-off-by: Kenneth Klette Jonassen <kennetkl@ifi.uio.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index f563d2a88809..09bdc4abfcbb 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3159,9 +3159,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3159 rtt_update = tcp_ack_update_rtt(sk, flag, seq_rtt_us, sack_rtt_us); 3159 rtt_update = tcp_ack_update_rtt(sk, flag, seq_rtt_us, sack_rtt_us);
3160 3160
3161 if (flag & FLAG_ACKED) { 3161 if (flag & FLAG_ACKED) {
3162 const struct tcp_congestion_ops *ca_ops
3163 = inet_csk(sk)->icsk_ca_ops;
3164
3165 tcp_rearm_rto(sk); 3162 tcp_rearm_rto(sk);
3166 if (unlikely(icsk->icsk_mtup.probe_size && 3163 if (unlikely(icsk->icsk_mtup.probe_size &&
3167 !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) { 3164 !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) {
@@ -3184,9 +3181,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3184 3181
3185 tp->fackets_out -= min(pkts_acked, tp->fackets_out); 3182 tp->fackets_out -= min(pkts_acked, tp->fackets_out);
3186 3183
3187 if (ca_ops->pkts_acked)
3188 ca_ops->pkts_acked(sk, pkts_acked, ca_rtt_us);
3189
3190 } else if (skb && rtt_update && sack_rtt_us >= 0 && 3184 } else if (skb && rtt_update && sack_rtt_us >= 0 &&
3191 sack_rtt_us > skb_mstamp_us_delta(&now, &skb->skb_mstamp)) { 3185 sack_rtt_us > skb_mstamp_us_delta(&now, &skb->skb_mstamp)) {
3192 /* Do not re-arm RTO if the sack RTT is measured from data sent 3186 /* Do not re-arm RTO if the sack RTT is measured from data sent
@@ -3196,6 +3190,9 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3196 tcp_rearm_rto(sk); 3190 tcp_rearm_rto(sk);
3197 } 3191 }
3198 3192
3193 if (icsk->icsk_ca_ops->pkts_acked)
3194 icsk->icsk_ca_ops->pkts_acked(sk, pkts_acked, ca_rtt_us);
3195
3199#if FASTRETRANS_DEBUG > 0 3196#if FASTRETRANS_DEBUG > 0
3200 WARN_ON((int)tp->sacked_out < 0); 3197 WARN_ON((int)tp->sacked_out < 0);
3201 WARN_ON((int)tp->lost_out < 0); 3198 WARN_ON((int)tp->lost_out < 0);