Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423194
| From | Saeed Mahameed <saeedm@dev.mellanox.co.il> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available |
| Date | 2016-06-15 18:10 +0200 |
| Message-ID | <rKlya-4Mc-35@gated-at.bofh.it> (permalink) |
| References | <rKkVs-4hD-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 15, 2016 at 6:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> We get a build error with the mlx5 driver when the ethernet
> support (CONFIG_MLX5_CORE_EN) is disabled:
>
> drivers/net/ethernet/mellanox/mlx5/core/main.c:1320:22: error: 'mlx5_devlink_eswitch_mode_set' undeclared here (not in a function)
> drivers/net/ethernet/mellanox/mlx5/core/main.c:1321:22: error: 'mlx5_devlink_eswitch_mode_get' undeclared here (not in a function)
> drivers/net/built-in.o:(.rodata+0x25a68): undefined reference to `mlx5_devlink_eswitch_mode_get'
> drivers/net/built-in.o:(.rodata+0x25a6c): undefined reference to `mlx5_devlink_eswitch_mode_set'
>
> There are actually two problems here, but they are closely related,
> so I'm addressing them both:
>
> - The header is included under an #ifdef, which is usually a bad idea
> as it hides the function declarations, so we fail to compile even
> if we don't actually use the functions in the end.
> - The references to the functions are kept in the object file because
> we don't check whether they are built-in or not.
>
> As we don't want to add any useless #ifdef here, this uses an
> IS_ENABLED() check to drop the mlx5_devlink_ops structure when we don't
> need it, and to skip the register/unregister step.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: f7856daf57b9 ("net/mlx5: Add devlink interface")
Hi Arnd,
We already took care of those issues, they only apply to Leon's tree
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/,
this tree is meant to maintain MLX5 Shared code between netdev and
linux-rdma trees prior to submission to both trees.
This patch is a non-shared code and it only exists in
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/net-next-mlx5.
It is yet to be submitted to Dave's net/net-next tree. later on, this
patch and all the others will go through the normal submission
process.
For the future I don't see any reason to CC the whole netdev, rdma and
kernel folks.
Unless you, Dave and Doug think otherwise.
Thanks
Saeed.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] mlx5: only register devlink when ethernet is available Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:30 +0200
Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available Saeed Mahameed <saeedm@dev.mellanox.co.il> - 2016-06-15 18:10 +0200
Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available Arnd Bergmann <arnd@arndb.de> - 2016-06-15 22:50 +0200
Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available Saeed Mahameed <saeedm@dev.mellanox.co.il> - 2016-06-17 17:00 +0200
Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available Arnd Bergmann <arnd@arndb.de> - 2016-06-17 17:10 +0200
Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available Leon Romanovsky <leon@kernel.org> - 2016-06-17 18:20 +0200
csiph-web