Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1160075pxu; Fri, 27 Nov 2020 00:49:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4PjXeSXHSlMbvKsXwWM8N4I+ik2tUs07+cGlEndtTJ9vO/NaMKHJV5m9Kw2D0KoqQ0E9x X-Received: by 2002:a05:6402:22ab:: with SMTP id cx11mr6383866edb.98.1606466972212; Fri, 27 Nov 2020 00:49:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466972; cv=none; d=google.com; s=arc-20160816; b=NpgVZ6xMQVu7PWVeFPfVoHEMe0mWUOLu++QpYABfKuQ+trWfEu+7KOptQ+qp4KAeCK NzHiw63Lu903s4l5bBVlsda6LiNbeGfnF+ohvgCcAezZFSCNn78/TCDR1Z/f1tlUp7EH wZp4rMuIw5MB3vCne5ldbQx8aGD8e6mLEzSTsORlL4t+v+REIpkcgBoKkqJ8jd1lj+5k 3COvaoTTfo74v19IpZiH1YPdfLkX0UTN5lPTKOYmDFGhvkonz7ynBxPjFmkLgPx28cv5 vs7Y/vgcIQ21sPgWMXAHfQtfis8BLUIne3e+5eHxy2jz25oPnPAOFfmcZbnMUmCgCRFm hMPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=O0mD7HiFp44yrYq2lgyINEp/iYUrl3EhL42yjjCSs5Y=; b=CuZ/dnwUku/NWwGJC3iP2/y0c6ZXVFe92ZrG8fvxn1z6bKKkzHJ9gcr3PnOmIUG8ON qxXnEUT01dwaDDkU8UT4RZlBYS997ZLhQLPmBxjCYtky7PFiSZCk3p4nyHGf0vAb+PEu iUPfLBd5S6NXw4aX9vFmW6gdsL2QsfL9mlM7gBECPLI5+7PqeqdB78BOciPyisc+4aVX F/z8ga+FdLLUgeQJFRaDy0+qa9c3Et0L6S/Lnk30CEheqT1JPYtUXvZH/JN/eERGbfsp /AwDhlV6Eo1Z9Wdtn97QGqQtuOXSW2ayHfH1BjhCcmVzde9doB2lwz+cTR2YvCqPFIGB lVoQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt2si4514704ejb.552.2020.11.27.00.49.09; Fri, 27 Nov 2020 00:49:32 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392112AbgK0BIR (ORCPT + 99 others); Thu, 26 Nov 2020 20:08:17 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52150 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388130AbgK0BIR (ORCPT ); Thu, 26 Nov 2020 20:08:17 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kiSF9-0094AB-RR; Fri, 27 Nov 2020 02:08:11 +0100 Date: Fri, 27 Nov 2020 02:08:11 +0100 From: Andrew Lunn To: Lukasz Majewski Cc: Vladimir Oltean , Fugang Duan , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Fabio Estevam , Vivien Didelot , NXP Linux Team , Florian Fainelli , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , stefan.agner@toradex.com, krzk@kernel.org, Shawn Guo Subject: Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC Message-ID: <20201127010811.GR2075216@lunn.ch> References: <20201125232459.378-1-lukma@denx.de> <20201126123027.ocsykutucnhpmqbt@skbuf> <20201127003549.3753d64a@jawa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201127003549.3753d64a@jawa> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > I would push back and say that the switch offers bridge acceleration > > for the FEC. > > Am I correct, that the "bridge acceleration" means in-hardware support > for L2 packet bridging? You should think of the hardware as an accelerator, not a switch. The hardware is there to accelerate what linux can already do. You setup a software bridge in linux, and then offload L2 switching to the accelerator. You setup vlans in linux, and then offload the filtering of them to the accelerator. If there is something linux can do, but the hardware cannot accelerate, you leave linux to do it in software. > Do you propose to catch some kind of notification when user calls: > > ip link add name br0 type bridge; ip link set br0 up; > ip link set lan1 up; ip link set lan2 up; > ip link set lan1 master br0; ip link set lan2 master br0; > bridge link > > And then configure the FEC driver to use this L2 switch driver? That is what switchdev does. There are various hooks in the network stack which call into switchdev to ask it to offload operations to the accelerator. > The differences from "normal" DSA switches: > > 1. It uses mapped memory (for its register space) for > configuration/statistics gathering (instead of e.g. SPI, I2C) That does not matter. And there are memory mapped DSA switches. The DSA framework puts no restrictions on how the control plane works. > (Of course the "Section 32.5.8.2" is not available) It is in the Vybrid datasheet :-) Andrew