net/mlx5: Reduce kconfig complexity while building crypto support
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 6 Apr 2022 08:25:50 +0000 (11:25 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Sat, 9 Apr 2022 05:25:07 +0000 (08:25 +0300)
commitf03c7b183ef93032582131cd25940245fbee433a
treefb40d8aba0d9acb693b1d54a75ebdffbc976adf1
parent16fe5a1c5c074a836626e3bd9560d3c4a39a3fcf
net/mlx5: Reduce kconfig complexity while building crypto support

Both IPsec and kTLS need two functions declared in the lib/crypto.c
file. These functions are advertised through general mlx5.h file and
don't have any protection from attempts to call them without proper
config option.

Instead of creating stubs just for two functions, simply build that *.c
file as part of regular mlx5_eth build and rely on compiler to throw
them away if no callers exist in produced code.

Link: https://lore.kernel.org/r/37f02171da06886c1b403d44dd18b2a56b19219d.1649232994.git.leonro@nvidia.com
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Kconfig
drivers/net/ethernet/mellanox/mlx5/core/Makefile