Commit 4139d4b5 authored by Horatiu Vultur's avatar Horatiu Vultur Committed by David S. Miller

bridge: mrp: Add br_mrp_in_port_open function

This function notifies the userspace when the node lost the continuity
of MRP_InTest frames.
Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4cc625c6
...@@ -389,3 +389,25 @@ int br_mrp_ring_port_open(struct net_device *dev, u8 loc) ...@@ -389,3 +389,25 @@ int br_mrp_ring_port_open(struct net_device *dev, u8 loc)
out: out:
return err; return err;
} }
int br_mrp_in_port_open(struct net_device *dev, u8 loc)
{
struct net_bridge_port *p;
int err = 0;
p = br_port_get_rcu(dev);
if (!p) {
err = -EINVAL;
goto out;
}
if (loc)
p->flags |= BR_MRP_LOST_IN_CONT;
else
p->flags &= ~BR_MRP_LOST_IN_CONT;
br_ifinfo_notify(RTM_NEWLINK, NULL, p);
out:
return err;
}
...@@ -75,5 +75,6 @@ int br_mrp_port_switchdev_set_role(struct net_bridge_port *p, ...@@ -75,5 +75,6 @@ int br_mrp_port_switchdev_set_role(struct net_bridge_port *p,
/* br_mrp_netlink.c */ /* br_mrp_netlink.c */
int br_mrp_ring_port_open(struct net_device *dev, u8 loc); int br_mrp_ring_port_open(struct net_device *dev, u8 loc);
int br_mrp_in_port_open(struct net_device *dev, u8 loc);
#endif /* _BR_PRIVATE_MRP_H */ #endif /* _BR_PRIVATE_MRP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment