diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2021-02-17 00:41:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-17 01:47:46 +0300 |
commit | c513efa20c5254ef74c4157a03d515abdc46c503 (patch) | |
tree | 68a30b75210526942868ce93e3a6e5e67663027d /include/net | |
parent | 405be6b46b707590f8014d468f4b42f25c6064cb (diff) | |
download | linux-c513efa20c5254ef74c4157a03d515abdc46c503.tar.xz |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/switchdev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 465362d9d063..b7fc7d0f54e2 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -127,6 +127,7 @@ struct switchdev_obj_ring_role_mrp { struct switchdev_obj obj; u8 ring_role; u32 ring_id; + u8 sw_backup; }; #define SWITCHDEV_OBJ_RING_ROLE_MRP(OBJ) \ @@ -161,6 +162,7 @@ struct switchdev_obj_in_role_mrp { u32 ring_id; u16 in_id; u8 in_role; + u8 sw_backup; }; #define SWITCHDEV_OBJ_IN_ROLE_MRP(OBJ) \ |