diff options
author | Lawrence Brakmo <brakmo@fb.com> | 2016-05-11 20:02:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-11 21:43:19 +0300 |
commit | 756ee1729b2feb3a45767da29e338f70f2086ba3 (patch) | |
tree | 9329409e197d2912d3fba7e247a57239996c99e9 /net/ipv4/tcp_veno.c | |
parent | cf88585b1d5ce49515aabb381812976e2840a967 (diff) | |
download | linux-756ee1729b2feb3a45767da29e338f70f2086ba3.tar.xz |
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_veno.c')
-rw-r--r-- | net/ipv4/tcp_veno.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c index 0d094b995cd9..40171e163cff 100644 --- a/net/ipv4/tcp_veno.c +++ b/net/ipv4/tcp_veno.c @@ -69,16 +69,17 @@ static void tcp_veno_init(struct sock *sk) } /* Do rtt sampling needed for Veno. */ -static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us) +static void tcp_veno_pkts_acked(struct sock *sk, + const struct ack_sample *sample) { struct veno *veno = inet_csk_ca(sk); u32 vrtt; - if (rtt_us < 0) + if (sample->rtt_us < 0) return; /* Never allow zero rtt or baseRTT */ - vrtt = rtt_us + 1; + vrtt = sample->rtt_us + 1; /* Filter to find propagation delay: */ if (vrtt < veno->basertt) |