]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/tcp_bbr.c
Merge tag 'tag-chrome-platform-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / net / ipv4 / tcp_bbr.c
index a6545ef0d27b66d310b02affe14f41ab536243eb..6c4d79baff2696b859d214bb63108b9f2f61f457 100644 (file)
@@ -779,8 +779,7 @@ static void bbr_update_bw(struct sock *sk, const struct rate_sample *rs)
         * bandwidth sample. Delivered is in packets and interval_us in uS and
         * ratio will be <<1 for most connections. So delivered is first scaled.
         */
-       bw = (u64)rs->delivered * BW_UNIT;
-       do_div(bw, rs->interval_us);
+       bw = div64_long((u64)rs->delivered * BW_UNIT, rs->interval_us);
 
        /* If this sample is application-limited, it is likely to have a very
         * low delivered count that represents application behavior rather than