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] [day] [month] [year] [list]
Date:   Thu, 9 Mar 2017 15:50:37 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] net: Add sysctl to toggle early demux for tcp
 and udp

On Thu,  9 Mar 2017 14:09:18 -0700
Subash Abhinov Kasiviswanathan <subashab@...eaurora.org> wrote:

> Certain system process significant unconnected UDP workload.
> It would be preferrable to disable UDP early demux for those systems
> and enable it for TCP only.
> 
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> Suggested-by: Eric Dumazet <edumazet@...gle.com>
> ---

This makes sense.

> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index d6feabb..187feae 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -329,7 +329,7 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
>  		int protocol = iph->protocol;
>  
>  		ipprot = rcu_dereference(inet_protos[protocol]);
> -		if (ipprot && ipprot->early_demux) {
> +		if (ipprot && ipprot->early_demux && *ipprot->early_demux_enabled) {
>  			ipprot->early_demux(skb);
>  			/* must reload iph, skb->head might have changed */
>  			iph = ip_hdr(skb);

Another possible option would be change the function pointer for early_demux instead of having
an additional conditional test (and cache line read).  The downside of doing it that way
is the code to turn the sysctl on/off gets more complicated than simple standard proc_int_vec.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ