From: Simon Horman <simon.horman@corigine.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Arnd Bergmann <arnd@arndb.de>, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, Jiri Pirko <jiri@nvidia.com>,
Ido Schimmel <idosch@nvidia.com>,
Ivan Vecera <ivecera@redhat.com>, Parav Pandit <parav@nvidia.com>,
Networking <netdev@vger.kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
oss-drivers@corigine.com
Subject: Re: [PATCH] switchdev: add Kconfig dependencies for bridge
Date: Mon, 2 Aug 2021 20:51:19 +0200 [thread overview]
Message-ID: <20210802185109.GA16761@corigine.com> (raw)
In-Reply-To: <CAK8P3a0R1wvqNE=tGAZt0GPTZFQVw=0Y3AX0WCK4hMWewBc2qA@mail.gmail.com>
On Mon, Aug 02, 2021 at 08:29:25PM +0200, Arnd Bergmann wrote:
> On Mon, Aug 2, 2021 at 6:23 PM Simon Horman <simon.horman@corigine.com> wrote:
> > On Mon, Aug 02, 2021 at 04:47:28PM +0200, Arnd Bergmann wrote:
> > > ---
> > > This version seems to pass my randconfig builds for the moment,
> > > but that doesn't mean it's correct either. Please have a closer
> > > look before this gets applied.
>
> Thank you for taking a look, it seems I have done a particularly bad
> job rebasing
> the patch on top of the previous fix, leaving only the wrong bits ;-)
:)
...
> > > diff --git a/drivers/net/ethernet/netronome/Kconfig b/drivers/net/ethernet/netronome/Kconfig
> > > index b82758d5beed..a298d19e8383 100644
> > > --- a/drivers/net/ethernet/netronome/Kconfig
> > > +++ b/drivers/net/ethernet/netronome/Kconfig
> > > @@ -21,6 +21,7 @@ config NFP
> > > depends on PCI && PCI_MSI
> > > depends on VXLAN || VXLAN=n
> > > depends on TLS && TLS_DEVICE || TLS_DEVICE=n
> > > + depends on NET_MAY_USE_SWITCHDEV
> > > select NET_DEVLINK
> > > select CRC32
> > > help
> >
> > This seems wrong, the NFP driver doesn't call
> > switchdev_bridge_port_offload()
>
> Ah right, I actually noticed that earlier and then forgot to remove that hunk.
>
> Also: is this actually intended or should the driver call
> switchdev_bridge_port_offload() like the other switchdev drivers do?
The NFP driver doesn't implement /use this part of the switchdev API.
It is intentional given the current scope of features implemented.
> > > diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
> > > index 07192613256e..a73c6c236b25 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 OF && TI_K3_UDMA_GLUE_LAYER
> > > + depends on NET_MAY_USE_SWITCHDEV
> > > select NET_DEVLINK
> > > select TI_DAVINCI_MDIO
> > > imply PHY_TI_GMII_SEL
> >
> > I believe this has already been addressed by the following patch in net
> >
> > b0e81817629a ("net: build all switchdev drivers as modules when the bridge is a module")
>
> I think the fix was wrong here, and that hunk should be reverted.
> The dependency was added to a bool option, where it does not have
> the intended effect.
>
> I think this is the only remaining thing needed from my patch, so
> the NET_MAY_USE_SWITCHDEV option is not needed either,
> and it could be written as:
>
> diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
> index 07192613256e..e49006a96d49 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 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
> @@ -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
>
> If this looks correct to you, I can submit it as a standalone patch.
Is there a conflict between your proposed change and the
presence of "depends on NET_SWITCHDEV" ?
BTW, I'm not sure I know how to compile TI_K3_AM65_CPSW_NUSS.
So I'm perhaps not the best arbiter of correctness here.
next prev parent reply other threads:[~2021-08-02 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 14:47 [PATCH] switchdev: add Kconfig dependencies for bridge Arnd Bergmann
2021-08-02 16:22 ` Simon Horman
2021-08-02 18:29 ` Arnd Bergmann
2021-08-02 18:51 ` Simon Horman [this message]
2021-08-02 19:05 ` Vladimir Oltean
2021-08-02 19:55 ` Arnd Bergmann
2021-08-02 20:20 ` Vladimir Oltean
2021-08-02 20:44 ` Arnd Bergmann
2021-08-02 20:53 ` Vladimir Oltean
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=20210802185109.GA16761@corigine.com \
--to=simon.horman@corigine.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=ivecera@redhat.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=parav@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=vladimir.oltean@nxp.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 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.