On 27/11/2026 19:17, Fernando Fernandez Mancera wrote:
Historically, the IPv4 protocol has been linked to the core INET
subsystem. Because shared infrastructure like the TCP/UDP engine,
routing or INET hashtables live inside net/ipv4/, it has been impossible
to compile a kernel with only IPv6 support.
This patch introduces the CONFIG_IPV4 Kconfig symbol, which is set to
'def_bool y' for now. This does not allow to completely disable the
IPv4 stack yet but it lays the necessary build-system work for that
goal.
In addition, multiple subsystems Kconfig symbols across networking
features like tunnels, drivers and filesystems have been adjusted to
depend on IPv4. Keep on mind that follow-up work is required to convert
the Kconfig symbol to bool and remove the dependency on IPv4 where it
makes sense.
Acked-by: Chuck Lever <[email protected]>
Signed-off-by: Fernando Fernandez Mancera <[email protected]>
---
[..]
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index 925ee25d05b4..99d998aa7e9b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -12,6 +12,7 @@ config MLX5_CORE
depends on PTP_1588_CLOCK_OPTIONAL
depends on PCI_HYPERV_INTERFACE || !PCI_HYPERV_INTERFACE
depends on HWMON || !HWMON
+ depends on IPV4 || !INET
Is this one needed? I don't see what in MLX5_CORE itself uses IPv4.
MLX5_CORE without MLX5_CORE_EN builds today with INET=n, so with no
net/ipv4 at all. All the mlx5 users of IPv4-only code are under
MLX5_CORE_EN or under options that depend on it.
With this line an IPV4=n kernel loses mlx5_core, and with it mlx5_vdpa,
mlx5-vfio-pci, fwctl and mlx5_dpll, which do not use IPv4. It also
makes the MLX5_CORE_EN change below redundant, as MLX5_CORE_EN already
depends on INET && MLX5_CORE.
> config MLX5_CORE_EN
> - depends on NETDEVICES && ETHERNET && INET && PCI && MLX5_CORE
> + depends on NETDEVICES && ETHERNET && INET && PCI && MLX5_CORE && IPV4
This one is needed, and it is enough on its own.
Unless I am missing a user in the core, please drop the MLX5_CORE line
in the next version and keep only this one.
Thanks,
Tariq