netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] mptcp: depends on IPV6 but not as a module
@ 2020-10-21 10:51 Matthieu Baerts
  2020-10-21 15:08 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts @ 2020-10-21 10:51 UTC (permalink / raw)
  To: Mat Martineau, Matthieu Baerts, David S. Miller, Jakub Kicinski,
	Geert Uytterhoeven
  Cc: netdev, mptcp, linux-kernel

Like TCP, MPTCP cannot be compiled as a module. Obviously, MPTCP IPv6'
support also depends on CONFIG_IPV6. But not all functions from IPv6
code are exported.

To simplify the code and reduce modifications outside MPTCP, it was
decided from the beginning to support MPTCP with IPv6 only if
CONFIG_IPV6 was built inlined. That's also why CONFIG_MPTCP_IPV6 was
created. More modifications are needed to support CONFIG_IPV6=m.

Even if it was not explicit, until recently, we were forcing CONFIG_IPV6
to be built-in because we had "select IPV6" in Kconfig. Now that we have
"depends on IPV6", we have to explicitly set "IPV6=y" to force
CONFIG_IPV6 not to be built as a module.

In other words, we can now only have CONFIG_MPTCP_IPV6=y if
CONFIG_IPV6=y.

Note that the new dependency might hide the fact IPv6 is not supported
in MPTCP even if we have CONFIG_IPV6=m. But selecting IPV6 like we did
before was forcing it to be built-in while it was maybe not what the
user wants.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 010b430d5df5 ("mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---

Notes:
    For more details about the issue we have when we try to compile
    CONFIG_IPV6=m and CONFIG_MPTCP_IPV6=y, please refer to:
    
    https://lore.kernel.org/netdev/CAMuHMdW=1LfE8UoGRVBvrvrintQMNKUdTe5PPQz=PN3=gJmw=Q@mail.gmail.com/

 net/mptcp/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
index 8936604b3bf9..a014149aa323 100644
--- a/net/mptcp/Kconfig
+++ b/net/mptcp/Kconfig
@@ -19,7 +19,7 @@ config INET_MPTCP_DIAG
 
 config MPTCP_IPV6
 	bool "MPTCP: IPv6 support for Multipath TCP"
-	depends on IPV6
+	depends on IPV6=y
 	default y
 
 config MPTCP_KUNIT_TESTS
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] mptcp: depends on IPV6 but not as a module
  2020-10-21 10:51 [PATCH net] mptcp: depends on IPV6 but not as a module Matthieu Baerts
@ 2020-10-21 15:08 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-10-21 15:08 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: Mat Martineau, David S. Miller, Geert Uytterhoeven, netdev,
	mptcp, linux-kernel

On Wed, 21 Oct 2020 12:51:53 +0200 Matthieu Baerts wrote:
> Like TCP, MPTCP cannot be compiled as a module. Obviously, MPTCP IPv6'
> support also depends on CONFIG_IPV6. But not all functions from IPv6
> code are exported.
> 
> To simplify the code and reduce modifications outside MPTCP, it was
> decided from the beginning to support MPTCP with IPv6 only if
> CONFIG_IPV6 was built inlined. That's also why CONFIG_MPTCP_IPV6 was
> created. More modifications are needed to support CONFIG_IPV6=m.

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-21 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 10:51 [PATCH net] mptcp: depends on IPV6 but not as a module Matthieu Baerts
2020-10-21 15:08 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).