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]
Message-ID: <zkadwo3imhhatvmkhuvxnoql4qmrgpkz77mugifckredfv5hxo@pbjp3ffoxvba>
Date: Fri, 15 Dec 2023 16:40:36 +0200
From: Ioana Ciornei <ioana.ciornei@....com>
To: yang.guang5@....com.cn
Cc: davem@...emloft.net, jiang.xuexin@....com.cn, chen.haonan2@....com.cn, 
	cgel.zte@...il.com, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	sd@...asysnail.net, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH linux-next] mlxsw: spectrum: use netif_is_macsec()
 instead of open code

On Fri, Dec 15, 2023 at 09:45:31PM +0800, yang.guang5@....com.cn wrote:
> From: Yang Guang <yang.guang5@....com.cn>
> 
> Open code which is dev->priv_flags & IFF_MACSEC has already defined as
> netif_is_macsec(). So use netif_is_macsec() instead of open code.
> No functional changed.
> 
> Signed-off-by: Chen Haonan <chen.haonan2@....com.cn>
> ---
>  include/linux/netdevice.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 1b935ee341b4..1f2b23d854c9 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -5103,7 +5103,7 @@ void netif_inherit_tso_max(struct net_device *to,
> 
>  static inline bool netif_is_macsec(const struct net_device *dev)
>  {
> -	return dev->priv_flags & IFF_MACSEC;
> +	return netif_is_macsec(dev);
>  }

So you are replacing the actual implementation of the netif_is_macsec()
function with a call to the same netif_is_macsec().

How does this work?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ