git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netfilter: bridge: ebt_among: add missing match size checks
[pandora-kernel.git]
/
net
/
ipv4
/
tcp_cubic.c
diff --git
a/net/ipv4/tcp_cubic.c
b/net/ipv4/tcp_cubic.c
index
f376b05
..
ed3d6d4
100644
(file)
--- a/
net/ipv4/tcp_cubic.c
+++ b/
net/ipv4/tcp_cubic.c
@@
-204,8
+204,8
@@
static u32 cubic_root(u64 a)
*/
static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
{
*/
static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
{
- u
64 offs
;
- u
32 delta, t, bic_target, max_cn
t;
+ u
32 delta, bic_target, max_cnt
;
+ u
64 offs,
t;
ca->ack_cnt++; /* count the number of ACKs */
ca->ack_cnt++; /* count the number of ACKs */
@@
-248,9
+248,11
@@
static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
* if the cwnd < 1 million packets !!!
*/
* if the cwnd < 1 million packets !!!
*/
+ t = (s32)(tcp_time_stamp - ca->epoch_start);
+ t += msecs_to_jiffies(ca->delay_min >> 3);
/* change the unit from HZ to bictcp_HZ */
/* change the unit from HZ to bictcp_HZ */
- t
= ((tcp_time_stamp + msecs_to_jiffies(ca->delay_min>>3)
-
- ca->epoch_start) << BICTCP_HZ) / HZ
;
+ t
<<= BICTCP_HZ;
+
do_div(t, HZ)
;
if (t < ca->bic_K) /* t - K */
offs = ca->bic_K - t;
if (t < ca->bic_K) /* t - K */
offs = ca->bic_K - t;
@@
-404,7
+406,7
@@
static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
ratio -= ca->delayed_ack >> ACK_RATIO_SHIFT;
ratio += cnt;
ratio -= ca->delayed_ack >> ACK_RATIO_SHIFT;
ratio += cnt;
- ca->delayed_ack =
min(ratio
, ACK_RATIO_LIMIT);
+ ca->delayed_ack =
clamp(ratio, 1U
, ACK_RATIO_LIMIT);
}
/* Some calls are for duplicates without timetamps */
}
/* Some calls are for duplicates without timetamps */
@@
-412,7
+414,7
@@
static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
return;
/* Discard delay samples right after fast recovery */
return;
/* Discard delay samples right after fast recovery */
- if ((s32)(tcp_time_stamp - ca->epoch_start) < HZ)
+ if (
ca->epoch_start &&
(s32)(tcp_time_stamp - ca->epoch_start) < HZ)
return;
delay = (rtt_us << 3) / USEC_PER_MSEC;
return;
delay = (rtt_us << 3) / USEC_PER_MSEC;