[PATCH] [net-next] net/mlx5e: fix ip6_dst_lookup link failure

From: Arnd Bergmann

Date: Wed Feb 04 2026 - 08:06:41 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

Changing mlx5 to call ip6_dst_lookup() means it now fails to link
when IPv6 is a loadable module but ipsec support is built-in:

ipsec.c:(.text+0x1061): undefined reference to `ip6_dst_lookup'

Add a Kconfig dependency that removes avoids this configuration.

Fixes: e35d7da8dd9e ("net/mlx5e: Use ip6_dst_lookup instead of ipv6_dst_lookup_flow for MAC init")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index 9cf394c66939..c298efe93f97 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -154,6 +154,7 @@ config MLX5_EN_IPSEC
depends on MLX5_CORE_EN
depends on XFRM_OFFLOAD
depends on INET_ESP_OFFLOAD || INET6_ESP_OFFLOAD
+ depends on IPV6!=m || MLX5_CORE=m
help
Build support for IPsec cryptography-offload acceleration in the NIC.

--
2.39.5