mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
David S. Miller
parent
18596f504a
commit
bd62e6f5e6
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user