aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_scalable.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-08-29 17:36:46 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-29 17:36:46 -0700
commit826509f8110049663799bc20f2b5b6170e2f78ca (patch)
tree9d8823cf283592625b882125b4b13988f2934cc6 /net/ipv4/tcp_scalable.c
parentd992895ba2b27cf5adf1ba0ad6d27662adc54c5e (diff)
parentc530cfb1ce1e8f230744c3f3bd86771f50725053 (diff)
Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git
Diffstat (limited to 'net/ipv4/tcp_scalable.c')
-rw-r--r--net/ipv4/tcp_scalable.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c
index 70e108e15c7..327770bf552 100644
--- a/net/ipv4/tcp_scalable.c
+++ b/net/ipv4/tcp_scalable.c
@@ -16,9 +16,10 @@
#define TCP_SCALABLE_AI_CNT 50U
#define TCP_SCALABLE_MD_SCALE 3
-static void tcp_scalable_cong_avoid(struct tcp_sock *tp, u32 ack, u32 rtt,
+static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
u32 in_flight, int flag)
{
+ struct tcp_sock *tp = tcp_sk(sk);
if (in_flight < tp->snd_cwnd)
return;
@@ -35,8 +36,9 @@ static void tcp_scalable_cong_avoid(struct tcp_sock *tp, u32 ack, u32 rtt,
tp->snd_cwnd_stamp = tcp_time_stamp;
}
-static u32 tcp_scalable_ssthresh(struct tcp_sock *tp)
+static u32 tcp_scalable_ssthresh(struct sock *sk)
{
+ const struct tcp_sock *tp = tcp_sk(sk);
return max(tp->snd_cwnd - (tp->snd_cwnd>>TCP_SCALABLE_MD_SCALE), 2U);
}