]> git.baikalelectronics.ru Git - kernel.git/commit
switchdev: mrp: Extend ring_role_mrp and in_role_mrp
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 16 Feb 2021 21:41:59 +0000 (22:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2021 22:47:46 +0000 (14:47 -0800)
commit131001b4a523eae0382b327014f0580efc3566fe
tree68a30b75210526942868ce93e3a6e5e67663027d
parent36f2085280ad4b3d8c53c6e713919c42a15d09f4
switchdev: mrp: Extend ring_role_mrp and in_role_mrp

Add the member sw_backup to the structures switchdev_obj_ring_role_mrp
and switchdev_obj_in_role_mrp. In this way the SW can call the driver in
2 ways, once when sw_backup is set to false, meaning that the driver
should implement this completely in HW. And if that is not supported the
SW will call again but with sw_backup set to true, meaning that the
HW should help or allow the SW to run the protocol.

For example when role is MRM, if the HW can't detect when it stops
receiving MRP Test frames but it can trap these frames to CPU, then it
needs to return -EOPNOTSUPP when sw_backup is false and return 0 when
sw_backup is true.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h