Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345775

Re: [PATCH] net/mlx5e: make VXLAN support conditional

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] net/mlx5e: make VXLAN support conditional
Date 2016-02-29 14:00 +0100
Message-ID <r7vAE-38v-33@gated-at.bofh.it> (permalink)
References <r6xXQ-JF-25@gated-at.bofh.it> <r79A6-2SF-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net/mlx5e: make VXLAN support conditional Arnd Bergmann <arnd@arndb.de> - 2016-02-26 22:20 +0100
  Re: [PATCH] net/mlx5e: make VXLAN support conditional Saeed Mahameed <saeedm@dev.mellanox.co.il> - 2016-02-28 14:30 +0100
    Re: [PATCH] net/mlx5e: make VXLAN support conditional Arnd Bergmann <arnd@arndb.de> - 2016-02-29 14:00 +0100

csiph-web