hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/ipv4/tcp_scalable.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* Tom Kelly's Scalable TCP
23 *
34 * See http://www.deneholme.net/tom/scalable/
....@@ -9,10 +10,9 @@
910 #include <net/tcp.h>
1011
1112 /* These factors derived from the recommended values in the aer:
12
- * .01 and and 7/8. We use 50 instead of 100 to account for
13
- * delayed ack.
13
+ * .01 and 7/8.
1414 */
15
-#define TCP_SCALABLE_AI_CNT 50U
15
+#define TCP_SCALABLE_AI_CNT 100U
1616 #define TCP_SCALABLE_MD_SCALE 3
1717
1818 static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 acked)
....@@ -22,11 +22,13 @@
2222 if (!tcp_is_cwnd_limited(sk))
2323 return;
2424
25
- if (tcp_in_slow_start(tp))
26
- tcp_slow_start(tp, acked);
27
- else
28
- tcp_cong_avoid_ai(tp, min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT),
29
- 1);
25
+ if (tcp_in_slow_start(tp)) {
26
+ acked = tcp_slow_start(tp, acked);
27
+ if (!acked)
28
+ return;
29
+ }
30
+ tcp_cong_avoid_ai(tp, min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT),
31
+ acked);
3032 }
3133
3234 static u32 tcp_scalable_ssthresh(struct sock *sk)