From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87A7EC433E0 for ; Mon, 6 Jul 2020 09:21:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 655682075B for ; Mon, 6 Jul 2020 09:21:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Lw37nI5S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728996AbgGFJVX (ORCPT ); Mon, 6 Jul 2020 05:21:23 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:16717 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728976AbgGFJVU (ORCPT ); Mon, 6 Jul 2020 05:21:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1594027280; x=1625563280; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HVKMV+YoS0rvNMp387sg/5WAHdCOziofqNB5E+Ov/pE=; b=Lw37nI5SnVgqKxtcI5/MnBl3bWULGJpo4R5YKwxgVSFL36BmHK9oU0IW mROtexuVemQIXa0hSNpadKvoa4vH5NTH8p/V9jWnd26xy5dKGQmWsb4HF bCwhfvXe7zRCJZF8vC22XAm8+fQZbcTC38l1ew1hkF3XBPVn4qSIIPIKN RFZuEZfrcTh03isOHQKHCxEcVLn7ectyXLlcFZ+vuloQGb/WUvT4FAVMc tujW4WirXPdvaRWWGlO/B+HPR+UCtCM78k8NXalDBzTkblqFjImze9X9I g1SO3P3s2zeHg6npqjODLi1EiZUqyUlx2aVHdL7k9bbv2lh2rTHen9zn3 w==; IronPort-SDR: 9VmU2y4nvdke+9LxY4xe6886CYWVbAmcUdf99t3/EY6dPnsbumqxRxHalgF2vEmfxFx7cFPUtD Mz0yuAVWzxtsMpYOsKRPJhggZJ6kSjkRWddQOqufb8m0cbZf4Z7m/23DrzpUK8oCoh2QARAVU+ ORttA8ZAKcM7bH8w9exyAv6GGn1Ln7LtFkQXmNcqaLgSW17BCWAnxLVzjMAjV1eURuFesjQk5x i8/ilVncl6pAwiq+HQwJ9yKMowhWUcHsiNOniysT/34obtgbgqLgdaKNNX6k5599pWK/JwExH9 ON0= X-IronPort-AV: E=Sophos;i="5.75,318,1589266800"; d="scan'208";a="18109045" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Jul 2020 02:21:20 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 6 Jul 2020 02:21:19 -0700 Received: from soft-dev3.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Mon, 6 Jul 2020 02:20:53 -0700 From: Horatiu Vultur To: , , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next 11/12] bridge: mrp: Extend br_mrp_fill_info Date: Mon, 6 Jul 2020 11:18:41 +0200 Message-ID: <20200706091842.3324565-12-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200706091842.3324565-1-horatiu.vultur@microchip.com> References: <20200706091842.3324565-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch extends the function br_mrp_fill_info to return also the status for the interconnect ring. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_netlink.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/net/bridge/br_mrp_netlink.c b/net/bridge/br_mrp_netlink.c index a006e0771e8d3..2a2fdf3500c5b 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); -- 2.27.0