diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2020-07-14 09:34:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-14 13:46:43 -0700 |
commit | 4fc4871fc2dc91098948e038ac9af7a0d1e3166a (patch) | |
tree | dd0c16757e0e2a78920e4f081477f445d2130995 /net | |
parent | 559139cb0405d38816e5e725adee9000db993235 (diff) | |
download | linux-stable-4fc4871fc2dc91098948e038ac9af7a0d1e3166a.tar.gz linux-stable-4fc4871fc2dc91098948e038ac9af7a0d1e3166a.tar.bz2 linux-stable-4fc4871fc2dc91098948e038ac9af7a0d1e3166a.zip |
bridge: mrp: Extend br_mrp_fill_info
This patch extends the function br_mrp_fill_info to return also the
status for the interconnect ring.
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_mrp_netlink.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/bridge/br_mrp_netlink.c b/net/bridge/br_mrp_netlink.c index a006e0771e8d..2a2fdf3500c5 100644 --- a/net/bridge/br_mrp_netlink.c +++ b/net/bridge/br_mrp_netlink.c @@ -474,6 +474,11 @@ int br_mrp_fill_info(struct sk_buff *skb, struct net_bridge *br) p->dev->ifindex)) goto nla_put_failure; + p = rcu_dereference(mrp->i_port); + if (p && nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_I_IFINDEX, + p->dev->ifindex)) + goto nla_put_failure; + if (nla_put_u16(skb, IFLA_BRIDGE_MRP_INFO_PRIO, mrp->prio)) goto nla_put_failure; @@ -493,6 +498,19 @@ int br_mrp_fill_info(struct sk_buff *skb, struct net_bridge *br) mrp->test_monitor)) goto nla_put_failure; + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_STATE, + mrp->in_state)) + goto nla_put_failure; + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_ROLE, + mrp->in_role)) + goto nla_put_failure; + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL, + mrp->in_test_interval)) + goto nla_put_failure; + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS, + mrp->in_test_max_miss)) + goto nla_put_failure; + nla_nest_end(skb, tb); } nla_nest_end(skb, mrp_tb); |