bridge: mrp: Implement LC mode for MRP
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 24 Nov 2020 08:25:25 +0000 (09:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Nov 2020 21:33:35 +0000 (13:33 -0800)
commitbfd042321a7afa769c855c37f2bbe2703dc72ef2
tree49ca55956872c3d1fe42d4961f26947406b9b902
parentf460019b4c9e0389b932e1ca2c01b598c7ae769e
bridge: mrp: Implement LC mode for MRP

Extend MRP to support LC mode(link check) for the interconnect port.
This applies only to the interconnect ring.

Opposite to RC mode(ring check) the LC mode is using CFM frames to
detect when the link goes up or down and based on that the userspace
will need to react.
One advantage of the LC mode over RC mode is that there will be fewer
frames in the normal rings. Because RC mode generates InTest on all
ports while LC mode sends CFM frame only on the interconnect port.

All 4 nodes part of the interconnect ring needs to have the same mode.
And it is not possible to have running LC and RC mode at the same time
on a node.

Whenever the MIM starts it needs to detect the status of the other 3
nodes in the interconnect ring so it would send a frame called
InLinkStatus, on which the clients needs to reply with their link
status.

This patch adds InLinkStatus frame type and extends existing rules on
how to forward this frame.

Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20201124082525.273820-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/mrp_bridge.h
net/bridge/br_mrp.c