public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Jiri Pirko <jiri@nvidia.com>, Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next 0/5] Code movement to br_switchdev.c
Date: Tue, 2 Nov 2021 14:44:42 +0100	[thread overview]
Message-ID: <YYFAynr/Q3iQlK8B@nanopsycho> (raw)
In-Reply-To: <20211102120206.ak2j7dnhx6clvd46@skbuf>

Tue, Nov 02, 2021 at 01:02:06PM CET, vladimir.oltean@nxp.com wrote:
>On Tue, Nov 02, 2021 at 12:49:53PM +0100, Jiri Pirko wrote:
>> Tue, Nov 02, 2021 at 12:11:59PM CET, vladimir.oltean@nxp.com wrote:
>> >On Mon, Nov 01, 2021 at 04:05:45PM +0100, Jiri Pirko wrote:
>> >> Wed, Oct 27, 2021 at 06:21:14PM CEST, vladimir.oltean@nxp.com wrote:
>> >> >This is one more refactoring patch set for the Linux bridge, where more
>> >> >logic that is specific to switchdev is moved into br_switchdev.c, which
>> >> >is compiled out when CONFIG_NET_SWITCHDEV is disabled.
>> >> 
>> >> Looks good.
>> >> 
>> >> While you are at it, don't you plan to also move switchdev.c into
>> >> br_switchdev.c and eventually rename to br_offload.c ?
>> >> 
>> >> Switchdev is about bridge offloading only anyway.
>> >
>> >You mean I should effectively make switchdev part of the bridge?
>> 
>> Yes.
>
>Ok, have you actually seen the commit message linked below? Basically it
>says that there are drivers that depend on switchdev.c being this
>neutral third party, forwarding events on notifier chains back and forth
>between the bridge and the drivers. If we make switchdev.c part of the
>bridge, then drivers can no longer be compiled without bridge support.
>Currently br_switchdev.c is compiled as follows:
>
>bridge-$(CONFIG_NET_SWITCHDEV) += br_switchdev.o
>
>whereas switchdev.c is compiled as follows:
>
>obj-y += switchdev.o
>
>So to rephrase the question: unless you're suggesting that I should
>build br_switchdev.o as part of obj-$(CONFIG_NET_SWITCHDEV) instead of
>bridge-$(CONFIG_NET_SWITCHDEV), then what do we do with the drivers that
>assume that the switchdev functions they call into are present when the
>bridge is not compiled, or is compiled as module?

It can work similarly as VLAN. It also has "vlan core" which is always
in for drivers, however VLAN driver itself does not have to be.


>
>> >See commit 957e2235e526 ("net: make switchdev_bridge_port_{,unoffload}
>> >loosely coupled with the bridge").

  reply	other threads:[~2021-11-02 13:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 16:21 [PATCH net-next 0/5] Code movement to br_switchdev.c Vladimir Oltean
2021-10-27 16:21 ` [PATCH net-next 1/5] net: bridge: provide shim definition for br_vlan_flags Vladimir Oltean
2021-10-27 19:28   ` Nikolay Aleksandrov
2021-10-27 19:45     ` Vladimir Oltean
2021-10-27 19:50       ` Nikolay Aleksandrov
2021-10-27 19:54         ` Vladimir Oltean
2021-10-28  8:45           ` Nikolay Aleksandrov
2021-10-27 16:21 ` [PATCH net-next 2/5] net: bridge: move br_vlan_replay to br_switchdev.c Vladimir Oltean
2021-10-28  8:46   ` Nikolay Aleksandrov
2021-10-27 16:21 ` [PATCH net-next 3/5] net: bridge: split out the switchdev portion of br_mdb_notify Vladimir Oltean
2021-10-28  8:48   ` Nikolay Aleksandrov
2021-10-27 16:21 ` [PATCH net-next 4/5] net: bridge: mdb: move all switchdev logic to br_switchdev.c Vladimir Oltean
2021-10-28  8:50   ` Nikolay Aleksandrov
2021-10-27 16:21 ` [PATCH net-next 5/5] net: bridge: switchdev: consistent function naming Vladimir Oltean
2021-10-28  8:50   ` Nikolay Aleksandrov
2021-10-29  3:10 ` [PATCH net-next 0/5] Code movement to br_switchdev.c patchwork-bot+netdevbpf
2021-11-01 15:05 ` Jiri Pirko
2021-11-02 11:11   ` Vladimir Oltean
2021-11-02 11:49     ` Jiri Pirko
2021-11-02 12:02       ` Vladimir Oltean
2021-11-02 13:44         ` Jiri Pirko [this message]
2021-11-02 17:03         ` Andrew Lunn
2021-11-02 17:20           ` 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=YYFAynr/Q3iQlK8B@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox