From: Vladimir Oltean <vladimir.oltean@nxp.com> To: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net> Cc: Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vivien Didelot <vivien.didelot@gmail.com>, Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>, 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, Grygorii Strashko <grygorii.strashko@ti.com>, Marek Behun <kabel@blackhole.sk>, DENG Qingfang <dqfext@gmail.com> Subject: [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience Date: Tue, 20 Jul 2021 16:46:45 +0300 [thread overview] Message-ID: <20210720134655.892334-1-vladimir.oltean@nxp.com> (raw) This series introduces an explicit API through which switchdev drivers mark a bridge port as offloaded or not: - switchdev_bridge_port_offload() - switchdev_bridge_port_unoffload() Currently, the bridge assumes that a port is offloaded if dev_get_port_parent_id(dev, &ppid, recurse=true) returns something, but that is just an assumption that breaks some use cases (like a non-offloaded LAG interface on top of a switchdev port, bridged with other switchdev ports). Along with some consolidation of the bridge logic to assign a "switchdev offloading mark" to a port (now better called a "hardware domain"), this series allows the bridge driver side to no longer impose restrictions on that configuration. Right now, all switchdev drivers must be modified to use the explicit API, but more and more logic can then be placed centrally in the bridge and therefore ease the job of a switchdev driver writer in the future. For example, the first thing we can hook into the explicit switchdev offloading API calls are the switchdev object and FDB replay helpers. So far, these have only been used by DSA in "pull" mode (where the driver must ask for them). Adding the replay helpers to other drivers involves a lot of repetition. But by moving the helpers inside the bridge port offload/unoffload hook points, we can move the entire replay process to "push" mode (where the bridge provides them automatically). The explicit switchdev offloading API will see further extensions in the future. The patches were split from a larger series for easier review: https://patchwork.kernel.org/project/netdevbpf/cover/20210718214434.3938850-1-vladimir.oltean@nxp.com/ Tobias Waldekranz (2): net: bridge: disambiguate offload_fwd_mark net: bridge: switchdev: recycle unused hwdoms Vladimir Oltean (8): net: dpaa2-switch: use extack in dpaa2_switch_port_bridge_join net: dpaa2-switch: refactor prechangeupper sanity checks mlxsw: spectrum: refactor prechangeupper sanity checks mlxsw: spectrum: refactor leaving an 8021q upper that is a bridge port net: marvell: prestera: refactor prechangeupper sanity checks net: switchdev: guard drivers against multiple obj replays on same bridge port net: bridge: switchdev: let drivers inform which bridge ports are offloaded net: bridge: switchdev object replay helpers for everybody .../ethernet/freescale/dpaa2/dpaa2-switch.c | 69 +++- .../ethernet/marvell/prestera/prestera_main.c | 99 +++-- .../marvell/prestera/prestera_switchdev.c | 42 ++- .../marvell/prestera/prestera_switchdev.h | 7 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 347 ++++++++++++------ .../net/ethernet/mellanox/mlxsw/spectrum.h | 4 + .../mellanox/mlxsw/spectrum_switchdev.c | 28 +- .../microchip/sparx5/sparx5_switchdev.c | 48 ++- drivers/net/ethernet/mscc/ocelot_net.c | 115 ++++-- drivers/net/ethernet/rocker/rocker.h | 9 +- drivers/net/ethernet/rocker/rocker_main.c | 34 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 42 ++- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 34 +- drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 14 +- drivers/net/ethernet/ti/am65-cpsw-switchdev.h | 3 + drivers/net/ethernet/ti/cpsw_new.c | 32 +- drivers/net/ethernet/ti/cpsw_switchdev.c | 4 +- drivers/net/ethernet/ti/cpsw_switchdev.h | 3 + include/linux/if_bridge.h | 60 +-- net/bridge/br_fdb.c | 1 - net/bridge/br_if.c | 11 +- net/bridge/br_mdb.c | 1 - net/bridge/br_private.h | 61 ++- net/bridge/br_switchdev.c | 254 +++++++++++-- net/bridge/br_vlan.c | 1 - net/dsa/port.c | 83 ++--- 26 files changed, 1059 insertions(+), 347 deletions(-) -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Oltean <vladimir.oltean@nxp.com> To: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net> Cc: Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Jiri Pirko <jiri@resnulli.us>, DENG Qingfang <dqfext@gmail.com>, bridge@lists.linux-foundation.org, Ido Schimmel <idosch@idosch.org>, Grygorii Strashko <grygorii.strashko@ti.com>, Nikolay Aleksandrov <nikolay@nvidia.com>, Roopa Prabhu <roopa@nvidia.com>, Marek Behun <kabel@blackhole.sk>, Vivien Didelot <vivien.didelot@gmail.com>, Tobias Waldekranz <tobias@waldekranz.com> Subject: [Bridge] [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience Date: Tue, 20 Jul 2021 16:46:45 +0300 [thread overview] Message-ID: <20210720134655.892334-1-vladimir.oltean@nxp.com> (raw) This series introduces an explicit API through which switchdev drivers mark a bridge port as offloaded or not: - switchdev_bridge_port_offload() - switchdev_bridge_port_unoffload() Currently, the bridge assumes that a port is offloaded if dev_get_port_parent_id(dev, &ppid, recurse=true) returns something, but that is just an assumption that breaks some use cases (like a non-offloaded LAG interface on top of a switchdev port, bridged with other switchdev ports). Along with some consolidation of the bridge logic to assign a "switchdev offloading mark" to a port (now better called a "hardware domain"), this series allows the bridge driver side to no longer impose restrictions on that configuration. Right now, all switchdev drivers must be modified to use the explicit API, but more and more logic can then be placed centrally in the bridge and therefore ease the job of a switchdev driver writer in the future. For example, the first thing we can hook into the explicit switchdev offloading API calls are the switchdev object and FDB replay helpers. So far, these have only been used by DSA in "pull" mode (where the driver must ask for them). Adding the replay helpers to other drivers involves a lot of repetition. But by moving the helpers inside the bridge port offload/unoffload hook points, we can move the entire replay process to "push" mode (where the bridge provides them automatically). The explicit switchdev offloading API will see further extensions in the future. The patches were split from a larger series for easier review: https://patchwork.kernel.org/project/netdevbpf/cover/20210718214434.3938850-1-vladimir.oltean@nxp.com/ Tobias Waldekranz (2): net: bridge: disambiguate offload_fwd_mark net: bridge: switchdev: recycle unused hwdoms Vladimir Oltean (8): net: dpaa2-switch: use extack in dpaa2_switch_port_bridge_join net: dpaa2-switch: refactor prechangeupper sanity checks mlxsw: spectrum: refactor prechangeupper sanity checks mlxsw: spectrum: refactor leaving an 8021q upper that is a bridge port net: marvell: prestera: refactor prechangeupper sanity checks net: switchdev: guard drivers against multiple obj replays on same bridge port net: bridge: switchdev: let drivers inform which bridge ports are offloaded net: bridge: switchdev object replay helpers for everybody .../ethernet/freescale/dpaa2/dpaa2-switch.c | 69 +++- .../ethernet/marvell/prestera/prestera_main.c | 99 +++-- .../marvell/prestera/prestera_switchdev.c | 42 ++- .../marvell/prestera/prestera_switchdev.h | 7 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 347 ++++++++++++------ .../net/ethernet/mellanox/mlxsw/spectrum.h | 4 + .../mellanox/mlxsw/spectrum_switchdev.c | 28 +- .../microchip/sparx5/sparx5_switchdev.c | 48 ++- drivers/net/ethernet/mscc/ocelot_net.c | 115 ++++-- drivers/net/ethernet/rocker/rocker.h | 9 +- drivers/net/ethernet/rocker/rocker_main.c | 34 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 42 ++- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 34 +- drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 14 +- drivers/net/ethernet/ti/am65-cpsw-switchdev.h | 3 + drivers/net/ethernet/ti/cpsw_new.c | 32 +- drivers/net/ethernet/ti/cpsw_switchdev.c | 4 +- drivers/net/ethernet/ti/cpsw_switchdev.h | 3 + include/linux/if_bridge.h | 60 +-- net/bridge/br_fdb.c | 1 - net/bridge/br_if.c | 11 +- net/bridge/br_mdb.c | 1 - net/bridge/br_private.h | 61 ++- net/bridge/br_switchdev.c | 254 +++++++++++-- net/bridge/br_vlan.c | 1 - net/dsa/port.c | 83 ++--- 26 files changed, 1059 insertions(+), 347 deletions(-) -- 2.25.1
next reply other threads:[~2021-07-20 13:53 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-20 13:46 Vladimir Oltean [this message] 2021-07-20 13:46 ` [Bridge] [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 ` [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 2021-07-20 19:47 ` [Bridge] " 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=20210720134655.892334-1-vladimir.oltean@nxp.com \ --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: linkBe 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.