net: dsa: add support for offloading HSR
authorGeorge McCollister <george.mccollister@gmail.com>
Wed, 10 Feb 2021 01:02:12 +0000 (19:02 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 21:24:45 +0000 (13:24 -0800)
commit18596f504a3e56c4f8e132b2a437cbe23a3f4635
tree18bf5965e76ea12ad2ae722940735d47d0c31134
parentdcf0cd1cc58b8e88793ad6531db9b3a47324ca09
net: dsa: add support for offloading HSR

Add support for offloading of HSR/PRP (IEC 62439-3) tag insertion
tag removal, duplicate generation and forwarding on DSA switches.

Add DSA_NOTIFIER_HSR_JOIN and DSA_NOTIFIER_HSR_LEAVE which trigger calls
to .port_hsr_join and .port_hsr_leave in the DSA driver for the switch.

The DSA switch driver should then set netdev feature flags for the
HSR/PRP operation that it offloads.
    NETIF_F_HW_HSR_TAG_INS
    NETIF_F_HW_HSR_TAG_RM
    NETIF_F_HW_HSR_FWD
    NETIF_F_HW_HSR_DUP

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa_priv.h
net/dsa/port.c
net/dsa/slave.c
net/dsa/switch.c