]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 14 Jul 2020 07:34:58 +0000 (09:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 20:46:43 +0000 (13:46 -0700)
This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which
allows to notify the userspace when the node lost the contiuity of
MRP_InTest frames.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_link.h
net/bridge/br_netlink.c
tools/include/uapi/linux/if_link.h

index cc185a007ade8b7e9b01e165afc1d72be49b4291..26842ffd0501df3070c2655bfd22f700ee153454 100644 (file)
@@ -344,6 +344,7 @@ enum {
        IFLA_BRPORT_ISOLATED,
        IFLA_BRPORT_BACKUP_PORT,
        IFLA_BRPORT_MRP_RING_OPEN,
+       IFLA_BRPORT_MRP_IN_OPEN,
        __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
index c532fa65c983403ea19a6d84fee06085d8de4cea..147d52596e1741582c451c6aba479d039c6d3d9a 100644 (file)
@@ -152,6 +152,7 @@ static inline size_t br_port_info_size(void)
 #endif
                + nla_total_size(sizeof(u16))   /* IFLA_BRPORT_GROUP_FWD_MASK */
                + nla_total_size(sizeof(u8))    /* IFLA_BRPORT_MRP_RING_OPEN */
+               + nla_total_size(sizeof(u8))    /* IFLA_BRPORT_MRP_IN_OPEN */
                + 0;
 }
 
@@ -216,6 +217,8 @@ static int br_port_fill_attrs(struct sk_buff *skb,
                       !!(p->flags & BR_NEIGH_SUPPRESS)) ||
            nla_put_u8(skb, IFLA_BRPORT_MRP_RING_OPEN, !!(p->flags &
                                                          BR_MRP_LOST_CONT)) ||
+           nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN,
+                      !!(p->flags & BR_MRP_LOST_IN_CONT)) ||
            nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED)))
                return -EMSGSIZE;
 
index cafedbbfefbe9821491564e7759455776f0199a3..781e482dc499f9284be281c135bcdcef75b7166c 100644 (file)
@@ -344,6 +344,7 @@ enum {
        IFLA_BRPORT_ISOLATED,
        IFLA_BRPORT_BACKUP_PORT,
        IFLA_BRPORT_MRP_RING_OPEN,
+       IFLA_BRPORT_MRP_IN_OPEN,
        __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)