All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: dsa: add CONFIG_BRIDGE dependency
@ 2017-11-13 13:57 Arnd Bergmann
  2017-11-13 14:07 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2017-11-13 13:57 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller
  Cc: Arnd Bergmann, netdev, linux-kernel

br_vlan_enabled() may be provided by a loadable module, which
causes a build error when called from a built-in function:

net/dsa/port.o: In function `dsa_port_vlan_add':
port.c:(.text+0x4a7): undefined reference to `br_vlan_enabled'
net/dsa/port.o: In function `dsa_port_vlan_del':
port.c:(.text+0x529): undefined reference to `br_vlan_enabled'

This adds a Kconfig dependency to enforce NET_DSA to not be
built-in when BRIDGE is a module and BRIDGE_VLAN_FILTERING is
enabled. We can still build NET_DSA as built-in when the
bridge code is completely disabled, or built-in, or a module
without vlan filtering support.

Fixes: 2ea7a679ca2a ("net: dsa: Don't add vlans when vlan filtering is disabled")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/dsa/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index cc5f8f971689..15926d94d796 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -7,6 +7,7 @@ config HAVE_NET_DSA
 config NET_DSA
 	tristate "Distributed Switch Architecture"
 	depends on HAVE_NET_DSA && MAY_USE_DEVLINK
+	depends on BRIDGE || !BRIDGE_VLAN_FILTERING
 	select NET_SWITCHDEV
 	select PHYLIB
 	---help---
-- 
2.9.0

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

* Re: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
  2017-11-13 13:57 [PATCH] net: dsa: add CONFIG_BRIDGE dependency Arnd Bergmann
@ 2017-11-13 14:07 ` David Miller
  2017-11-13 14:57   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2017-11-13 14:07 UTC (permalink / raw)
  To: arnd; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel


Please see:

	http://patchwork.ozlabs.org/patch/837041/

but thank you for looking into this.

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

* Re: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
  2017-11-13 14:07 ` David Miller
@ 2017-11-13 14:57   ` Arnd Bergmann
  2017-11-13 16:11     ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2017-11-13 14:57 UTC (permalink / raw)
  To: David Miller
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, Networking,
	Linux Kernel Mailing List

On Mon, Nov 13, 2017 at 3:07 PM, David Miller <davem@davemloft.net> wrote:
>
> Please see:
>
>         http://patchwork.ozlabs.org/patch/837041/

Ok, that should work equally well. I had the same thing at first
and then changed it to be a little more specific with the
dependency.

       Arnd

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

* Re: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
  2017-11-13 14:57   ` Arnd Bergmann
@ 2017-11-13 16:11     ` Andrew Lunn
  2017-11-13 16:21       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2017-11-13 16:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Miller, Vivien Didelot, Florian Fainelli, Networking,
	Linux Kernel Mailing List

On Mon, Nov 13, 2017 at 03:57:18PM +0100, Arnd Bergmann wrote:
> On Mon, Nov 13, 2017 at 3:07 PM, David Miller <davem@davemloft.net> wrote:
> >
> > Please see:
> >
> >         http://patchwork.ozlabs.org/patch/837041/
> 
> Ok, that should work equally well. I had the same thing at first
> and then changed it to be a little more specific with the
> dependency.

Hi Arnd

I considered being more specific. But i looked at how the Mellanox
driver solves this exact same problem. I took the solution from
there. So we are consistent across switch drivers.

       Andrew

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

* Re: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
  2017-11-13 16:11     ` Andrew Lunn
@ 2017-11-13 16:21       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-11-13 16:21 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David Miller, Vivien Didelot, Florian Fainelli, Networking,
	Linux Kernel Mailing List

On Mon, Nov 13, 2017 at 5:11 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, Nov 13, 2017 at 03:57:18PM +0100, Arnd Bergmann wrote:
>> On Mon, Nov 13, 2017 at 3:07 PM, David Miller <davem@davemloft.net> wrote:
>> >
>> > Please see:
>> >
>> >         http://patchwork.ozlabs.org/patch/837041/
>>
>> Ok, that should work equally well. I had the same thing at first
>> and then changed it to be a little more specific with the
>> dependency.
>
> Hi Arnd
>
> I considered being more specific. But i looked at how the Mellanox
> driver solves this exact same problem. I took the solution from
> there. So we are consistent across switch drivers.

Right, makes sense.

      Arnd

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

end of thread, other threads:[~2017-11-13 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 13:57 [PATCH] net: dsa: add CONFIG_BRIDGE dependency Arnd Bergmann
2017-11-13 14:07 ` David Miller
2017-11-13 14:57   ` Arnd Bergmann
2017-11-13 16:11     ` Andrew Lunn
2017-11-13 16:21       ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.