]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: mlx5: remove Kconfig co-dependency with VXLAN
authorJakub Kicinski <kuba@kernel.org>
Wed, 27 Aug 2025 23:43:19 +0000 (16:43 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Aug 2025 23:48:02 +0000 (16:48 -0700)
mlx5 has a Kconfig co-dependency on VXLAN, even tho it doesn't
call any VXLAN function (unlike mlxsw). Perhaps this dates back
to very old days when tunnel ports were fetched directly from
VXLAN.

Remove the dependency to allow MLX5=y + VXLAN=m kernel configs.
But still avoid compiling in the lib/vxlan code if VXLAN=n.

Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://patch.msgid.link/20250827234319.3504852-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/Kconfig
drivers/net/ethernet/mellanox/mlx5/core/Makefile

index 6ec7d6e0181de223ea2ba739ae683055264d3dbe..8ef2ac2060ba7179bf79cca445783308824bbe13 100644 (file)
@@ -8,7 +8,6 @@ config MLX5_CORE
        depends on PCI
        select AUXILIARY_BUS
        select NET_DEVLINK
-       depends on VXLAN || !VXLAN
        depends on MLXFW || !MLXFW
        depends on PTP_1588_CLOCK_OPTIONAL
        depends on PCI_HYPERV_INTERFACE || !PCI_HYPERV_INTERFACE
index a253c73db9e58b5bc4e9df37553c04d1e1deabf3..206223ce63a894de98ff83577c54ea707348a326 100644 (file)
@@ -85,7 +85,9 @@ mlx5_core-$(CONFIG_MLX5_BRIDGE)    += esw/bridge.o esw/bridge_mcast.o esw/bridge
 
 mlx5_core-$(CONFIG_HWMON)          += hwmon.o
 mlx5_core-$(CONFIG_MLX5_MPFS)      += lib/mpfs.o
-mlx5_core-$(CONFIG_VXLAN)          += lib/vxlan.o
+ifneq ($(CONFIG_VXLAN),)
+       mlx5_core-y                += lib/vxlan.o
+endif
 mlx5_core-$(CONFIG_PTP_1588_CLOCK) += lib/clock.o
 mlx5_core-$(CONFIG_PCI_HYPERV_INTERFACE) += lib/hv.o lib/hv_vhca.o