lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  5 Jan 2018 12:32:55 +0100
From:   Natale Patriciello <natale.patriciello@...il.com>
To:     netdev@...r.kernel.org
Cc:     Natale Patriciello <natale.patriciello@...il.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Carlo Augusto Grazia <carloaugusto.grazia@...more.it>
Subject: [RFC PATCH 2/3] tcp: Negative values of sysctl_tcp_limit_output_bytes disable TSQ

This commit adds the possibility for a user to disable the TSQ by using an
existing sysctl knob. This feature existed until it was removed by the
commit c9eeec26e32e ("tcp: TSQ can use a dynamic limit").

Fixes: c9eeec26e32e ("tcp: TSQ can use a dynamic limit")

Signed-off-by: Natale Patriciello <natale.patriciello@...il.com>
Cc: Eric Dumazet <edumazet@...gle.com>
Cc: Carlo Augusto Grazia <carloaugusto.grazia@...more.it>
Tested-by: Carlo Augusto Grazia <carloaugusto.grazia@...more.it>
---
 Documentation/networking/ip-sysctl.txt | 1 +
 net/ipv4/tcp_output.c                  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 46c7e1085efc..3b530fe8a494 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -721,6 +721,7 @@ tcp_limit_output_bytes - INTEGER
 	typical pfifo_fast qdiscs.
 	tcp_limit_output_bytes limits the number of bytes on qdisc
 	or device to reduce artificial RTT/cwnd and reduce bufferbloat.
+	Set to -1 to disable.
 	Default: 262144
 
 tcp_challenge_ack_limit - INTEGER
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index ef1ae727320f..997a6fbdbe1a 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2198,6 +2198,9 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb,
 {
 	unsigned int limit;
 
+	if (sock_net(sk)->ipv4.sysctl_tcp_limit_output_bytes < 0)
+		return false;
+
 	limit = max(2 * skb->truesize, sk->sk_pacing_rate >> 10);
 	limit = min_t(u32, limit,
 		      sock_net(sk)->ipv4.sysctl_tcp_limit_output_bytes);
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ