Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[deliverable/linux.git] / net / ipv4 / tcp_cubic.c
index 7172c129ff19356826d0084dee11ffa70c269661..34340c9c95fab4f3c9aa108fbed4dd7f69028cd9 100644 (file)
@@ -270,6 +270,13 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
                ca->cnt = 100 * cwnd;              /* very small increment*/
        }
 
+       /*
+        * The initial growth of cubic function may be too conservative
+        * when the available bandwidth is still unknown.
+        */
+       if (ca->loss_cwnd == 0 && ca->cnt > 20)
+               ca->cnt = 20;   /* increase cwnd 5% per RTT */
+
        /* TCP Friendly */
        if (tcp_friendliness) {
                u32 scale = beta_scale;
@@ -417,7 +424,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
                hystart_update(sk, delay);
 }
 
-static struct tcp_congestion_ops cubictcp = {
+static struct tcp_congestion_ops cubictcp __read_mostly = {
        .init           = bictcp_init,
        .ssthresh       = bictcp_recalc_ssthresh,
        .cong_avoid     = bictcp_cong_avoid,
This page took 0.072393 seconds and 5 git commands to generate.