aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_cubic.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_cubic.c')
-rw-r--r--net/ipv4/tcp_cubic.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index 9a582fb4ef9f..6f08adbda54e 100644
--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -51,8 +51,6 @@ MODULE_PARM_DESC(bic_scale, "scale (scaled by 1024) value for bic function (bic_
51module_param(tcp_friendliness, int, 0644); 51module_param(tcp_friendliness, int, 0644);
52MODULE_PARM_DESC(tcp_friendliness, "turn on/off tcp friendliness"); 52MODULE_PARM_DESC(tcp_friendliness, "turn on/off tcp friendliness");
53 53
54#include <asm/div64.h>
55
56/* BIC TCP Parameters */ 54/* BIC TCP Parameters */
57struct bictcp { 55struct bictcp {
58 u32 cnt; /* increase cwnd by 1 after ACKs */ 56 u32 cnt; /* increase cwnd by 1 after ACKs */
@@ -93,27 +91,6 @@ static void bictcp_init(struct sock *sk)
93 tcp_sk(sk)->snd_ssthresh = initial_ssthresh; 91 tcp_sk(sk)->snd_ssthresh = initial_ssthresh;
94} 92}
95 93
96/* 64bit divisor, dividend and result. dynamic precision */
97static inline u_int64_t div64_64(u_int64_t dividend, u_int64_t divisor)
98{
99 u_int32_t d = divisor;
100
101 if (divisor > 0xffffffffULL) {
102 unsigned int shift = fls(divisor >> 32);
103
104 d = divisor >> shift;
105 dividend >>= shift;
106 }
107
108 /* avoid 64 bit division if possible */
109 if (dividend >> 32)
110 do_div(dividend, d);
111 else
112 dividend = (uint32_t) dividend / d;
113
114 return dividend;
115}
116
117/* 94/*
118 * calculate the cubic root of x using Newton-Raphson 95 * calculate the cubic root of x using Newton-Raphson
119 */ 96 */