aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_yeah.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-04-23 22:26:16 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:29:45 -0700
commit164891aadf1721fca4dce473bb0e0998181537c6 (patch)
tree991393ec7306da475cb306fcc7cb084f737ebadc /net/ipv4/tcp_yeah.h
parent65d1b4a7e73fe0e1f5275ad7d2d3547981480886 (diff)
[TCP]: Congestion control API update.
Do some simple changes to make congestion control API faster/cleaner. * use ktime_t rather than timeval * merge rtt sampling into existing ack callback this means one indirect call versus two per ack. * use flags bits to store options/settings Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_yeah.h')
-rw-r--r--net/ipv4/tcp_yeah.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp_yeah.h b/net/ipv4/tcp_yeah.h
index a62d82038fd..33ad5385c18 100644
--- a/net/ipv4/tcp_yeah.h
+++ b/net/ipv4/tcp_yeah.h
@@ -81,10 +81,13 @@ static void tcp_vegas_state(struct sock *sk, u8 ca_state)
* o min-filter RTT samples from a much longer window (forever for now)
* to find the propagation delay (baseRTT)
*/
-static void tcp_vegas_rtt_calc(struct sock *sk, u32 usrtt)
+static void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
{
struct vegas *vegas = inet_csk_ca(sk);
- u32 vrtt = usrtt + 1; /* Never allow zero rtt or baseRTT */
+ u32 vrtt;
+
+ /* Never allow zero rtt or baseRTT */
+ vrtt = (ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC) + 1;
/* Filter to find propagation delay: */
if (vrtt < vegas->baseRTT)