projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git
[powerpc.git]
/
net
/
ipv4
/
tcp_highspeed.c
diff --git
a/net/ipv4/tcp_highspeed.c
b/net/ipv4/tcp_highspeed.c
index
36c51f8
..
63cf7e5
100644
(file)
--- a/
net/ipv4/tcp_highspeed.c
+++ b/
net/ipv4/tcp_highspeed.c
@@
-98,9
+98,10
@@
struct hstcp {
u32 ai;
};
u32 ai;
};
-static void hstcp_init(struct
tcp_sock *tp
)
+static void hstcp_init(struct
sock *sk
)
{
{
- struct hstcp *ca = tcp_ca(tp);
+ struct tcp_sock *tp = tcp_sk(sk);
+ struct hstcp *ca = inet_csk_ca(sk);
ca->ai = 0;
ca->ai = 0;
@@
-109,18
+110,18
@@
static void hstcp_init(struct tcp_sock *tp)
tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128);
}
tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128);
}
-static void hstcp_cong_avoid(struct
tcp_sock *tp
, u32 adk, u32 rtt,
- u32 in_flight, int
goo
d)
+static void hstcp_cong_avoid(struct
sock *sk
, u32 adk, u32 rtt,
+ u32 in_flight, int
data_acke
d)
{
{
- struct hstcp *ca = tcp_ca(tp);
+ struct tcp_sock *tp = tcp_sk(sk);
+ struct hstcp *ca = inet_csk_ca(sk);
- if (
in_flight < tp->snd_cwnd
)
+ if (
!tcp_is_cwnd_limited(sk, in_flight)
)
return;
return;
- if (tp->snd_cwnd <= tp->snd_ssthresh) {
- if (tp->snd_cwnd < tp->snd_cwnd_clamp)
- tp->snd_cwnd++;
- } else {
+ if (tp->snd_cwnd <= tp->snd_ssthresh)
+ tcp_slow_start(tp);
+ else {
/* Update AIMD parameters */
if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) {
while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
/* Update AIMD parameters */
if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) {
while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
@@
-143,9
+144,10
@@
static void hstcp_cong_avoid(struct tcp_sock *tp, u32 adk, u32 rtt,
}
}
}
}
-static u32 hstcp_ssthresh(struct
tcp_sock *tp
)
+static u32 hstcp_ssthresh(struct
sock *sk
)
{
{
- struct hstcp *ca = tcp_ca(tp);
+ const struct tcp_sock *tp = tcp_sk(sk);
+ const struct hstcp *ca = inet_csk_ca(sk);
/* Do multiplicative decrease */
return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U);
/* Do multiplicative decrease */
return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U);
@@
-164,7
+166,7
@@
static struct tcp_congestion_ops tcp_highspeed = {
static int __init hstcp_register(void)
{
static int __init hstcp_register(void)
{
- BUG_ON(sizeof(struct hstcp) >
TCP
_CA_PRIV_SIZE);
+ BUG_ON(sizeof(struct hstcp) >
ICSK
_CA_PRIV_SIZE);
return tcp_register_congestion_control(&tcp_highspeed);
}
return tcp_register_congestion_control(&tcp_highspeed);
}