On Fri, Jan 5, 2018 at 3:32 AM, Natale Patriciello
<natale.patricie...@gmail.com> wrote:
> 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.patricie...@gmail.com>
> Cc: Eric Dumazet <eduma...@google.com>
> Cc: Carlo Augusto Grazia <carloaugusto.gra...@unimore.it>
> Tested-by: Carlo Augusto Grazia <carloaugusto.gra...@unimore.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;
> +
>

NACK

I do not want to add yet another condition in fast path.

Just put an arbitrary large value in the existing sysctl, no need for
extra code.

Reply via email to