diff options
Diffstat (limited to 'net/ipv4/tcp_scalable.c')
-rw-r--r-- | net/ipv4/tcp_scalable.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c index f2123075ce6e..addc122f8818 100644 --- a/net/ipv4/tcp_scalable.c +++ b/net/ipv4/tcp_scalable.c | |||
@@ -15,10 +15,6 @@ | |||
15 | #define TCP_SCALABLE_AI_CNT 50U | 15 | #define TCP_SCALABLE_AI_CNT 50U |
16 | #define TCP_SCALABLE_MD_SCALE 3 | 16 | #define TCP_SCALABLE_MD_SCALE 3 |
17 | 17 | ||
18 | struct scalable { | ||
19 | u32 loss_cwnd; | ||
20 | }; | ||
21 | |||
22 | static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 acked) | 18 | static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 acked) |
23 | { | 19 | { |
24 | struct tcp_sock *tp = tcp_sk(sk); | 20 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -36,23 +32,13 @@ static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 acked) | |||
36 | static u32 tcp_scalable_ssthresh(struct sock *sk) | 32 | static u32 tcp_scalable_ssthresh(struct sock *sk) |
37 | { | 33 | { |
38 | const struct tcp_sock *tp = tcp_sk(sk); | 34 | const struct tcp_sock *tp = tcp_sk(sk); |
39 | struct scalable *ca = inet_csk_ca(sk); | ||
40 | |||
41 | ca->loss_cwnd = tp->snd_cwnd; | ||
42 | 35 | ||
43 | return max(tp->snd_cwnd - (tp->snd_cwnd>>TCP_SCALABLE_MD_SCALE), 2U); | 36 | return max(tp->snd_cwnd - (tp->snd_cwnd>>TCP_SCALABLE_MD_SCALE), 2U); |
44 | } | 37 | } |
45 | 38 | ||
46 | static u32 tcp_scalable_cwnd_undo(struct sock *sk) | ||
47 | { | ||
48 | const struct scalable *ca = inet_csk_ca(sk); | ||
49 | |||
50 | return max(tcp_sk(sk)->snd_cwnd, ca->loss_cwnd); | ||
51 | } | ||
52 | |||
53 | static struct tcp_congestion_ops tcp_scalable __read_mostly = { | 39 | static struct tcp_congestion_ops tcp_scalable __read_mostly = { |
54 | .ssthresh = tcp_scalable_ssthresh, | 40 | .ssthresh = tcp_scalable_ssthresh, |
55 | .undo_cwnd = tcp_scalable_cwnd_undo, | 41 | .undo_cwnd = tcp_reno_undo_cwnd, |
56 | .cong_avoid = tcp_scalable_cong_avoid, | 42 | .cong_avoid = tcp_scalable_cong_avoid, |
57 | 43 | ||
58 | .owner = THIS_MODULE, | 44 | .owner = THIS_MODULE, |