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:	Mon, 29 Feb 2016 13:51:51 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Saeed Mahameed <saeedm@....mellanox.co.il>,
	Saeed Mahameed <saeedm@...lanox.com>,
	linux-rdma@...r.kernel.org,
	Linux Netdev List <netdev@...r.kernel.org>,
	Matan Barak <matanb@...lanox.com>,
	linux-kernel@...r.kernel.org,
	Leon Romanovsky <leonro@...lanox.com>,
	"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net/mlx5e: make VXLAN support conditional

On Sunday 28 February 2016 15:26:53 Saeed Mahameed wrote:
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > index 0d45f35aee72..44fc4bc35ffd 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > @@ -2116,6 +2116,9 @@ static netdev_features_t mlx5e_vxlan_features_check(struct mlx5e_priv *priv,
> >         u16 proto;
> >         u16 port = 0;
> >
> > +       if (!IS_ENABLED(CONFIG_MLX5_CORE_EN_VXLAN))
> > +               goto out;
> > +
> 
> I would rather wrap the whole mlx5e_features_check with the suggested
> config flag and disable it in case CONFIG_MLX5_CORE_EN_VXLAN is OFF,
> since this function is only needed for when vxlan is supported.

Sounds good.

I think moving the IS_ENABLED() check into the caller(s) will still
result in the same object code, but it makes sense to structure
the code for best readability.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ