Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1488696ybl; Sat, 25 Jan 2020 01:45:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwIix1n2oSSul+KLB37PajkBu2cVCGVknQajXkYbh2TvmFGrHtR85A09uY/DReFcOAu0u5Z X-Received: by 2002:a05:6830:451:: with SMTP id d17mr5563396otc.53.1579945550030; Sat, 25 Jan 2020 01:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579945550; cv=none; d=google.com; s=arc-20160816; b=XdtXKObP3aBEwytPXGyMz7D/cTYtaeBJH4MMOCj05OzzHoK2exiDfJ6S0f5UMUh4gX jpUJ7zQelnRGGbJ5XuNeZnRCl0U4aErBb+egLfB4UP1I1x7iEGEw9oE6UN05Uz36x0Xj wCBMb3e8NhuNWhQs2+9zghG1tocGrSQJHpN9sdYxx7rpMk3JM2C2k9rrXdPuRT/idmgb jDHsIMsGS3KcKSiv0Rk8H0Y/gncTuO/pBYgDl8aKlCcTHHNSePg3QO5D5TQ/+1U/5W9F SI+JPRgwz2kEaS9mCUjAXczApXN9FwHYfAJj7MFGOXauqbN447Zfqorv8lxLbtnTWNX1 ANEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr; bh=DxCDMRis4St8y03z0sYqMVixw7qRCx8WUY4sx2XuatM=; b=1F9rglc1h+5wihQeYbSSOdWPCeg+jZOUgTITdd24QmGIoqoLF7PqRUU5/UFDe1YvlV KOejo0JOPCWyfZTsgthHxtB+oJst8IOJBI9Z8SGsfoFm549o5CvOqtkmjRnuZ0fInLR/ RiEAZ/zxBOroWsdY34z2LGtx05eM51+4FxTGZEs1tbzrWe4bCP9N+JVKsUgjz5rNP8qH Moyed0wj2q2zpv+CffTjkQYpJ5z2nCjzzlPkX965DEzql8duDVgSiFgxOLjGPve6NvOF ZAmG4srM7mR0t8IQ4XNnNkGv0FU8NpgDPXqrhXmj1JAay4GycS6yGMMFKuFot9MSB7FK o9LQ== 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=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si4039575oth.158.2020.01.25.01.45.38; Sat, 25 Jan 2020 01:45:50 -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=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728921AbgAYJop (ORCPT + 99 others); Sat, 25 Jan 2020 04:44:45 -0500 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:28090 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgAYJop (ORCPT ); Sat, 25 Jan 2020 04:44:45 -0500 Received-SPF: Pass (esa1.microchip.iphmx.com: domain of Allan.Nielsen@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Allan.Nielsen@microchip.com"; x-sender="Allan.Nielsen@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa1.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Allan.Nielsen@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa1.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Allan.Nielsen@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: Lh8yQdurjZs3o4O+e1/dtVa3BU0CKjyydNPB9yKjf1W8sczquG1tAKVRK4NEVTHAg9xZpFyfVZ 1kWOVQ/R4AvqpBwmRBiXRp8aZ8YMC52EQnCeVzlploxuH4d6AMpucNDD4wT6Om8JPlPXrfhref 976JLtYHUUpDzBaKv8eri0e5ik21ncAlgEP95gwSCvLxnDAQn9cvO9ZY0dRWGjZUSDyRIx1ky2 WGwtVA4T/SyLNZn+x2bhgafjr9WwQLpcNPQNZ6l1oPaFWb3tgqxCor66MU/cH30AFPJ3In9N0E ADQ= X-IronPort-AV: E=Sophos;i="5.70,361,1574146800"; d="scan'208";a="65983634" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jan 2020 02:44:42 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) 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.1713.5; Sat, 25 Jan 2020 02:44:43 -0700 Received: from localhost (10.10.85.251) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Sat, 25 Jan 2020 02:44:42 -0700 Date: Sat, 25 Jan 2020 10:44:41 +0100 From: "Allan W. Nielsen" To: Vinicius Costa Gomes CC: Horatiu Vultur , , , , , , , , , , , , , Subject: Re: [RFC net-next v3 00/10] net: bridge: mrp: Add support for Media Redundancy Protocol (MRP) Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Disposition: inline In-Reply-To: <87zhecimza.fsf@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. >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). /Allan