diff options
author | George McCollister <george.mccollister@gmail.com> | 2021-02-09 19:02:13 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-11 13:24:45 -0800 |
commit | bd62e6f5e6a98f1657cf9c3b632bdb7a2e78d42c (patch) | |
tree | c210fb880d9545fa47541eba077bf7671e09a8c3 /net/dsa | |
parent | 18596f504a3e56c4f8e132b2a437cbe23a3f4635 (diff) | |
download | linux-bd62e6f5e6a98f1657cf9c3b632bdb7a2e78d42c.tar.bz2 |
net: dsa: xrs700x: add HSR offloading support
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>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/tag_xrs700x.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dsa/tag_xrs700x.c b/net/dsa/tag_xrs700x.c index db0ed1a5fcb7..858cdf9d2913 100644 --- a/net/dsa/tag_xrs700x.c +++ b/net/dsa/tag_xrs700x.c @@ -11,12 +11,17 @@ static struct sk_buff *xrs700x_xmit(struct sk_buff *skb, struct net_device *dev) { - struct dsa_port *dp = dsa_slave_to_port(dev); + struct dsa_port *partner, *dp = dsa_slave_to_port(dev); u8 *trailer; trailer = skb_put(skb, 1); trailer[0] = BIT(dp->index); + if (dp->hsr_dev) + dsa_hsr_foreach_port(partner, dp->ds, dp->hsr_dev) + if (partner != dp) + trailer[0] |= BIT(partner->index); + return skb; } |