Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Horatiu Vultur and committed by
David S. Miller
4fc4871f 559139cb

+18
+18
net/bridge/br_mrp_netlink.c
··· 474 474 p->dev->ifindex)) 475 475 goto nla_put_failure; 476 476 477 + p = rcu_dereference(mrp->i_port); 478 + if (p && nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_I_IFINDEX, 479 + p->dev->ifindex)) 480 + goto nla_put_failure; 481 + 477 482 if (nla_put_u16(skb, IFLA_BRIDGE_MRP_INFO_PRIO, 478 483 mrp->prio)) 479 484 goto nla_put_failure; ··· 496 491 goto nla_put_failure; 497 492 if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_TEST_MONITOR, 498 493 mrp->test_monitor)) 494 + goto nla_put_failure; 495 + 496 + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_STATE, 497 + mrp->in_state)) 498 + goto nla_put_failure; 499 + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_ROLE, 500 + mrp->in_role)) 501 + goto nla_put_failure; 502 + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL, 503 + mrp->in_test_interval)) 504 + goto nla_put_failure; 505 + if (nla_put_u32(skb, IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS, 506 + mrp->in_test_max_miss)) 499 507 goto nla_put_failure; 500 508 501 509 nla_nest_end(skb, tb);