LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH 01/13 RFC net-next] net: ipv4: introduce CONFIG_IPV4 to decou

To: Arnd Bergmann <arnd@xxxxxxxx>, Netdev <netdev@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 01/13 RFC net-next] net: ipv4: introduce CONFIG_IPV4 to decouple the IPv4 stack
Cc: "David S . Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, David Ahern <dsahern@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxx>, Ido Schimmel <idosch@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, Anthony L Nguyen <anthony.l.nguyen@xxxxxxxxx>, Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>, Elad Nachman <enachman@xxxxxxxxxxx>, Saeed Mahameed <saeedm@xxxxxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>, Mark Bloch <mbloch@xxxxxxxxxx>, Petr Machata <petrm@xxxxxxxxxx>, Edward Cree <ecree.xilinx@xxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>, Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>, Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>, Keith Busch <kbusch@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Sagi Grimberg <sagi@xxxxxxxxxxx>, Chaitanya Kulkarni <kch@xxxxxxxxxx>, Saurav Kashyap <skashyap@xxxxxxxxxxx>, Javed Hasan <jhasan@xxxxxxxxxxx>, GR-QLogic-Storage-Upstream@xxxxxxxxxxx, "James E . J . Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Nilesh Javali <njavali@xxxxxxxxxxx>, Manish Rangankar <mrangankar@xxxxxxxxxxx>, Varun Prakash <varun@xxxxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Marc Dionne <marc.dionne@xxxxxxxxxxxx>, Trond Myklebust <trondmy@xxxxxxxxxx>, Anna Schumaker <anna@xxxxxxxxxx>, Chuck Lever <cel@xxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, NeilBrown <neil@xxxxxxxxxx>, Olga Kornievskaia <okorniev@xxxxxxxxxx>, Dai Ngo <Dai.Ngo@xxxxxxxxxx>, Tom Talpey <tom@xxxxxxxxxx>, Marek Lindner <marek.lindner@xxxxxxxxxxx>, Simon Wunderlich <sw@xxxxxxxxxxxxxxxxxx>, Antonio Quartulli <antonio@xxxxxxxxxxxxx>, Sven Eckelmann <sven@xxxxxxxxxxxxx>, Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Phil Sutter <phil@xxxxxx>, Johannes Berg <johannes@xxxxxxxxxxxxxxxx>, Matthieu Baerts <matttbe@xxxxxxxxxx>, Mat Martineau <martineau@xxxxxxxxxx>, Geliang Tang <geliang@xxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Aaron Conole <aconole@xxxxxxxxxx>, Eelco Chaudron <echaudro@xxxxxxxxxx>, Ilya Maximets <i.maximets@xxxxxxx>, Allison Henderson <achender@xxxxxxxxxx>, Jamal Hadi Salim <jhs@xxxxxxxxxxxx>, Jiri Pirko <jiri@xxxxxxxxxxx>, Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>, Xin Long <lucien.xin@xxxxxxxxx>, "D. Wythe" <alibuda@xxxxxxxxxxxxxxxxx>, Dust Li <dust.li@xxxxxxxxxxxxxxxxx>, Sidraya Jayagond <sidraya@xxxxxxxxxxxxx>, Wenjia Zhang <wenjia@xxxxxxxxxxxxx>, Mahanta Jambigi <mjambigi@xxxxxxxxxxxxx>, Tony Lu <tonylu@xxxxxxxxxxxxxxxxx>, Wen Gu <guwen@xxxxxxxxxxxxxxxxx>, Jon Maloy <jmaloy@xxxxxxxxxx>, Steffen Klassert <steffen.klassert@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Vikas Gupta <vikas.gupta@xxxxxxxxxxxx>, Rajashekar Hudumula <rajashekar.hudumula@xxxxxxxxxxxx>, Justin Chen <justin.chen@xxxxxxxxxxxx>, Bhargava Marreddy <bhargava.marreddy@xxxxxxxxxxxx>, Nicolai Buchwitz <nb@xxxxxxxxxxx>, Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>, Heiner Kallweit <hkallweit1@xxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Russell King <rmk+kernel@xxxxxxxxxxxxxxx>, Yao Zi <me@xxxxxxxx>, Yanteng Si <siyanteng@xxxxxxxxxxxxxxxxx>, Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>, Julian Braha <julianbraha@xxxxxxxxx>, Joey Lu <a0987203069@xxxxxxxxx>, Shangjuan Wei <weishangjuan@xxxxxxxxxxxxxxxxxx>, Chen-Yu Tsai <wens@xxxxxxxxxx>, Inochi Amaoto <inochiama@xxxxxxxxx>, "Lad, Prabhakar" <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>, Qingfang Deng <qingfang.deng@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Eric Biggers <ebiggers@xxxxxxxxxx>, Ethan Nelson-Moore <enelsonmoore@xxxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Dmitry Safonov <0x7f454c46@xxxxxxxxx>, Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>, Alyssa Ross <hi@xxxxxxxxx>, linux-rdma@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, "intel-wired-lan@xxxxxxxxxxxxxxxx" <intel-wired-lan@xxxxxxxxxxxxxxxx>, "open list:NETRONOME ETHERNET DRIVERS" <oss-drivers@xxxxxxxxxxxx>, linux-net-drivers@xxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, brcm80211@xxxxxxxxxxxxxxx, brcm80211-dev-list.pdl@xxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, b.a.t.m.a.n@xxxxxxxxxxxxxxxxxxx, "open list:ETHERNET BRIDGE" <bridge@xxxxxxxxxxxxxxx>, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, mptcp@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, dev@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-sctp@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, "open list:TIPC NETWORK LAYER" <tipc-discussion@xxxxxxxxxxxxxxxxxxxxx>
From: Fernando Fernandez Mancera <fmancera@xxxxxxx>
Date: Mon, 13 Jul 2026 16:57:02 +0200
On 7/13/26 4:22 PM, Arnd Bergmann wrote:
On Mon, Jul 13, 2026, at 16:00, Fernando Fernandez Mancera wrote:
On 7/12/26 1:01 PM, Arnd Bergmann wrote:
On Sun, Jul 12, 2026, at 03:38, 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.

I expect this will cause additional (trivial) build regression in the
next step when randconfig builds run into obscure corner cases, either
with INET=y IPV4=n IPV6=y or with INET=y IPV4=n IPV6=n.

I can probably give your patch (with IPV4 visible or disabled) an
early go on the randconfig tree to find these more quickly.
If I run into regressions, should I just add more 'depends on IPV4',
or do you have other plans?


Yes, I have a job running randconfig and verifying nothing breaks. If
something breaks and it isn't core networking stack I would just make
the Kconfig symbol depend on IPv4.

Then later we will have more time to write a dedicate patch so it does
not depend on IPv4.

Ok

Should we have some logic to ensure that at least one of IPV4 or
IPV6 is enabled? I think this would work

config IPV4
        bool "The IPv4 protocol" if IPV6
        default INET

which only allows turning IPV4 off if IPV6 has enabled.


I do wonder, should we? I mean, I didn't try it off but I don't see why
we should not allow a pure L2 system..

I expected a pure L2 system to be CONFIG_ETHERNET=y CONFIG_INET=n.

Which user-visible parts of CONFIG_INET would you want keep working
when both v4 and v6 are disabled?


Yes, you are right. So I think introducing something as you proposed makes sense. Right now I cannot think about something needed from INET for pure L2.

Thank you!
Fernando.


<Prev in Thread] Current Thread [Next in Thread>