From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC85BC63777 for ; Fri, 27 Nov 2020 00:57:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DABA20678 for ; Fri, 27 Nov 2020 00:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="voTIdJ0u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DABA20678 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mQhlsRnu2ud3mmTH0GRcnAf2waPbRWqhmnpxYrwyECs=; b=voTIdJ0ufKXZE2I8gINa9Lu0f 5gWRlaSIwtyPuYGgMPCtJY/w0c276GbigfcsmI1AvvKVTO6QLMmp8bthoNHqXyUpO7THxz0OFsLG3 kKSuwul53dgHgrXYs2UdVRwEsPFbvNkqis3IJ+966OxIZaGti8aOigXN7mbg0G0dmpFaN4kkFjofB JuuOAahNlfHClUgiXn2cOrX+YRKHMhBx+lmR0NWaAXRVPD9Fm+MVWQUVq+gOS4es6qDYlXQmhXuQr sWxpMmNhbNXB6bUSUfvUE+qFdE2Km6tyXXkrthPzcDvGMQmafmd3e0trE33GM2p2Z4sTn0N1icgrl Yz+C3whtg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiS2f-0001I3-Mm; Fri, 27 Nov 2020 00:55:17 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiS2b-0001GF-3b for linux-arm-kernel@lists.infradead.org; Fri, 27 Nov 2020 00:55:14 +0000 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 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-Disposition: inline In-Reply-To: <20201127003549.3753d64a@jawa> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201126_195513_289525_918D5B73 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , Florian Fainelli , Fugang Duan , Shawn Guo , stefan.agner@toradex.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, krzk@kernel.org, Vivien Didelot , NXP Linux Team , Jakub Kicinski , Vladimir Oltean , Fabio Estevam , "David S . Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76711C63798 for ; Fri, 27 Nov 2020 01:21:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E8CB221FD for ; Fri, 27 Nov 2020 01:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392098AbgK0AzL (ORCPT ); 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