Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1450793ybm; Sat, 30 May 2020 09:13:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlK3rB25AxjnYRTNSwUj3/XYEVk2uIQmFquZLWRvuD/Yg0Fd7D3VkcbCGBttaXCKL+PADM X-Received: by 2002:aa7:cd6d:: with SMTP id ca13mr5721736edb.280.1590855202062; Sat, 30 May 2020 09:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590855202; cv=none; d=google.com; s=arc-20160816; b=y/TLMA4F5ptbXOWKDcDkmAjTmuhZ9Fn+OMk8rObFCO4iRnyKM7SJFPeqPpsytzv1Dr hQWB5u7Y5rptBMBmXJHnZDCTza7sWRHb4w8cyLSOrkI4iKJhqe9yRfSBFDafP6WSsQvb txMWXipYmb9LJNODb/fzjrflh3WQ1a2lEjFIeAcKeMqDHNsTiN6FcUWVfkl0qvHsJx08 ieqRhMPb2fwpYdYwBZU2mJOL7zX2iV0qt2rqU0CWZvPjry7h8dxVzXzLPsZcqOS09BZz yQ4mIExyJcsTHFLMIbk9Za3SCTdYjmYNn13nLwIWQmKxnG0oEPlqYdKItI2iVISzSS9+ N7DA== 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=FxfgxPKfFyKnL6xN9hCXK0sD8haEFhLb1gXNt6MToNA=; b=B5foTmSPMnb2a0wa/SOlzer1B421cuvGCEE5wnPpYSAia17Bmbzbu5X2nIHa4Xizwb 1AaLrv4vPd7/XQtl7adgLHmIgZpDUbttcEjwT3UVkl15Id6cGQyqdq+ZIivCYz9+8MQg 41gUPgS4U1Jm7w1oM+Ok2FaOAQkp1wYt1oSKof63j212XHXCY8fglbmdqwSmzKQ0/Pb1 Te27KL1jXjo+pv4MzLWRJxtysYma2XlkBGh9ntMzJJt9Sz1XcneDx/lscYlFIlyQZiUV nJjjUyATx6dCn8dhaNTw9LmNaexKXg8BemvaqFv6OKvOZgSCSmmQKKc+WS7UxatMGX56 wWCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b="lhM9/r2E"; 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=NONE sp=NONE 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 l20si7901662eji.236.2020.05.30.09.12.59; Sat, 30 May 2020 09:13:22 -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="lhM9/r2E"; 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=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729171AbgE3QLP (ORCPT + 99 others); Sat, 30 May 2020 12:11:15 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:17600 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728927AbgE3QLP (ORCPT ); Sat, 30 May 2020 12:11:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1590855074; x=1622391074; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LsWUZ3Vo3pgKdES5u3EIGHNrOLkQ2RbU+615OKxy1SI=; b=lhM9/r2Evgd8QeUnu16sOAsS2KEk5frSnSP9GchJBwYMyF/It+8K/d96 zXBTvvpbgIwnFW5Pzz4V0Ny4fUn6Oc69h68SW8Kct1mae9+lbFnR18TVk OoHH2Kb8eKlOFYQ7hrc1q1jm9nQWt+12XQYF7q/h63SmO1NlyjDJ3eDmy nglCuoYO1Q/eRc/0Y7Rrh7lqugkdVUIJflWLtvnhzSanezVRP/Mn3BhWg 485bGnrA2LkUHxd03XrIUpjNvvET45XPwJ8zaffmkb6ccI/1bVfLbkKQy iHhZAbmAJKyGPvyvuDVaZA7l9hoBkJlgqPngVQ3GSm5CBFSAeK8+GMhTT Q==; IronPort-SDR: OqdrAnuviwCfZhiovI71506kcNq/dYqCBphoRNrogKqCaaACKhPD8eT+lm/RbeIi3TEyfP3ZbI e04xCbsgD7g4fYflzOWfgZbZnVifc/GBjVPcYeyt29BOTqOCTS844m39pnhaPsN1iTN1G52PYr Z7lnK3dJ3HlyqEme3xwL3XgcA28/QpQazrqnfXK8Jr6xg663ldDu7ccJF5j/qQoQKDujoTm2oZ r3H2aMcnb79bM5oUfyAIEcnIxSsuRdtWIyiJM3tz7zkWTbAaPoPj5cnPKzCwd4i3EHDUpFoTN3 KmY= X-IronPort-AV: E=Sophos;i="5.73,452,1583218800"; d="scan'208";a="14047729" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 May 2020 09:11:14 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 30 May 2020 09:11:17 -0700 Received: from soft-dev3.localdomain (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Sat, 30 May 2020 09:11:11 -0700 From: Horatiu Vultur To: , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next v2 0/3] bridge: mrp: Add support for MRA role Date: Sat, 30 May 2020 18:09:45 +0000 Message-ID: <20200530180948.1194569-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.26.2 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 the MRP with the MRA role. A node that has the MRA role can behave as a MRM or as a MRC. In case there are multiple nodes in the topology that has the MRA role then only one node can behave as MRM and all the others need to be have as MRC. The node that has the higher priority(lower value) will behave as MRM. A node that has the MRA role and behaves as MRC, it just needs to forward the MRP_Test frames between the ring ports but also it needs to detect in case it stops receiving MRP_Test frames. In that case it would try to behave as MRM. v2: - add new patch that fixes sparse warnings - fix parsing of prio attribute Horatiu Vultur (3): bridge: mrp: Update MRP frame type bridge: mrp: Set the priority of MRP instance bridge: mrp: Add support for role MRA include/net/switchdev.h | 2 + include/uapi/linux/if_bridge.h | 4 + include/uapi/linux/mrp_bridge.h | 60 ++++++++++++--- net/bridge/br_mrp.c | 128 +++++++++++++++++++++++++++----- net/bridge/br_mrp_netlink.c | 11 +++ net/bridge/br_mrp_switchdev.c | 5 +- net/bridge/br_private_mrp.h | 5 +- 7 files changed, 182 insertions(+), 33 deletions(-) -- 2.26.2