Subject: Re: [PATCH v2 net-next 03/15] ipv6: addrconf_disable_ipv6() optimizations

From: Jakub Kicinski <[email-masked]>
Date: Tue, 27 Feb 2024 18:51:57 -0800

On Tue, 27 Feb 2024 15:01:48 +0000 Eric Dumazet wrote:
> +	if (p == &net->ipv6.devconf_dflt->disable_ipv6) {
> +		WRITE_ONCE(*p, newf);
> +		return 0;
> +	}
> +
>  	if (!rtnl_trylock())
>  		return restart_syscall();
>  
> -	net = (struct net *)table->extra2;
>  	old = *p;
>  	WRITE_ONCE(*p, newf);
>  
> -	if (p == &net->ipv6.devconf_dflt->disable_ipv6) {
> -		rtnl_unlock();
> -		return 0;
> -	}
> -
> -	if (p == &net->ipv6.devconf_all->disable_ipv6) {
> -		WRITE_ONCE(net->ipv6.devconf_dflt->disable_ipv6, newf);

Why is this line going away? We pulled up the handling of devconf_all
not devconf_dflt

> +	if (p == &net->ipv6.devconf_all->disable_ipv6)
>  		addrconf_disable_change(net, newf);