Skip to contentSkip to conversation

eth: mlx5: remove Kconfig co-dependency with VXLAN

PATCH Applied Jakub Kicinski 3 participants 3 messages Aug 27, 2025 – Aug 29, 2025

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 eth: mlx5: remove Kconfig co-dependency with VXLAN

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.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig  | 1 -
 drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/Kconfig +0 -1
index 6ec7d6e0181d..8ef2ac2060ba 100644
@@ -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
drivers/net/ethernet/mellanox/mlx5/core/Makefile +3 -1
index a253c73db9e5..206223ce63a8 100644
@@ -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
 
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jakub Kicinski

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.

Nice improvement, Thanks!

#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Wed, 27 Aug 2025 16:43:19 -0700 you wrote:

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.

[...]

Here is the summary with links:
- [net-next] eth: mlx5: remove Kconfig co-dependency with VXLAN

    https://git.kernel.org/netdev/net-next/c/15d157c3ad01

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html