Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp843373ybl; Fri, 10 Jan 2020 07:38:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyGsSFJaZNxd4yiVtDQRJbAvkbblPv9cWTMxr2cd0lVQY16RzUuEDPOf5hs/2sdsxzMlfVd X-Received: by 2002:aca:b60a:: with SMTP id g10mr2526340oif.102.1578670702484; Fri, 10 Jan 2020 07:38:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578670702; cv=none; d=google.com; s=arc-20160816; b=cxQxUx9EIGJrjHMypmgZqEm7z3OPw+mQWCjTeVR3RUtgDX+uSqByxYsQ21yCys/DN/ C7vJ+hLhaOp/HHabP0pkJhoSOXnjxTThdorc+JNUnqVr9z+CwjGPhIZ8N+tLthuF8r8e S0ZdExeBLalgBtyFw2UfYrKfNvSzwyoCkgdXGVjLBAqNYes85aaN9cgmqHJ92JUt1VPd GWlO0d3bzDlnndYEFTi1kVqsU/nsELl4fjvjg1isBj4hjniAMUF8Y2+DSjQh+obzooy4 LdaQcw92N2ax0Qe9wTuT/oo58paOVfodBsJP+RGN3nqzREZCzU9hCeeoH0d7YdozMb0W LqFg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xl+l/Ff1h5aHS/j+yY4JLSVy0LAWP0ovd4UAXh2rwYI=; b=n2rNDdG8oblqIFtPR9w63skahhsgN89sRvF3TyFLrJdD4204Gcy98mn/1VAiUQKH2w doj0I36fCzF3vpNu9nTUhraVsSpXcD4bxOW+E8owOoFa4dDW8DTpFuzZYsUtkA5anSbu 2RvuPZDVvJ4myi/qfEPFYhfhJ4bEzSmT8a2sBPj4Zb9mE/ZcFEdzi8wJG9C9gsmHYH50 Ef1srZVO0ZDHZkzQGN4o96sWWJriyxzrIoXDYUA2uJWjKmrGfBaFhJr7rf69DCFM6SWV poSzx1rY81T+7zsmREuJ7tICHQa/aYAFvTmunW7iarK7NHRYHea56ElLX9YIYERvHLUv RuLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=GD+hkpL7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si1264111oic.274.2020.01.10.07.38.10; Fri, 10 Jan 2020 07:38:22 -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; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=GD+hkpL7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728401AbgAJPgN (ORCPT + 99 others); Fri, 10 Jan 2020 10:36:13 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43088 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbgAJPgN (ORCPT ); Fri, 10 Jan 2020 10:36:13 -0500 Received: by mail-pl1-f193.google.com with SMTP id p27so982033pli.10 for ; Fri, 10 Jan 2020 07:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xl+l/Ff1h5aHS/j+yY4JLSVy0LAWP0ovd4UAXh2rwYI=; b=GD+hkpL7mVIsQjwBZ1pGAowSiGQaH8CrQQ0jhQbZMOA8cGm5Un+8k5Gi+5VBH2O+U+ P6F5PMier1CZAh1PWTFbO2OsxfxV9cIwCLQgLoT+G5gDry8t5oTJdGJUqIZVvQh6sGXF r20ruywtum4tOg7Jkl+EDazul8zJoAJ79CIM187WMPKi67r6BE6UbPegWc78d/zHYCHm jFC4JxnYQDRkG0aMZ1760wa21eU1FolRndacSM/YpQyOs+o0D7K9/N6+VVqtNp9kdrsf ULwGP4lZwgjCMMH61AVwRvT4nbJNdQedY+4pFddeEpdcqDt79RrkdF+HPdXkC18qMus8 iWKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xl+l/Ff1h5aHS/j+yY4JLSVy0LAWP0ovd4UAXh2rwYI=; b=qjLgAx2O/1i45DleIySShFBznwDjq+y7oMgOTAROMGfsE6mCRP8bU7Rk1xos5cyZ/q F8EpllRq8DhkepVE71fo7yEscECQW4hfG6IM6KPx0yWfqolnMYhjLIaiPC50fCUX7ZiK 66wydxMbEnpC+66kwSe3/k7WjFcaPs7EW2JVPXIUWsKMRycWa3uY7viYsp8/H9zpzBc6 eGlHOs4cBja8+Rmdaupo1LC/PjC6Vv1fKSxJuS7f5aXQrc7OvhFKI1zJrOQhqJIIGhzJ wIlDa26oCnNpqFw69RjD9iZuuWvJ1j2h0sYMF04/4/ANuOu7w3dy0RVNrz+erMaKJofq 7EEg== X-Gm-Message-State: APjAAAXfKOwF/dZEQPCdd+AvdPk+qVwnAxLXHq7dAgvpN3khdTfhVnMO 3FYhjvn15lQHNZWS4qWnxOHFVw== X-Received: by 2002:a17:90a:f88:: with SMTP id 8mr5729629pjz.72.1578670572660; Fri, 10 Jan 2020 07:36:12 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 20sm3414887pfn.175.2020.01.10.07.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 07:36:12 -0800 (PST) Date: Fri, 10 Jan 2020 07:36:09 -0800 From: Stephen Hemminger To: Horatiu Vultur Cc: , , , , , , , , , , , , , , Subject: Re: [RFC net-next Patch 0/3] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP) Message-ID: <20200110073609.0eddf6e3@hermes.lan> In-Reply-To: <20200110090206.gihfd3coeilkyi23@soft-dev3.microsemi.net> References: <20200109150640.532-1-horatiu.vultur@microchip.com> <20200109081907.06281c0f@hermes.lan> <20200110090206.gihfd3coeilkyi23@soft-dev3.microsemi.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Jan 2020 10:02:06 +0100 Horatiu Vultur wrote: > > > > Can this be implemented in userspace? > > The reason for putting this in kernal space is to HW offload this in > switchdev/dsa driver. The switches which typically supports this are > small and don't have a lot of CPU power and the bandwidth between the > CPU and switch core is typically limited(at least this is the case with > the switches that we are working). Therefor we need to use HW offload > components which can inject the frames at the needed frequency and other > components which can terminate the expected frames and just raise and > interrupt if the test frames are not received as expected(and a few > other HW features). > > To put this in user-space we see two options: > 1. We need to define a netlink interface which allows a user-space > control application to ask the kernel to ask the switchdev driver to > setup the frame-injector or frame-terminator. In theory this would be > possible, and we have considered it, but we think that this interface > will be too specific for our HW and will need to be changed every time > we want to add support for a new SoC. By focusing the user-space > interfaces on the protocol requirement, we feel more confident that we > have an interface which we can continue to be backwards compatible with, > and also support future/other chips with what ever facilities (if any) > they have to HW offload. > > 2. Do a UIO driver and keep protocol and driver in user-space. We do not > really like this approach for many reasons: it pretty much prevents us from > collaborating with the community to solve this and it will be really hard > to have the switchdev driver controlling part of the chip and a > user-space driver controlling other parts. > > > > > Putting STP in the kernel was a mistake (even original author says so). > > Adding more control protocols in kernel is a security and stability risk. The principal in networking is to separate control and data plane. This is widely adopted in many areas: OVS, routing, etc. There is an existing devlink interface for device control, it would make sense to extend it to allow for more control of frame inject etc.