Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1273252ybt; Thu, 9 Jul 2020 03:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxEV9grldFd9uQIaQAnmejikiskhJZWMdSkWXPLM1I+qAlIIA9m7LHgbu4dFrpGtxKr/zx X-Received: by 2002:a17:907:7245:: with SMTP id ds5mr58980670ejc.67.1594288934754; Thu, 09 Jul 2020 03:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594288934; cv=none; d=google.com; s=arc-20160816; b=ysOQcTlmPP64Q1sJBz7xoTwKrr5ZkYDbZzFu3ZGgxmPEgMV/iUhSAmSVlxRJJr/f7E UqOKLIK0hkuu5HR/9MoSc1tbpO7NfWxmSW5/O7BgN5zd12LTeBmcDI/zgt01D913yWkj tPRJOmdHyvvvr1NnCPr0BWpUYPd41CPxoUKL1R5DxQLNovIAX6yhPJ7DxigAQRymCTbY sLPaYuxHwuUR7r/RG8/aZhQCZJLb7fZBU69RqvR6MYrOWF9ejhpb/FgBK1toSFLU0pCi zkT48DKXk2KRlu6kvXhcnfv7Sbd3HB2GOvInYLe2CBWlAdOqkqAqGzoyuALvLzDgjCeO zZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=XktQsB155fpIjAFlq+Lu3gO6JKvsTkWC51OBg6EhMhw=; b=E1J1sR4adOioh26BJ8caSSQbWCtv15zHW62CYyrGCQBzjVYrUTXHAmYbuwP8SrUg3a PznlPRBP9uU3LIqH75YQgy7XhLm42OJVsvDpx5l+oAidPm2MMDv+Jxw094Tij5A4dgFW mza+OTYPTusX686YOfafcc6pR2ZWkrYrw/w+n2QTVzjn8clYxKCK7PaOi8iVuIgpFxW6 GaTt3UoDZj0Dy3vEnSdxIF7Afw2NYTSoSwOxulzUTODiFD9QirpVEYDIUJdUHl1kWsbp 6aDWX5RdFktB1qbJFnQ5S0PQo5sWO6cbo3m4JwLh4XrQxaKbE1IQWDDmmQQ4Plqfgzrj rVdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=CqcyMsT3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si1637280eju.393.2020.07.09.03.01.51; Thu, 09 Jul 2020 03:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=CqcyMsT3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbgGIKBd (ORCPT + 99 others); Thu, 9 Jul 2020 06:01:33 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:42139 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgGIKBc (ORCPT ); Thu, 9 Jul 2020 06:01:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1594288891; x=1625824891; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fuqrA3hBx0oUTK0Wob6y9NOyZ1ajsJ7JRJ0RnMkhdjo=; b=CqcyMsT35MTjV4QodYuegZ12fdhoTLMi4HL9MtXoNo0zlf1nGFY2El7w Y56oiBfHBn7V4pO6dcIZ7Nx2VIVadsnmlvEsIyBBtiBf1v/w8YxQ5k3Gj 70zSwCQAYqJSfT0m2qH2f9mPeyjpxdMDEB1MpSNWIe+A2/bHX457NBj4y mF6h+EWJLEGVJujmCHEkGbR+aKLz29wDQdO1y99rJILcuaVebDeM0FNYI SL37q/tqrTRsVC2qJxri7rppjtmErlO31H0IKiJzmkIuNRX1i00V1ej+P 3Fj7rvZPb4moAYHAItG4qsH0jts8oM0KnDrEYOpgRtnZYcp4iLltXCAT1 Q==; IronPort-SDR: 64psNRRJhtW3KqC9wHTgA3Wgo1LJBlHL8RpkY1y+xlNEVkbVG7CPJdElzikMpknXaRgHB+xqNx IxEcpaqyIqFzgD3dAs1jozH681udk11GNr0BdlByVYS9ez/8gouoK1i6F6tlsdAKoYcrQH+BXh FhEplFBUAwyZQHXQcPpkQ8wtXPa3CWc1NAua28GCf3CcKPQgDeXGBS5yCexTM9BOYyJPWxogzP upa33CGIwWBNfpDxmY9EeBJM2l27is+/bNjC+YwziGj67mEqmLunD0woq9xKPk5Cv5wSqeYiPs vGU= X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="79261621" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Jul 2020 03:01:30 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 9 Jul 2020 03:01:04 -0700 Received: from soft-dev3.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 9 Jul 2020 03:01:27 -0700 From: Horatiu Vultur To: , , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next v2 00/12] bridge: mrp: Add support for interconnect ring Date: Thu, 9 Jul 2020 12:00:28 +0200 Message-ID: <20200709100040.554623-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.27.0 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 This patch series extends existing MRP to add support for interconnect ring. An interconnect ring is a ring that connects 2 rings. In this way is possible to connect multiple rings. Each interconnect ring is form of 4 nodes, in which 3 have the role MIC(Media Redundancy Interconnect Client) and one has the role MIM(Media Redundancy Interconnect Manager). All these nodes need to have the same ID and the ID needs to be unique between multiple interconnect rings. And 2 nodes needs to be part of one ring and the other 2 nodes needs to be part of the other ring that is connected. +---------+ | | +----------| MRM |---------------+ | | | | | +---------+ | | | | | | | +--------------+ +-----------------+ | | | | | MRC/MIC |------------------| MRC/MIM | | | | | +--------------+ +-----------------+ | | |Interconnect port |Interconnect port | | | | +--------------+ +-----------------+ | | | | | MRC/MIC |----------------- | MRC/MIC | | | | | +--------------+ +-----------------+ | | | | | +---------+ | | | | | +----------| MRM |----------------+ | | +---------+ Each node in a ring needs to have one of the following ring roles, MRM or MRC. And it can also have an interconnect role like MIM or MIC if it is part of an interconnect ring. In the figure above the MRM doesn't have any interconnect role but the MRC from the top ring have the interconnect roles MIC respectively MIM. Therefore it is not possible for a node to have only an interconnect role. There are 2 ways for interconnect ring to detect when is open or closed: 1. To use CCM frames on the interconnect port to detect when the interconnect link goes down/up. This mode is called LC-mode. 2. To send InTest frames on all 3 ports(2 ring ports and 1 interconnect port) and detect when these frames are received back. This mode is called RC-mode. This patch series adds support only for RC-mode. Where MIM sends InTest frames on all 3 ports and detects when it receives back the InTest. When it receives the InTest it means that the ring is closed so it would set the interconnect port in blocking state. If it stops receiving the InTest frames then it would set the port in forwarding state and it would send InTopo frames. These InTopo frames will be received by MRM nodes and process them. And then the MRM will send Topo frames in the rings so each client will clear its FDB. v2: - rearrange structures not to contain holes - stop sending MRP_InTest frames when the MRP instance is deleted Horatiu Vultur (12): switchdev: mrp: Extend switchdev API for MRP Interconnect bridge: uapi: mrp: Extend MRP attributes for MRP interconnect bridge: mrp: Extend bridge interface bridge: mrp: Extend br_mrp for MRP interconnect bridge: mrp: Rename br_mrp_port_open to br_mrp_ring_port_open bridge: mrp: Add br_mrp_in_port_open function bridge: switchdev: mrp: Extend MRP API for switchdev for MRP Interconnect bridge: mrp: Implement the MRP Interconnect API bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect bridge: uapi: mrp: Extend MRP_INFO attributes for interconnect status bridge: mrp: Extend br_mrp_fill_info net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN include/linux/if_bridge.h | 1 + include/net/switchdev.h | 38 ++ include/uapi/linux/if_bridge.h | 58 ++++ include/uapi/linux/if_link.h | 1 + include/uapi/linux/mrp_bridge.h | 38 ++ net/bridge/br_mrp.c | 537 +++++++++++++++++++++++++++-- net/bridge/br_mrp_netlink.c | 182 +++++++++- net/bridge/br_mrp_switchdev.c | 62 ++++ net/bridge/br_netlink.c | 3 + net/bridge/br_private_mrp.h | 27 +- tools/include/uapi/linux/if_link.h | 1 + 11 files changed, 912 insertions(+), 36 deletions(-) -- 2.27.0