Netdev List
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
Date: Mon, 13 Nov 2017 14:57:32 +0100	[thread overview]
Message-ID: <20171113135756.3250298-1-arnd@arndb.de> (raw)

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

             reply	other threads:[~2017-11-13 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 13:57 Arnd Bergmann [this message]
2017-11-13 14:07 ` [PATCH] net: dsa: add CONFIG_BRIDGE dependency David Miller
2017-11-13 14:57   ` Arnd Bergmann
2017-11-13 16:11     ` Andrew Lunn
2017-11-13 16:21       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171113135756.3250298-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox