From: Florian Fainelli <f.fainelli@gmail.com>
To: George McCollister <george.mccollister@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Tobias Waldekranz <tobias@waldekranz.com>,
Jonathan Corbet <corbet@lwn.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/4] net: dsa: xrs700x: add HSR offloading support
Date: Tue, 9 Feb 2021 20:11:15 -0800 [thread overview]
Message-ID: <f5b361ec-c8a1-22b7-42b3-94fbe4387525@gmail.com> (raw)
In-Reply-To: <20210210010213.27553-5-george.mccollister@gmail.com>
On 2/9/2021 5:02 PM, George McCollister wrote:
> Add offloading for HSR/PRP (IEC 62439-3) tag insertion, tag removal
> forwarding and duplication supported by the xrs7000 series switches.
>
> Only HSR v1 and PRP v1 are supported by the xrs7000 series switches (HSR
> v0 is not).
>
> Signed-off-by: George McCollister <george.mccollister@gmail.com>
> ---
[snip]
> + val &= ~BIT(dsa_upstream_port(ds, port));
> + regmap_write(priv->regmap, XRS_PORT_FWD_MASK(partner->index), val);
> + regmap_write(priv->regmap, XRS_PORT_FWD_MASK(port), val);
> +
> + regmap_fields_write(priv->ps_forward, partner->index,
> + XRS_PORT_FORWARDING);
> + regmap_fields_write(priv->ps_forward, port, XRS_PORT_FORWARDING);
> +
> + hsr_pair[0] = port;
> + hsr_pair[1] = partner->index;
> + for (i = 0; i < ARRAY_SIZE(hsr_pair); i++) {
> + slave = dsa_to_port(ds, hsr_pair[i])->slave;
> + slave->features |= XRS7000X_SUPPORTED_HSR_FEATURES;
It's a bit weird to change the supported features while joining, usually
you set them ahead of time to indicate what you are capable of doing and
those can get toggled by user-space to enable/disable said feature, I
suppose the goal here is to influence the HSR data path's decisions to
insert or not tags so this may be okay. This does beg several questions:
- should slave->vlan_features also include that feature set somehow (can
I have a VLAN upper?)
- should there be a notifier running to advertise NETDEV_FEAT_CHANGE?
--
Florian
next prev parent reply other threads:[~2021-02-10 4:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 1:02 [PATCH net-next v3 0/4] add HSR offloading support for DSA switches George McCollister
2021-02-10 1:02 ` [PATCH net-next v3 1/4] net: hsr: generate supervision frame without HSR/PRP tag George McCollister
2021-02-10 9:33 ` Vladimir Oltean
2021-02-10 1:02 ` [PATCH net-next v3 2/4] net: hsr: add offloading support George McCollister
2021-02-10 9:37 ` Vladimir Oltean
2021-02-10 1:02 ` [PATCH net-next v3 3/4] net: dsa: add support for offloading HSR George McCollister
2021-02-10 4:04 ` Florian Fainelli
2021-02-10 9:44 ` Vladimir Oltean
2021-02-10 1:02 ` [PATCH net-next v3 4/4] net: dsa: xrs700x: add HSR offloading support George McCollister
2021-02-10 4:11 ` Florian Fainelli [this message]
2021-02-10 9:49 ` Vladimir Oltean
2021-02-11 22:00 ` [PATCH net-next v3 0/4] add HSR offloading support for DSA switches 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=f5b361ec-c8a1-22b7-42b3-94fbe4387525@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=george.mccollister@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--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.