Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2607670ybb; Mon, 30 Mar 2020 09:22:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsFCvQWZYkfpOl26jzyhJUiTVlvhX6nMBOGN7CXH9NMB/jTYw12Ct3EYjwVqLz7NGXtfV46 X-Received: by 2002:aca:2817:: with SMTP id 23mr66513oix.67.1585585367509; Mon, 30 Mar 2020 09:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585585367; cv=none; d=google.com; s=arc-20160816; b=aD0nSO5vs9yM7UvVXBxdIGDvr4JQrmh9K7H83bwmN62Xq4CJuQXvUVFOY7fB5voOAX Lmn+QX6QF5/glQaS4Dwee+Tl19fiP/cyvk1XphG7smnlx519HO8/0CMt/rsaLukRKEeq 7vb/+w/NY1T256xuB1bZuNlcNrN/uprIp41SPun5ZeOW9dWNSmTDQ3yGobVB5DQwd2DE ke+VG+3PJIGljewO5DktIwnFH3gRwMM30zP9Rq4pC2bfWtwH0bwh4nDjOhR53t6zJ22n En0HtED2WUulzzH99JWPcphgOuTwHSBLBtbb4KrjMvPF3gbNTLOOCQ7gizZckOTdYo64 y07Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=ceRQl/rDBk6AZGZV87hR1KyptG7t3Kf+Og5g8l3kQ9Y=; b=YUR7IwsNpEVC5uSgJRn0cOj5knbz7diHQw7i31YHG3XoMbCu1QHuZoWiIgLhm6r4h/ zeKvvsxKEGDZ4XNywgvojAFT9vSraUE+a4iiN4ry5cFHxXFDhzOFqjR3jmINL9YJb3GW xk2QSN0nrV09xFeiLEYj/ksboNjqpbTLDOVgPWUK0CYB9pMJCi/Bg+Yhw0uzkKhUz7jk k47h9x0xDgwm/prdTB4UKHiWg1LYOdS2SjsYwJxolvNYMOc9Ke3gjZ5lxWHZlrfbVH/G 6/ZJr+aVxDlf18DEEmLye4fP79VjmgmKDrTEeXPlPU6RrjW08MJO8sfi9mbFExT/vdo4 DPBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=EGaNa2JD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si5482303otk.242.2020.03.30.09.22.34; Mon, 30 Mar 2020 09:22:47 -0700 (PDT) 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; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=EGaNa2JD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730088AbgC3QVt (ORCPT + 99 others); Mon, 30 Mar 2020 12:21:49 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42267 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728201AbgC3QVs (ORCPT ); Mon, 30 Mar 2020 12:21:48 -0400 Received: by mail-lf1-f68.google.com with SMTP id s13so3543319lfb.9 for ; Mon, 30 Mar 2020 09:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ceRQl/rDBk6AZGZV87hR1KyptG7t3Kf+Og5g8l3kQ9Y=; b=EGaNa2JDouvflDLK16jMocP/xa7o58nL6cBYI8lu6B771+YtUHoDF+JKGHZXWYU25f KemrpG/1oHZ8O9fbqwGH3f2OkmaxKyHDIcY4/YISPKDIHyUhRIwG5eiK5GmNUU2FxDSb FXbpCOoCuMcMKElQAFnKuh9tEqSgC3NdDhZI8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ceRQl/rDBk6AZGZV87hR1KyptG7t3Kf+Og5g8l3kQ9Y=; b=pACFC+RCsojwBPMbZOa4/Gsn9l8ngmsZJKuGeAmw1yx1aR194w1sLQMDSLBdjEfUn2 GjJH6b9MPIAg7fIn73vKBAHUeHVLxTzmYQqOgd51SMADiV/1oOGy+MPOLgI2MYFb//XC G59T/oDuTxiroFji3eJvG6treUBsxDlNAmtWHuSj7J1eXNwhXYhtudLzoVa8P1+6upLp 14N77+dqkFI43IAg+KOg2hzZV9rul0OAYiVRAgED7E1ouseoKvVtLyC5Fs7bvKVLJyhL lN2+y3cpdvHmHovpFVwd5x0YVyX+P6HFAXPuKbi4m2wY5YIKEiZxz0h23ta0Zs+e9ToX zpNQ== X-Gm-Message-State: AGi0PubibIAd6/w56csjr9YzSWDtBFzZJDZl+Z5xD1Zi5qVF+E3fE0W/ KJTNBGk2knCKRkX/1nxz6IMAzA== X-Received: by 2002:ac2:5092:: with SMTP id f18mr8506094lfm.162.1585585305086; Mon, 30 Mar 2020 09:21:45 -0700 (PDT) Received: from [192.168.0.109] (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id t144sm7981885lff.94.2020.03.30.09.21.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Mar 2020 09:21:43 -0700 (PDT) Subject: Re: [RFC net-next v4 0/9] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP) To: Horatiu Vultur , davem@davemloft.net, jiri@resnulli.us, ivecera@redhat.com, kuba@kernel.org, roopa@cumulusnetworks.com, olteanv@gmail.com, andrew@lunn.ch, UNGLinuxDriver@microchip.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bridge@lists.linux-foundation.org References: <20200327092126.15407-1-horatiu.vultur@microchip.com> From: Nikolay Aleksandrov Message-ID: <15dcc261-bcbb-ec67-2d8d-4208dda45b86@cumulusnetworks.com> Date: Mon, 30 Mar 2020 19:21:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200327092126.15407-1-horatiu.vultur@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/03/2020 11:21, Horatiu Vultur wrote: > Media Redundancy Protocol is a data network protocol standardized by > International Electrotechnical Commission as IEC 62439-2. It allows rings of > Ethernet switches to overcome any single failure with recovery time faster than > STP. It is primarily used in Industrial Ethernet applications. > > Based on the previous RFC[1][2][3], the MRP state machine and all the timers > were moved to userspace, except for the timers used to generate MRP Test frames. > In this way the userspace doesn't know and should not know if the HW or the > kernel will generate the MRP Test frames. The following changes were added to > the bridge to support the MRP: > - the existing netlink interface was extended with MRP support, > - allow to detect when a MRP frame was received on a MRP ring port > - allow MRP instance to forward/terminate MRP frames > - generate MRP Test frames in case the HW doesn't have support for this > > To be able to offload MRP support to HW, the switchdev API was extend. > > With these changes the userspace doesn't do the following because already the > kernel/HW will do: > - doesn't need to forward/terminate MRP frames > - doesn't need to generate MRP Test frames > - doesn't need to detect when the ring is open/closed. > > The userspace application that is using the new netlink can be found here[4]. > Hi Horatiu, One issue in general - some functions are used before they're defined (the switchdev API integration ones) patch 4 vs 7 which doesn't make sense. Also I see that the BRIDGE_MRP is used (ifdef) before it's added to the Kconfig which doesn't make much sense either. I think you should rearrange the patches and maybe combine some of them. Thanks, Nik