All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"bridge@lists.linux-foundation.org" 
	<bridge@lists.linux-foundation.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Marek Behun <kabel@blackhole.sk>,
	DENG Qingfang <dqfext@gmail.com>
Subject: Re: [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience
Date: Tue, 20 Jul 2021 19:47:18 +0000	[thread overview]
Message-ID: <20210720194717.qbdz5mmmxqbn3y3z@skbuf> (raw)
In-Reply-To: <YPbcxPKjbDxChnlK@shredder>

On Tue, Jul 20, 2021 at 05:25:08PM +0300, Ido Schimmel wrote:
> If you don't want to change the order, then at least make the
> replay/cleanup optional and set it to 'false' for mlxsw. This should
> mean that the only change in mlxsw should be adding calls to
> switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() in
> mlxsw_sp_bridge_port_create() / mlxsw_sp_bridge_port_destroy(),
> respectively.

Is there any specific reason why you suggested me to move the
switchdev_bridge_port_offload() call from the top-level
mlxsw_sp_port_bridge_join() into mlxsw_sp_bridge_port_create()
(and similarly, from _pre_bridge_leave to _destroy)?

Even if you don't support replays right now, you'd need to move a bunch
of code around before you would get them to work. As far as I can see,
mlxsw_sp_bridge_port_create() is a bit too early and
mlxsw_sp_bridge_port_destroy() is a bit too late. The port needs to be
fairly up and running to be able to process the switchdev notifiers at
that stage.

Do you mind if I keep the hooks where they are, which is what I do for
all drivers? I don't think I am missing to handle any case.

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bridge@lists.linux-foundation.org"
	<bridge@lists.linux-foundation.org>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	DENG Qingfang <dqfext@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Roopa Prabhu <roopa@nvidia.com>, Jakub Kicinski <kuba@kernel.org>,
	Marek Behun <kabel@blackhole.sk>,
	"David S. Miller" <davem@davemloft.net>,
	Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [Bridge] [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience
Date: Tue, 20 Jul 2021 19:47:18 +0000	[thread overview]
Message-ID: <20210720194717.qbdz5mmmxqbn3y3z@skbuf> (raw)
In-Reply-To: <YPbcxPKjbDxChnlK@shredder>

On Tue, Jul 20, 2021 at 05:25:08PM +0300, Ido Schimmel wrote:
> If you don't want to change the order, then at least make the
> replay/cleanup optional and set it to 'false' for mlxsw. This should
> mean that the only change in mlxsw should be adding calls to
> switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() in
> mlxsw_sp_bridge_port_create() / mlxsw_sp_bridge_port_destroy(),
> respectively.

Is there any specific reason why you suggested me to move the
switchdev_bridge_port_offload() call from the top-level
mlxsw_sp_port_bridge_join() into mlxsw_sp_bridge_port_create()
(and similarly, from _pre_bridge_leave to _destroy)?

Even if you don't support replays right now, you'd need to move a bunch
of code around before you would get them to work. As far as I can see,
mlxsw_sp_bridge_port_create() is a bit too early and
mlxsw_sp_bridge_port_destroy() is a bit too late. The port needs to be
fairly up and running to be able to process the switchdev notifiers at
that stage.

Do you mind if I keep the hooks where they are, which is what I do for
all drivers? I don't think I am missing to handle any case.

  parent reply	other threads:[~2021-07-20 19:48 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 13:46 [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience Vladimir Oltean
2021-07-20 13:46 ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 01/10] net: dpaa2-switch: use extack in dpaa2_switch_port_bridge_join Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 02/10] net: dpaa2-switch: refactor prechangeupper sanity checks Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 03/10] mlxsw: spectrum: " Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 04/10] mlxsw: spectrum: refactor leaving an 8021q upper that is a bridge port Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 05/10] net: marvell: prestera: refactor prechangeupper sanity checks Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 06/10] net: switchdev: guard drivers against multiple obj replays on same bridge port Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 07/10] net: bridge: disambiguate offload_fwd_mark Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 08/10] net: bridge: switchdev: recycle unused hwdoms Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 09/10] net: bridge: switchdev: let drivers inform which bridge ports are offloaded Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 13:46 ` [PATCH v5 net-next 10/10] net: bridge: switchdev object replay helpers for everybody Vladimir Oltean
2021-07-20 13:46   ` [Bridge] " Vladimir Oltean
2021-07-20 14:01 ` [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience Ido Schimmel
2021-07-20 14:01   ` [Bridge] " Ido Schimmel
2021-07-20 14:12   ` Vladimir Oltean
2021-07-20 14:12     ` [Bridge] " Vladimir Oltean
2021-07-20 14:25     ` Ido Schimmel
2021-07-20 14:25       ` [Bridge] " Ido Schimmel
2021-07-20 14:46       ` Vladimir Oltean
2021-07-20 14:46         ` [Bridge] " Vladimir Oltean
2021-07-20 14:51         ` Ido Schimmel
2021-07-20 14:51           ` [Bridge] " Ido Schimmel
2021-07-20 15:36           ` Vladimir Oltean
2021-07-20 15:36             ` [Bridge] " Vladimir Oltean
2021-07-20 19:47       ` Vladimir Oltean [this message]
2021-07-20 19:47         ` Vladimir Oltean
2021-07-21  6:55         ` Ido Schimmel
2021-07-21  6:55           ` [Bridge] " Ido Schimmel

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=20210720194717.qbdz5mmmxqbn3y3z@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=kabel@blackhole.sk \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=tobias@waldekranz.com \
    --cc=vivien.didelot@gmail.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.