aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorLawrence Brakmo <brakmo@fb.com>2016-05-11 13:02:13 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-11 14:43:19 -0400
commit756ee1729b2feb3a45767da29e338f70f2086ba3 (patch)
tree9329409e197d2912d3fba7e247a57239996c99e9 /net/ipv4/tcp_input.c
parentcf88585b1d5ce49515aabb381812976e2840a967 (diff)
tcp: replace cnt & rtt with struct in pkts_acked()
Replace 2 arguments (cnt and rtt) in the congestion control modules' pkts_acked() function with a struct. This will allow adding more information without having to modify existing congestion control modules (tcp_nv in particular needs bytes in flight when packet was sent). As proposed by Neal Cardwell in his comments to the tcp_nv patch. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index a914e0607895..d6c8f4cd0800 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3248,8 +3248,12 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3248 tcp_rearm_rto(sk); 3248 tcp_rearm_rto(sk);
3249 } 3249 }
3250 3250
3251 if (icsk->icsk_ca_ops->pkts_acked) 3251 if (icsk->icsk_ca_ops->pkts_acked) {
3252 icsk->icsk_ca_ops->pkts_acked(sk, pkts_acked, ca_rtt_us); 3252 struct ack_sample sample = { .pkts_acked = pkts_acked,
3253 .rtt_us = ca_rtt_us };
3254
3255 icsk->icsk_ca_ops->pkts_acked(sk, &sample);
3256 }
3253 3257
3254#if FASTRETRANS_DEBUG > 0 3258#if FASTRETRANS_DEBUG > 0
3255 WARN_ON((int)tp->sacked_out < 0); 3259 WARN_ON((int)tp->sacked_out < 0);