lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210802205333.7kcmf6npurld7zrq@skbuf>
Date:   Mon, 2 Aug 2021 20:53:33 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Arnd Bergmann <arnd@...nel.org>
CC:     Simon Horman <simon.horman@...igine.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>,
        Ivan Vecera <ivecera@...hat.com>,
        Parav Pandit <parav@...dia.com>,
        Networking <netdev@...r.kernel.org>,
        linux-rdma <linux-rdma@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "oss-drivers@...igine.com" <oss-drivers@...igine.com>
Subject: Re: [PATCH] switchdev: add Kconfig dependencies for bridge

On Mon, Aug 02, 2021 at 10:44:04PM +0200, Arnd Bergmann wrote:
> > or to extend the BRIDGE || BRIDGE=n dependency to TI_K3_AM65_CPSW_NUSS
> > which is the direct tristate dependency of CONFIG_TI_K3_AM65_CPSW_SWITCHDEV,
> 
> That would work, but it's slightly more heavy-handed than my proposal, as this
> prevents TI_K3_AM65_CPSW_NUSS from being built-in when BRIDGE is a module,
> even when switchdev support is completely disabled.
> 
> > and to make CONFIG_TI_K3_AM65_CPSW_SWITCHDEV simply depend on BRIDGE.
> 
> This would not be needed then I think.

I've tested this change according to your suggestion:

diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 7ac8e5ecbe97..a9980cfc504b 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -93,6 +93,7 @@ config TI_CPTS
 config TI_K3_AM65_CPSW_NUSS
 	tristate "TI K3 AM654x/J721E CPSW Ethernet driver"
 	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
+	depends on (BRIDGE && NET_SWITCHDEV) || BRIDGE=n || NET_SWITCHDEV=n
 	select NET_DEVLINK
 	select TI_DAVINCI_MDIO
 	imply PHY_TI_GMII_SEL
(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
@@ -110,7 +111,6 @@ config TI_K3_AM65_CPSW_NUSS
 config TI_K3_AM65_CPSW_SWITCHDEV
 	bool "TI K3 AM654x/J721E CPSW Switch mode support"
 	depends on TI_K3_AM65_CPSW_NUSS
-	depends on BRIDGE || BRIDGE=n
 	depends on NET_SWITCHDEV
 	help
 	 This enables switchdev support for TI K3 CPSWxG Ethernet

and it does appear to work, so when you resubmit please feel free to add:

Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Tested-by: Vladimir Oltean <vladimir.oltean@....com>

Thanks and sorry for breaking the dependency chain yet again! It takes
time to learn this stuff.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ