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.8 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=ham 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 BE69DC433E0 for ; Wed, 1 Jul 2020 07:22:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B1202070C for ; Wed, 1 Jul 2020 07:22:59 +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="EHU3aOGw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728206AbgGAHW6 (ORCPT ); Wed, 1 Jul 2020 03:22:58 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:56476 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727988AbgGAHW5 (ORCPT ); Wed, 1 Jul 2020 03:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1593588177; x=1625124177; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CBHDKe17OWh23IN1qsZyil4P/7Q7BPKQEEmOkyRy9rQ=; b=EHU3aOGwy0iW7wTOtGalCReQ5DDrwkJhXEBaAFz8kcTX0ty7CuqtSjZl ZVuNHCAdn78hj4l1WHkILZTWxtJSjDfK//40PVEJsl/PyRmCh6PEFzAu7 7T8UJSZgLP06YNs/EOVIoNSGUSdJXaCskrJ47HEzw+EcI6mONtuGPnwfV qEK783/Oyzyk68qYP/uBmvIyqmYdREhyj6tADZdMuMnN3XEiLKd9rJZgN 5xdsmDw1UGHQpldQ5ophIf1UOsKqiCacIaC6KYwHCYK0yPsHNSMm/Cgy5 jEDVITsSuNcyxOB2XwFp8dBsy7unfkkCwt+/3HFTo9J+K8Wmljz+zpTWO w==; IronPort-SDR: QqoPxg0EgPGqqdocuqXP5m66iAZHmny9SfYaaSKRCBy7c6YfDbFRGrEMZtz2MsyRzpsfT47AUW hoZ90Ngt5Z10/mCD58kzCE7HpGoXdugYQSL/xGkd8PaMEvPT0Jxx6kPLmvi7zUEBSOe38wgmQd 4MDn0s9rg9GEoyR7OIRmmympwo8ThSBxFMIWJfDcGetlAbMLYttbGGlpqecTQ21JiyGFbJd8ZC 35kRIpt8v2GhnDBdXaZZs7KDOXceM4XcsWkmGpMa5WdzpU8eir+GakxlPe/bBAwNi1KUuUAhyj VA0= X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="81498683" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Jul 2020 00:22:56 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 1 Jul 2020 00:22:54 -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; Wed, 1 Jul 2020 00:22:33 -0700 From: Horatiu Vultur To: , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next v2 1/3] bridge: uapi: mrp: Extend MRP attributes to get the status Date: Wed, 1 Jul 2020 09:22:37 +0200 Message-ID: <20200701072239.520807-2-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200701072239.520807-1-horatiu.vultur@microchip.com> References: <20200701072239.520807-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add MRP attribute IFLA_BRIDGE_MRP_INFO to allow the userspace to get the current state of the MRP instances. This is a nested attribute that contains other attributes like, ring id, index of primary and secondary port, priority, ring state, ring role. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_bridge.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index caa6914a3e53a..c114c1c2bd533 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h @@ -166,6 +166,7 @@ enum { IFLA_BRIDGE_MRP_RING_STATE, IFLA_BRIDGE_MRP_RING_ROLE, IFLA_BRIDGE_MRP_START_TEST, + IFLA_BRIDGE_MRP_INFO, __IFLA_BRIDGE_MRP_MAX, }; @@ -228,6 +229,22 @@ enum { #define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1) +enum { + IFLA_BRIDGE_MRP_INFO_UNSPEC, + IFLA_BRIDGE_MRP_INFO_RING_ID, + IFLA_BRIDGE_MRP_INFO_P_IFINDEX, + IFLA_BRIDGE_MRP_INFO_S_IFINDEX, + IFLA_BRIDGE_MRP_INFO_PRIO, + IFLA_BRIDGE_MRP_INFO_RING_STATE, + IFLA_BRIDGE_MRP_INFO_RING_ROLE, + IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL, + IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS, + IFLA_BRIDGE_MRP_INFO_TEST_MONITOR, + __IFLA_BRIDGE_MRP_INFO_MAX, +}; + +#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1) + struct br_mrp_instance { __u32 ring_id; __u32 p_ifindex; -- 2.27.0