summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorEric Dumazet2018-05-17 23:47:29 +0200
committerDavid S. Miller2018-05-18 17:40:27 +0200
commit9c21d2fc41c0c8930600c9dd83eadac2e336fcfa (patch)
treed2a2dfb4516b8fb0d8fe13e7c3bfa0eda2064d0d /net/ipv4/tcp_input.c
parenttcp: add tcp_comp_sack_delay_ns sysctl (diff)
downloadkernel-qcow2-linux-9c21d2fc41c0c8930600c9dd83eadac2e336fcfa.tar.gz
kernel-qcow2-linux-9c21d2fc41c0c8930600c9dd83eadac2e336fcfa.tar.xz
kernel-qcow2-linux-9c21d2fc41c0c8930600c9dd83eadac2e336fcfa.zip
tcp: add tcp_comp_sack_nr sysctl
This per netns sysctl allows for TCP SACK compression fine-tuning. This limits number of SACK that can be compressed. Using 0 disables SACK compression. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6a1dae38c955..aebb29ab2fdf 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5106,7 +5106,8 @@ send_now:
return;
}
- if (!tcp_is_sack(tp) || tp->compressed_ack >= 44)
+ if (!tcp_is_sack(tp) ||
+ tp->compressed_ack >= sock_net(sk)->ipv4.sysctl_tcp_comp_sack_nr)
goto send_now;
tp->compressed_ack++;