]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_veno.c
[MIPS] EMMA2RH: remove dead KGDB code
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_veno.c
index 11b42a7135c19ef7241584752dd39be97c1bf444..9edb340f2f95c6e003f5ff09f135425423881134 100644 (file)
@@ -9,7 +9,6 @@
  *     See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf
  */
 
-#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/skbuff.h>
@@ -70,10 +69,13 @@ static void tcp_veno_init(struct sock *sk)
 }
 
 /* Do rtt sampling needed for Veno. */
-static void tcp_veno_rtt_calc(struct sock *sk, u32 usrtt)
+static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
 {
        struct veno *veno = 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_us(net_timedelta(last)) + 1;
 
        /* Filter to find propagation delay: */
        if (vrtt < veno->basertt)
@@ -200,10 +202,11 @@ static u32 tcp_veno_ssthresh(struct sock *sk)
 }
 
 static struct tcp_congestion_ops tcp_veno = {
+       .flags          = TCP_CONG_RTT_STAMP,
        .init           = tcp_veno_init,
        .ssthresh       = tcp_veno_ssthresh,
        .cong_avoid     = tcp_veno_cong_avoid,
-       .rtt_sample     = tcp_veno_rtt_calc,
+       .pkts_acked     = tcp_veno_pkts_acked,
        .set_state      = tcp_veno_state,
        .cwnd_event     = tcp_veno_cwnd_event,
 
@@ -213,7 +216,7 @@ static struct tcp_congestion_ops tcp_veno = {
 
 static int __init tcp_veno_register(void)
 {
-       BUG_ON(sizeof(struct veno) > ICSK_CA_PRIV_SIZE);
+       BUILD_BUG_ON(sizeof(struct veno) > ICSK_CA_PRIV_SIZE);
        tcp_register_congestion_control(&tcp_veno);
        return 0;
 }