netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] mpls: fix dependencies on mpls_gso.ko
@ 2020-10-23 16:19 Guillaume Nault
  2020-10-23 16:19 ` [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO Guillaume Nault
  2020-10-23 16:19 ` [PATCH net 2/2] net/sched: act_mpls: Add softdep on mpls_gso.ko Guillaume Nault
  0 siblings, 2 replies; 8+ messages in thread
From: Guillaume Nault @ 2020-10-23 16:19 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski; +Cc: netdev, Alexander Ovechkin, David Ahern

Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
mpls_iptunnel tries to load mpls_gso. Therefore, we need to build
mpls_gso when mpls_iptunnel is selected (patch 1).

There's also the act_mpls module that can push MPLS headers on GSO
packets. This module also depends on mpls_gso (patch 2).

Guillaume Nault (2):
  mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  net/sched: act_mpls: Add softdep on mpls_gso.ko

 net/mpls/Kconfig     | 1 +
 net/sched/Kconfig    | 2 ++
 net/sched/act_mpls.c | 1 +
 3 files changed, 4 insertions(+)

-- 
2.21.3


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

* [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-23 16:19 [PATCH net 0/2] mpls: fix dependencies on mpls_gso.ko Guillaume Nault
@ 2020-10-23 16:19 ` Guillaume Nault
  2020-10-23 18:23   ` Jakub Kicinski
  2020-10-23 16:19 ` [PATCH net 2/2] net/sched: act_mpls: Add softdep on mpls_gso.ko Guillaume Nault
  1 sibling, 1 reply; 8+ messages in thread
From: Guillaume Nault @ 2020-10-23 16:19 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski; +Cc: netdev, Alexander Ovechkin, David Ahern

Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.

Fixes: b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 net/mpls/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig
index d672ab72ab12..b83093bcb48f 100644
--- a/net/mpls/Kconfig
+++ b/net/mpls/Kconfig
@@ -33,6 +33,7 @@ config MPLS_ROUTING
 config MPLS_IPTUNNEL
 	tristate "MPLS: IP over MPLS tunnel support"
 	depends on LWTUNNEL && MPLS_ROUTING
+	select NET_MPLS_GSO
 	help
 	 mpls ip tunnel support.
 
-- 
2.21.3


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

* [PATCH net 2/2] net/sched: act_mpls: Add softdep on mpls_gso.ko
  2020-10-23 16:19 [PATCH net 0/2] mpls: fix dependencies on mpls_gso.ko Guillaume Nault
  2020-10-23 16:19 ` [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO Guillaume Nault
@ 2020-10-23 16:19 ` Guillaume Nault
  1 sibling, 0 replies; 8+ messages in thread
From: Guillaume Nault @ 2020-10-23 16:19 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski; +Cc: netdev, Alexander Ovechkin, David Ahern

TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso
packets. Such packets will thus require mpls_gso.ko for segmentation.

Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 net/sched/Kconfig    | 2 ++
 net/sched/act_mpls.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index a3b37d88800e..b08b410c8084 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -879,6 +879,8 @@ config NET_ACT_CSUM
 config NET_ACT_MPLS
 	tristate "MPLS manipulation"
 	depends on NET_CLS_ACT
+	select MPLS
+	select NET_MPLS_GSO
 	help
 	  Say Y here to push or pop MPLS headers.
 
diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c
index f40bf9771cb9..5c7456e5b5cf 100644
--- a/net/sched/act_mpls.c
+++ b/net/sched/act_mpls.c
@@ -426,6 +426,7 @@ static void __exit mpls_cleanup_module(void)
 module_init(mpls_init_module);
 module_exit(mpls_cleanup_module);
 
+MODULE_SOFTDEP("post: mpls_gso");
 MODULE_AUTHOR("Netronome Systems <oss-drivers@netronome.com>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("MPLS manipulation actions");
-- 
2.21.3


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

* Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-23 16:19 ` [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO Guillaume Nault
@ 2020-10-23 18:23   ` Jakub Kicinski
  2020-10-23 18:48     ` Guillaume Nault
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2020-10-23 18:23 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: David Miller, netdev, Alexander Ovechkin, David Ahern

On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote:
> Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
> mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
> need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.

Does it generate an error or a warning? I don't know much about soft
dependencies, but I'd think it's optional.

> diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig
> index d672ab72ab12..b83093bcb48f 100644
> --- a/net/mpls/Kconfig
> +++ b/net/mpls/Kconfig
> @@ -33,6 +33,7 @@ config MPLS_ROUTING
>  config MPLS_IPTUNNEL
>  	tristate "MPLS: IP over MPLS tunnel support"
>  	depends on LWTUNNEL && MPLS_ROUTING
> +	select NET_MPLS_GSO
>  	help
>  	 mpls ip tunnel support.
>  


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

* Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-23 18:23   ` Jakub Kicinski
@ 2020-10-23 18:48     ` Guillaume Nault
  2020-10-25 21:43       ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Guillaume Nault @ 2020-10-23 18:48 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: David Miller, netdev, Alexander Ovechkin, David Ahern

On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote:
> On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote:
> > Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
> > mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
> > need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.
> 
> Does it generate an error or a warning? I don't know much about soft
> dependencies, but I'd think it's optional.

Yes, it's optional from a softdep point of view. My point was that
having a softdep isn't a complete solution, as a bad .config can still
result in inability to properly transmit GSO packets.

> > diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig
> > index d672ab72ab12..b83093bcb48f 100644
> > --- a/net/mpls/Kconfig
> > +++ b/net/mpls/Kconfig
> > @@ -33,6 +33,7 @@ config MPLS_ROUTING
> >  config MPLS_IPTUNNEL
> >  	tristate "MPLS: IP over MPLS tunnel support"
> >  	depends on LWTUNNEL && MPLS_ROUTING
> > +	select NET_MPLS_GSO
> >  	help
> >  	 mpls ip tunnel support.
> >  
> 


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

* Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-23 18:48     ` Guillaume Nault
@ 2020-10-25 21:43       ` Jakub Kicinski
  2020-10-26  2:48         ` David Ahern
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2020-10-25 21:43 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: David Miller, netdev, Alexander Ovechkin, David Ahern

On Fri, 23 Oct 2020 20:48:16 +0200 Guillaume Nault wrote:
> On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote:
> > On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote:  
> > > Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
> > > mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
> > > need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.  
> > 
> > Does it generate an error or a warning? I don't know much about soft
> > dependencies, but I'd think it's optional.  
> 
> Yes, it's optional from a softdep point of view. My point was that
> having a softdep isn't a complete solution, as a bad .config can still
> result in inability to properly transmit GSO packets.

IMO the combination of select and softdep feels pretty strange.

It's either a softdep and therefore optional, or we really don't 
want to be missing it in a correctly functioning system, and the
dependency should be made stronger.

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

* Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-25 21:43       ` Jakub Kicinski
@ 2020-10-26  2:48         ` David Ahern
  2020-10-26  9:04           ` Guillaume Nault
  0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2020-10-26  2:48 UTC (permalink / raw)
  To: Jakub Kicinski, Guillaume Nault; +Cc: David Miller, netdev, Alexander Ovechkin

On 10/25/20 3:43 PM, Jakub Kicinski wrote:
> On Fri, 23 Oct 2020 20:48:16 +0200 Guillaume Nault wrote:
>> On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote:
>>> On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote:  
>>>> Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
>>>> mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
>>>> need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.  
>>>
>>> Does it generate an error or a warning? I don't know much about soft
>>> dependencies, but I'd think it's optional.  
>>
>> Yes, it's optional from a softdep point of view. My point was that
>> having a softdep isn't a complete solution, as a bad .config can still
>> result in inability to properly transmit GSO packets.
> 
> IMO the combination of select and softdep feels pretty strange.
> 
> It's either a softdep and therefore optional, or we really don't 
> want to be missing it in a correctly functioning system, and the
> dependency should be made stronger.
> 

That's why I liked the softdep solution - if the module is there, load it.

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

* Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO
  2020-10-26  2:48         ` David Ahern
@ 2020-10-26  9:04           ` Guillaume Nault
  0 siblings, 0 replies; 8+ messages in thread
From: Guillaume Nault @ 2020-10-26  9:04 UTC (permalink / raw)
  To: David Ahern; +Cc: Jakub Kicinski, David Miller, netdev, Alexander Ovechkin

On Sun, Oct 25, 2020 at 08:48:38PM -0600, David Ahern wrote:
> On 10/25/20 3:43 PM, Jakub Kicinski wrote:
> > On Fri, 23 Oct 2020 20:48:16 +0200 Guillaume Nault wrote:
> >> On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote:
> >>> On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote:  
> >>>> Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"),
> >>>> mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, we
> >>>> need to ensure that mpls_gso.ko is built whenever MPLS_IPTUNNEL is set.  
> >>>
> >>> Does it generate an error or a warning? I don't know much about soft
> >>> dependencies, but I'd think it's optional.  
> >>
> >> Yes, it's optional from a softdep point of view. My point was that
> >> having a softdep isn't a complete solution, as a bad .config can still
> >> result in inability to properly transmit GSO packets.
> > 
> > IMO the combination of select and softdep feels pretty strange.
> > 
> > It's either a softdep and therefore optional, or we really don't 
> > want to be missing it in a correctly functioning system, and the
> > dependency should be made stronger.
> > 
> 
> That's why I liked the softdep solution - if the module is there, load it.

Okay, then I'll resubmit without the Kconfig bits.


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

end of thread, other threads:[~2020-10-26  9:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 16:19 [PATCH net 0/2] mpls: fix dependencies on mpls_gso.ko Guillaume Nault
2020-10-23 16:19 ` [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO Guillaume Nault
2020-10-23 18:23   ` Jakub Kicinski
2020-10-23 18:48     ` Guillaume Nault
2020-10-25 21:43       ` Jakub Kicinski
2020-10-26  2:48         ` David Ahern
2020-10-26  9:04           ` Guillaume Nault
2020-10-23 16:19 ` [PATCH net 2/2] net/sched: act_mpls: Add softdep on mpls_gso.ko Guillaume Nault

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