netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
@ 2020-10-20  7:38 Geert Uytterhoeven
  2020-10-20  9:26 ` Matthieu Baerts
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-10-20  7:38 UTC (permalink / raw)
  To: Mat Martineau, Matthieu Baerts, David S . Miller, Jakub Kicinski,
	Florian Westphal, Peter Krystad
  Cc: netdev, mptcp, linux-kernel, Geert Uytterhoeven

MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
is done for all other IPv6 features.

Fixes: f870fa0b5768842c ("mptcp: Add MPTCP socket stubs")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 net/mptcp/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
index abb0a992d4a0855a..8936604b3bf9d76d 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"
-	select IPV6
+	depends on IPV6
 	default y
 
 config MPTCP_KUNIT_TESTS
-- 
2.17.1


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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-20  7:38 [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it Geert Uytterhoeven
@ 2020-10-20  9:26 ` Matthieu Baerts
  2020-10-21  3:56   ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Matthieu Baerts @ 2020-10-20  9:26 UTC (permalink / raw)
  To: Geert Uytterhoeven, Mat Martineau, David S . Miller,
	Jakub Kicinski, Florian Westphal, Peter Krystad
  Cc: netdev, mptcp, linux-kernel

Hi Geert,

Thank you for the patch!

On 20/10/2020 09:38, Geert Uytterhoeven wrote:
> MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
> not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
> is done for all other IPv6 features.

Here again, the intension was to select IPv6 from MPTCP but I understand 
the issue: if we enable MPTCP, we will select IPV6 as well by default. 
Maybe not what we want on some embedded devices with very limited memory 
where IPV6 is already off. We should instead enable MPTCP_IPV6 only if 
IPV6=y. LGTM then!

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-20  9:26 ` Matthieu Baerts
@ 2020-10-21  3:56   ` Jakub Kicinski
  2020-10-21  9:43     ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2020-10-21  3:56 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: Geert Uytterhoeven, Mat Martineau, David S . Miller,
	Florian Westphal, Peter Krystad, netdev, mptcp, linux-kernel

On Tue, 20 Oct 2020 11:26:34 +0200 Matthieu Baerts wrote:
> On 20/10/2020 09:38, Geert Uytterhoeven wrote:
> > MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
> > not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
> > is done for all other IPv6 features.  
> 
> Here again, the intension was to select IPv6 from MPTCP but I understand 
> the issue: if we enable MPTCP, we will select IPV6 as well by default. 
> Maybe not what we want on some embedded devices with very limited memory 
> where IPV6 is already off. We should instead enable MPTCP_IPV6 only if 
> IPV6=y. LGTM then!
> 
> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Applied, thanks!

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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-21  3:56   ` Jakub Kicinski
@ 2020-10-21  9:43     ` Geert Uytterhoeven
  2020-10-21  9:47       ` Matthieu Baerts
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-10-21  9:43 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Matthieu Baerts, Mat Martineau, David S . Miller,
	Florian Westphal, Peter Krystad, netdev, mptcp,
	Linux Kernel Mailing List

Hi Jakub,

On Wed, Oct 21, 2020 at 5:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 20 Oct 2020 11:26:34 +0200 Matthieu Baerts wrote:
> > On 20/10/2020 09:38, Geert Uytterhoeven wrote:
> > > MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
> > > not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
> > > is done for all other IPv6 features.
> >
> > Here again, the intension was to select IPv6 from MPTCP but I understand
> > the issue: if we enable MPTCP, we will select IPV6 as well by default.
> > Maybe not what we want on some embedded devices with very limited memory
> > where IPV6 is already off. We should instead enable MPTCP_IPV6 only if
> > IPV6=y. LGTM then!
> >
> > Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>
> Applied, thanks!

My apologies, this fails for the CONFIG_IPV6=m and CONFIG_MPTCP=y
case:
  + error: net/mptcp/protocol.o: undefined reference to
`inet6_getname':  => .rodata+0x19c)
  + error: net/mptcp/protocol.o: undefined reference to `inet6_ioctl':
 => .rodata+0x1a4)
  + error: net/mptcp/protocol.o: undefined reference to
`inet6_recvmsg':  => .rodata+0x1c4)
  + error: net/mptcp/protocol.o: undefined reference to
`inet6_release':  => .rodata+0x188)
  + error: net/mptcp/protocol.o: undefined reference to
`inet6_sendmsg':  => .rodata+0x1c0)
  + error: protocol.c: undefined reference to `inet6_destroy_sock':
=> .text+0x4994)
  + error: protocol.c: undefined reference to
`inet6_register_protosw':  => .init.text+0xc6)
  + error: protocol.c: undefined reference to `inet6_stream_ops':  =>
.text+0x2bb0)
  + error: protocol.c: undefined reference to `tcpv6_prot':  => .text+0x2ba8)
  + error: subflow.c: undefined reference to
`tcp_request_sock_ipv6_ops':  => .text+0x8e2)
  + error: undefined reference to `ipv6_specific':  => (.init.text+0xea)
  + error: undefined reference to `tcp_request_sock_ipv6_ops':  =>
(.init.text+0xc4)

So those issues have to be fixed first

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-21  9:43     ` Geert Uytterhoeven
@ 2020-10-21  9:47       ` Matthieu Baerts
  2020-10-21  9:52         ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Matthieu Baerts @ 2020-10-21  9:47 UTC (permalink / raw)
  To: Geert Uytterhoeven, Jakub Kicinski
  Cc: Mat Martineau, David S . Miller, Florian Westphal, Peter Krystad,
	netdev, mptcp, Linux Kernel Mailing List

Hi Geert,

On 21/10/2020 11:43, Geert Uytterhoeven wrote:
> Hi Jakub,
> 
> On Wed, Oct 21, 2020 at 5:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>> On Tue, 20 Oct 2020 11:26:34 +0200 Matthieu Baerts wrote:
>>> On 20/10/2020 09:38, Geert Uytterhoeven wrote:
>>>> MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
>>>> not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
>>>> is done for all other IPv6 features.
>>>
>>> Here again, the intension was to select IPv6 from MPTCP but I understand
>>> the issue: if we enable MPTCP, we will select IPV6 as well by default.
>>> Maybe not what we want on some embedded devices with very limited memory
>>> where IPV6 is already off. We should instead enable MPTCP_IPV6 only if
>>> IPV6=y. LGTM then!
>>>
>>> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>>
>> Applied, thanks!
> 
> My apologies, this fails for the CONFIG_IPV6=m and CONFIG_MPTCP=y
> case:

Good point, MPTCP cannot be compiled as a module (like TCP). It should 
then depends on IPV6=y. I thought it would be the case.

Do you want me to send a patch or do you already have one?

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-21  9:47       ` Matthieu Baerts
@ 2020-10-21  9:52         ` Geert Uytterhoeven
  2020-10-21 10:54           ` Matthieu Baerts
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-10-21  9:52 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: Jakub Kicinski, Mat Martineau, David S . Miller,
	Florian Westphal, Peter Krystad, netdev, mptcp,
	Linux Kernel Mailing List

Hi Matthieu,

On Wed, Oct 21, 2020 at 11:47 AM Matthieu Baerts
<matthieu.baerts@tessares.net> wrote:
> On 21/10/2020 11:43, Geert Uytterhoeven wrote:
> > On Wed, Oct 21, 2020 at 5:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> >> On Tue, 20 Oct 2020 11:26:34 +0200 Matthieu Baerts wrote:
> >>> On 20/10/2020 09:38, Geert Uytterhoeven wrote:
> >>>> MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
> >>>> not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
> >>>> is done for all other IPv6 features.
> >>>
> >>> Here again, the intension was to select IPv6 from MPTCP but I understand
> >>> the issue: if we enable MPTCP, we will select IPV6 as well by default.
> >>> Maybe not what we want on some embedded devices with very limited memory
> >>> where IPV6 is already off. We should instead enable MPTCP_IPV6 only if
> >>> IPV6=y. LGTM then!
> >>>
> >>> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> >>
> >> Applied, thanks!
> >
> > My apologies, this fails for the CONFIG_IPV6=m and CONFIG_MPTCP=y
> > case:
>
> Good point, MPTCP cannot be compiled as a module (like TCP). It should
> then depends on IPV6=y. I thought it would be the case.
>
> Do you want me to send a patch or do you already have one?

I don't have a patch yet, so feel free to send one.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
  2020-10-21  9:52         ` Geert Uytterhoeven
@ 2020-10-21 10:54           ` Matthieu Baerts
  0 siblings, 0 replies; 7+ messages in thread
From: Matthieu Baerts @ 2020-10-21 10:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jakub Kicinski, Mat Martineau, David S . Miller,
	Florian Westphal, netdev, mptcp, Linux Kernel Mailing List

Hi Geert,

On 21/10/2020 11:52, Geert Uytterhoeven wrote:
> Hi Matthieu,
> 
> On Wed, Oct 21, 2020 at 11:47 AM Matthieu Baerts
> <matthieu.baerts@tessares.net> wrote:
>> On 21/10/2020 11:43, Geert Uytterhoeven wrote:
>>> On Wed, Oct 21, 2020 at 5:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>>>> On Tue, 20 Oct 2020 11:26:34 +0200 Matthieu Baerts wrote:
>>>>> On 20/10/2020 09:38, Geert Uytterhoeven wrote:
>>>>>> MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
>>>>>> not want to enable.  Fix this by making MPTCP_IPV6 depend on IPV6, like
>>>>>> is done for all other IPv6 features.
>>>>>
>>>>> Here again, the intension was to select IPv6 from MPTCP but I understand
>>>>> the issue: if we enable MPTCP, we will select IPV6 as well by default.
>>>>> Maybe not what we want on some embedded devices with very limited memory
>>>>> where IPV6 is already off. We should instead enable MPTCP_IPV6 only if
>>>>> IPV6=y. LGTM then!
>>>>>
>>>>> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>>>>
>>>> Applied, thanks!
>>>
>>> My apologies, this fails for the CONFIG_IPV6=m and CONFIG_MPTCP=y
>>> case:
>>
>> Good point, MPTCP cannot be compiled as a module (like TCP). It should
>> then depends on IPV6=y. I thought it would be the case.
>>
>> Do you want me to send a patch or do you already have one?
> 
> I don't have a patch yet, so feel free to send one.

Just did:

https://lore.kernel.org/netdev/20201021105154.628257-1-matthieu.baerts@tessares.net/

Groetjes,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20  7:38 [PATCH] mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it Geert Uytterhoeven
2020-10-20  9:26 ` Matthieu Baerts
2020-10-21  3:56   ` Jakub Kicinski
2020-10-21  9:43     ` Geert Uytterhoeven
2020-10-21  9:47       ` Matthieu Baerts
2020-10-21  9:52         ` Geert Uytterhoeven
2020-10-21 10:54           ` Matthieu Baerts

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).