]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bridge: mrp: Add 'enum br_mrp_hw_support'
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 16 Feb 2021 21:42:00 +0000 (22:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2021 22:47:46 +0000 (14:47 -0800)
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev
functions to allow the SW to detect the cases where HW can't implement
the functionality or when SW is used as a backup.

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

index 2514954c14316c00c5cb2a1e2dd0f49f3ccadc25..966444304c38f456cc19ec031b7047e75c8c9f6e 100644 (file)
@@ -46,6 +46,20 @@ struct br_mrp {
        struct rcu_head                 rcu;
 };
 
+/* This type is returned by br_mrp_switchdev functions that allow to have a SW
+ * backup in case the HW can't implement completely the protocol.
+ * BR_MRP_NONE - means the HW can't run at all the protocol, so the SW stops
+ *               configuring the node anymore.
+ * BR_MRP_SW - the HW can help the SW to run the protocol, by redirecting MRP
+ *             frames to CPU.
+ * BR_MRP_HW - the HW can implement completely the protocol.
+ */
+enum br_mrp_hw_support {
+       BR_MRP_NONE,
+       BR_MRP_SW,
+       BR_MRP_HW,
+};
+
 /* br_mrp.c */
 int br_mrp_add(struct net_bridge *br, struct br_mrp_instance *instance);
 int br_mrp_del(struct net_bridge *br, struct br_mrp_instance *instance);