From: Tobias Waldekranz <tobias@waldekranz.com>
To: Vladimir Oltean <olteanv@gmail.com>, netdev@vger.kernel.org
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>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH v2 net-next 08/12] Documentation: networking: dsa: add paragraph for the LAG offload
Date: Tue, 16 Mar 2021 19:04:56 +0100 [thread overview]
Message-ID: <875z1rotyv.fsf@waldekranz.com> (raw)
In-Reply-To: <20210316112419.1304230-9-olteanv@gmail.com>
On Tue, Mar 16, 2021 at 13:24, Vladimir Oltean <olteanv@gmail.com> wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> Add a short summary of the methods that a driver writer must implement
> for offloading a link aggregation group, and what is still missing.
>
> Cc: Tobias Waldekranz <tobias@waldekranz.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com>
> Documentation/networking/dsa/dsa.rst | 33 ++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/Documentation/networking/dsa/dsa.rst b/Documentation/networking/dsa/dsa.rst
> index af604fe976b3..e8576e81735c 100644
> --- a/Documentation/networking/dsa/dsa.rst
> +++ b/Documentation/networking/dsa/dsa.rst
> @@ -724,6 +724,39 @@ Bridge VLAN filtering
> function that the driver has to call for each MAC address known to be behind
> the given port. A switchdev object is used to carry the VID and MDB info.
>
> +Link aggregation
> +----------------
> +
> +Link aggregation is implemented in the Linux networking stack by the bonding
> +and team drivers, which are modeled as virtual, stackable network interfaces.
> +DSA is capable of offloading a link aggregation group (LAG) to hardware that
> +supports the feature, and supports bridging between physical ports and LAGs,
> +as well as between LAGs. A bonding/team interface which holds multiple physical
> +ports constitutes a logical port, although DSA has no explicit concept of a
> +logical port at the moment. Due to this, events where a LAG joins/leaves a
> +bridge are treated as if all individual physical ports that are members of that
> +LAG join/leave the bridge. Switchdev port attributes (VLAN filtering, STP
> +state, etc) and objects (VLANs, MDB entries) offloaded to a LAG as bridge port
> +are treated similarly: DSA offloads the same switchdev object / port attribute
> +on all members of the LAG. Static bridge FDB entries on a LAG are not yet
> +supported, since the DSA driver API does not have the concept of a logical port
> +ID.
> +
> +- ``port_lag_join``: function invoked when a given switch port is added to a
> + LAG. The driver may return ``-EOPNOTSUPP``, and in this case, DSA will fall
> + back to a software implementation where all traffic from this port is sent to
> + the CPU.
> +- ``port_lag_leave``: function invoked when a given switch port leaves a LAG
> + and returns to operation as a standalone port.
> +- ``port_lag_change``: function invoked when the link state of any member of
> + the LAG changes, and the hashing function needs rebalancing to only make use
> + of the subset of physical LAG member ports that are up.
> +
> +Drivers that benefit from having an ID associated with each offloaded LAG
> +can optionally populate ``ds->num_lag_ids`` from the ``dsa_switch_ops::setup``
> +method. The LAG ID associated with a bonding/team interface can then be
> +retrieved by a DSA switch driver using the ``dsa_lag_id`` function.
> +
> TODO
> ====
>
> --
> 2.25.1
next prev parent reply other threads:[~2021-03-16 18:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 11:24 [PATCH v2 net-next 00/12] Documentation updates for switchdev and DSA Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 01/12] Documentation: networking: update the graphical representation Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 02/12] Documentation: networking: dsa: rewrite chapter about tagging protocol Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 03/12] Documentation: networking: dsa: remove static port count from limitations Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 04/12] Documentation: networking: dsa: remove references to switchdev prepare/commit Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 05/12] Documentation: networking: dsa: remove TODO about porting more vendor drivers Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 06/12] Documentation: networking: dsa: document the port_bridge_flags method Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 07/12] Documentation: networking: dsa: mention integration with devlink Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 08/12] Documentation: networking: dsa: add paragraph for the LAG offload Vladimir Oltean
2021-03-16 18:04 ` Tobias Waldekranz [this message]
2021-03-16 11:24 ` [PATCH v2 net-next 09/12] Documentation: networking: dsa: add paragraph for the MRP offload Vladimir Oltean
2021-03-16 15:12 ` Horatiu Vultur
2021-03-16 11:24 ` [PATCH v2 net-next 10/12] Documentation: networking: dsa: add paragraph for the HSR/PRP offload Vladimir Oltean
2021-03-16 11:24 ` [PATCH v2 net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior Vladimir Oltean
2021-03-16 14:01 ` Ido Schimmel
2021-03-16 14:04 ` Vladimir Oltean
2021-03-16 14:13 ` Ido Schimmel
2021-03-16 11:24 ` [PATCH v2 net-next 12/12] Documentation: networking: switchdev: fix command for static FDB entries Vladimir Oltean
2021-03-16 14:04 ` Ido Schimmel
2021-03-16 22:20 ` [PATCH v2 net-next 00/12] Documentation updates for switchdev and DSA patchwork-bot+netdevbpf
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=875z1rotyv.fsf@waldekranz.com \
--to=tobias@waldekranz.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=idosch@idosch.org \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).