diff options
-rw-r--r-- | net/bridge/br_sysfs_br.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_cubic.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_htcp.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 96bcb2ff59ab..de9d1a9473f2 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
@@ -376,7 +376,7 @@ int br_sysfs_addbr(struct net_device *dev) | |||
376 | 376 | ||
377 | err = sysfs_create_bin_file(brobj, &bridge_forward); | 377 | err = sysfs_create_bin_file(brobj, &bridge_forward); |
378 | if (err) { | 378 | if (err) { |
379 | pr_info("%s: can't create attribue file %s/%s\n", | 379 | pr_info("%s: can't create attribute file %s/%s\n", |
380 | __FUNCTION__, dev->name, bridge_forward.attr.name); | 380 | __FUNCTION__, dev->name, bridge_forward.attr.name); |
381 | goto out2; | 381 | goto out2; |
382 | } | 382 | } |
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index a60ef38d75c6..6ad184802266 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c | |||
@@ -190,7 +190,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd) | |||
190 | */ | 190 | */ |
191 | 191 | ||
192 | /* change the unit from HZ to bictcp_HZ */ | 192 | /* change the unit from HZ to bictcp_HZ */ |
193 | t = ((tcp_time_stamp + ca->delay_min - ca->epoch_start) | 193 | t = ((tcp_time_stamp + (ca->delay_min>>3) - ca->epoch_start) |
194 | << BICTCP_HZ) / HZ; | 194 | << BICTCP_HZ) / HZ; |
195 | 195 | ||
196 | if (t < ca->bic_K) /* t - K */ | 196 | if (t < ca->bic_K) /* t - K */ |
@@ -259,7 +259,7 @@ static inline void measure_delay(struct sock *sk) | |||
259 | (s32)(tcp_time_stamp - ca->epoch_start) < HZ) | 259 | (s32)(tcp_time_stamp - ca->epoch_start) < HZ) |
260 | return; | 260 | return; |
261 | 261 | ||
262 | delay = tcp_time_stamp - tp->rx_opt.rcv_tsecr; | 262 | delay = (tcp_time_stamp - tp->rx_opt.rcv_tsecr)<<3; |
263 | if (delay == 0) | 263 | if (delay == 0) |
264 | delay = 1; | 264 | delay = 1; |
265 | 265 | ||
@@ -366,7 +366,7 @@ static int __init cubictcp_register(void) | |||
366 | 366 | ||
367 | beta_scale = 8*(BICTCP_BETA_SCALE+beta)/ 3 / (BICTCP_BETA_SCALE - beta); | 367 | beta_scale = 8*(BICTCP_BETA_SCALE+beta)/ 3 / (BICTCP_BETA_SCALE - beta); |
368 | 368 | ||
369 | cube_rtt_scale = (bic_scale << 3) / 10; /* 1024*c/rtt */ | 369 | cube_rtt_scale = (bic_scale * 10); /* 1024*c/rtt */ |
370 | 370 | ||
371 | /* calculate the "K" for (wmax-cwnd) = c/rtt * K^3 | 371 | /* calculate the "K" for (wmax-cwnd) = c/rtt * K^3 |
372 | * so K = cubic_root( (wmax-cwnd)*rtt/c ) | 372 | * so K = cubic_root( (wmax-cwnd)*rtt/c ) |
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 682e7d5b6f2f..283be3cb4667 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
@@ -23,7 +23,7 @@ module_param(use_bandwidth_switch, int, 0644); | |||
23 | MODULE_PARM_DESC(use_bandwidth_switch, "turn on/off bandwidth switcher"); | 23 | MODULE_PARM_DESC(use_bandwidth_switch, "turn on/off bandwidth switcher"); |
24 | 24 | ||
25 | struct htcp { | 25 | struct htcp { |
26 | u16 alpha; /* Fixed point arith, << 7 */ | 26 | u32 alpha; /* Fixed point arith, << 7 */ |
27 | u8 beta; /* Fixed point arith, << 7 */ | 27 | u8 beta; /* Fixed point arith, << 7 */ |
28 | u8 modeswitch; /* Delay modeswitch until we had at least one congestion event */ | 28 | u8 modeswitch; /* Delay modeswitch until we had at least one congestion event */ |
29 | u32 last_cong; /* Time since last congestion event end */ | 29 | u32 last_cong; /* Time since last congestion event end */ |