Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1978240ybl; Sat, 25 Jan 2020 13:21:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzjdwB5xipD+H5agHi8tRfGb2+83hy0vPSIzNsBLf0Hcc3jFm2MGsx2CyfsCiEegdzbin5q X-Received: by 2002:aca:2803:: with SMTP id 3mr2132747oix.162.1579987302600; Sat, 25 Jan 2020 13:21:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579987302; cv=none; d=google.com; s=arc-20160816; b=gqxm31O6hsCaCpKTuTdh9HGHrR2o4l4sgWjMd9ByF032FOuTcqVuLICFH/NCUoFksh hOp975j6RJaf2j6EpTlB6UhlZpezbhPi//AGKKgYiKyCxPWlW+/5nD/xWe/MpQBz/+5I 8ZechCN1tSQYK6rjtNPnzOT/SmzetsJK9Bi3splfi0ai2sv+vH3NOAMYVVWZutsg41Ev 8P1o3Pk3ZZxBd9QTiFH0rpyCbbxxYoE9AjmhT2RuwX6MT2ouBLnQ1IOTuMLg7pNvyb44 DxzIUmeDSzzmqaPjUjmNmZ9gjieUdq3J8sEiufdBTsu02BskRznueMQrJ0EzLbtBLA3q ++gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=P/OfnxEZA8coVDIz9RBkNH9RaFPJqbr2R/tBDftW7ZI=; b=WYSnm75giC0Or2LwIgQQlWEgb1d+PwXuvCnhrNBIcpnbbV4qELzDdHVHBuOF6DFzGP kddat7kYN175lLCM1ZrAusfKkLnycVTkCuIw/sO+PY6eC6mIq579w85c3BpFIP1GKlfe B1FV+THLRDahyfFCMVENCEydZi5RCCny9I7Q6wUyw2g3YrG7kyLfwidKumd6ZpQ5Uhlz 3qecsfRMNvrKcIFcu+7UR+wCRn7W6S77BDdDt3NwyrG+eNpO9X8qvUJJ0woRqdZOKuWA 9IKesrl05Rp3nlQPDazc+tfsdPf/WnSqKXWr6PewPDwoGVy87dSYlFpar/HhbXGSuiUb KdqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si4539568oth.182.2020.01.25.13.21.03; Sat, 25 Jan 2020 13:21:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727409AbgAYVSK (ORCPT + 99 others); Sat, 25 Jan 2020 16:18:10 -0500 Received: from mga12.intel.com ([192.55.52.136]:44760 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgAYVSK (ORCPT ); Sat, 25 Jan 2020 16:18:10 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2020 13:18:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,363,1574150400"; d="scan'208";a="428627494" Received: from apricoch-mobl2.amr.corp.intel.com (HELO ellie) ([10.252.137.80]) by fmsmga006.fm.intel.com with ESMTP; 25 Jan 2020 13:18:09 -0800 From: Vinicius Costa Gomes To: "Allan W. Nielsen" Cc: Horatiu Vultur , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, jiri@resnulli.us, ivecera@redhat.com, davem@davemloft.net, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, anirudh.venkataramanan@intel.com, olteanv@gmail.com, andrew@lunn.ch, jeffrey.t.kirsher@intel.com, UNGLinuxDriver@microchip.com Subject: Re: [RFC net-next v3 00/10] net: bridge: mrp: Add support for Media Redundancy Protocol (MRP) In-Reply-To: <20200125094441.kgbw7rdkuleqn23a@lx-anielsen.microsemi.net> References: <20200124161828.12206-1-horatiu.vultur@microchip.com> <20200124203406.2ci7w3w6zzj6yibz@lx-anielsen.microsemi.net> <87zhecimza.fsf@linux.intel.com> <20200125094441.kgbw7rdkuleqn23a@lx-anielsen.microsemi.net> Date: Sat, 25 Jan 2020 13:18:09 -0800 Message-ID: <87imkz1bhq.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, "Allan W. Nielsen" writes: > Hi Vinicius, > > On 24.01.2020 13:05, Vinicius Costa Gomes wrote: >>I have one idea and one question. > > Let me answer the question before dicussing the idea. > >>The question that I have is: what's the relation of IEC 62439-2 to IEEE >>802.1CB? > HSR and 802.1CB (often called FRER - Frame Replication and Elimination > for Reliability) shares a lot of functionallity. It is a while since I > read the 802.1CB standard, and I have only skimmed the HSR standard, but > as far as I understand 802.1CB is a super set of HSR. Also, I have not > studdied the HSR implementation. > > Both HSR and 802.1CB replicate the frame and eliminate the additional > copies. If just 1 of the replicated fraems arrives, then higher layer > applications will not see any traffic lose. > > MRP is different, it is a ring protocol, much more like ERPS defined in > G.8032 by ITU. Also, MRP only make sense in switches, it does not make > sense in a host (like HSR does). > > In MRP, the higher layer application frames are not replicated. They are > send on either 1 port or the other. > > Consider this exaple, with 3 nodes creating a ring. All notes has a br0 > device which includes the 2 NICs. > > +------------------------------------------+ > | | > +-->|H1|<---------->|H2|<---------->|H3|<--+ > eth0 eth1 eth0 eth1 eth0 eth1 > > Lets say that H1 is the manager (MRM), and H2 + H3 is the client (MRC). > > The MRM will now block one of the ports, lets say eth0, to prevent a > loop: > > +------------------------------------------+ > | | > +-->|H1|<---------->|H2|<---------->|H3|<--+ > eth0 eth1 eth0 eth1 eth0 eth1 > ^ > | > Blocked > > > This mean that H1 can reach H2 and H3 via eth1 > This mean that H2 can reach H1 eth0 > This mean that H2 can reach H3 eth1 > This mean that H3 can reach H1 and H2 via eth0 > > This is normal forwarding, doen by the MAC table. > > Lets say that the link between H1 and H2 goes down: > > +------------------------------------------+ > | | > +-->|H1|<--- / --->|H2|<---------->|H3|<--+ > eth0 eth1 eth0 eth1 eth0 eth1 > > H1 will now observe that the test packets it sends on eth1, is not > received in eth0, meaninf that the ring is open, and it will unblock the > eth0 device, and send a message to all the nodes that they need to flush > the mac-table. > > This mean that H1 can reach H2 and H3 via eth0 > This mean that H2 can reach H1 and H3 via eth1 > This mean that H3 can reach H2 eth0 > This mean that H3 can reach H1 eth1 > > In all cases, higher layer application will use the br0 device to send > and receive frames. These higher layer applications will not see any > interruption (except during the few milliseconds it takes to unblock, and > flush the mac tables). > > Sorry for the long explanation, but it is important to understand this > when discussion the design. Not at all, thanks a lot. Now it's clear to me that MRP and 802.1CB are really different beasts, with different use cases/limitations: - MRP: now that we have a ring, let's break the loop, and use the redudancy provided by the ring to detect the problem and "repair" the network if something bad happens; - 802.1CB: now that we have a ring, let's send packets through two different paths, and find a way to discard duplicated ones, so even if something bad happens the packet will reach its destination; (I know that it's more complicated than that in reality :-) > >>The idea is: >> >>'net/hsr' already has a software implementation of the HSR replication >>tag (and some of the handling necessary). So what came to mind is to >>add the necessary switchdev functions to the master HSR device. If >>that's done, then it sounds that the rest will mostly work. > Maybe something could be done here, but it will not help MRP, as they do > not really share any functionality ;-) > >>For the user the flow would be something like: >> - User takes two (or more interfaces) and set them as slaves of the HSR >> master device, say 'hsr0'; >> - 'hsr0' implements some of the switchdev functionality so we can use >> the MRP userspace components on it; > For MRP to work, it really need the bridge interface, and the higher > layer applications needs to use the br0 device. > >>Does it look like something that could work? > It would make much more sense if we discussed implementing 802.1CB in > some form (which we might get to). I see. Agreed. > > /Allan Cheers, -- Vinicius