Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1160200pxu; Fri, 27 Nov 2020 00:49:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyn56fqIQunAm87hVEZMVeVTxizzlYfSy3xHt7OfeTIqj4nkFl0IrwDus5KBL6XWBydsOPR X-Received: by 2002:a50:950e:: with SMTP id u14mr6385622eda.260.1606466988571; Fri, 27 Nov 2020 00:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466988; cv=none; d=google.com; s=arc-20160816; b=JXD+K7U5YdS8FITVFIVH5+iOaq7X8L+8/NHfbTjTi7yFrD6Cn+OKZJ+Pz9hWCwpdsI qJMLN9SpdLlGETyYDs6l1uhEFajHFUxwEsTafDnjCEBwzgP1GFKrPSqbi56NPzp7qaNL v0vfyDyXCqaIBnPW7HH7um/VTVW919tagDgIaHbVO5ThlmyqSqXmZHqxU68vviEb0euW e0ffR5D6eAxo8wC7T5oj8S/XN+lomOvZI8nH/nA9wNHDqO2dJXEJ9XG5gKzeb1YQRUIt IxUVp6DnKfFLKNpFDHuDkZbivMpLu56UzbvwkQAZG8RbrfdfRjFhU+MrwlRmdh5rCsLX D/zA== 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=t7aPFOS37iRbe2KK7zbh/AJLEc05sRHwox2hmz+VNpg=; b=xv47zOtp7g9eOcV3WvjF/QOPxzLSv3+1niESvccdPXLRx6p4eyt9z1P4BoyfEt8iji Jxk7OWQ5PckQAYsiUf4zgNpBlA5O9lzoWTmONtnd62z5LrU6TwIrPbqQdES8eNrf58je yDibCHtUw8GoAw075vk7Q/s08K38X3C6k4Hh933TSjyWr119RCLGzA99rJh1cqi7FEZo jE9tDK0aEA/y/ozNlBCG5KYagWJAcWSXVK9Qinbr0rDiRHB1KIJGbgME10eEl1a3C4Nx GgskgEsOLr2PXzUeUVcYoL7G8t9d5RhfhcFhbl3hi3wrL39zYmfy6dLCf9yIVGgCKLa4 DBxw== 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 j18si4650126ejs.70.2020.11.27.00.49.26; Fri, 27 Nov 2020 00:49:48 -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 S2392093AbgK0AzL (ORCPT + 99 others); Thu, 26 Nov 2020 19:55:11 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52108 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392082AbgK0AzL (ORCPT ); Thu, 26 Nov 2020 19:55:11 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kiS2Q-00943w-S0; Fri, 27 Nov 2020 01:55:02 +0100 Date: Fri, 27 Nov 2020 01:55:02 +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: <20201127005502.GQ2075216@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 > (A side question - DSA uses switchdev, so when one shall use switchdev > standalone?) DSA gives you a framework for an Ethernet switch connected to a host via Ethernet for the data plane. Generally, that Ethernet link to the switch is a MAC to MAC connection. It can be PHY to PHY. But those are just details. The important thing is you use an Ethernet driver on the host. If you look at pure switchdev devices, they generally DMA frames directly into the switch. There is either one DMA queue per switch port, or there is a way to multiplex frames over one DMA queue, generally by additional fields in the buffer descriptor. For this device, at the moment, it is hard to say which is the best fit. A lot will depend on how the FEC driver works, if you can reuse it, while still having the degree of control you need over the DMA channel. If you can reuse the FEC driver, then a DSA driver might work. If the coupling it too loose, and you have to take control of the DMA, then a pure switchdev driver seems more appropriate. Andrew