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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 620C8C56201 for ; Sat, 28 Nov 2020 04:37:01 +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 E12E9221FD for ; Sat, 28 Nov 2020 04:37:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ivc5UQL1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J6okCzp4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E12E9221FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:Date:Message-ID:Subject: From:References:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=faypvbz+KCc5/odVOHnMDGdFodM4gc4qB9xe2j1pLJI=; b=ivc5UQL1BX9jMPKn21pPHdqtZ 4Gifd62K6RlIVz7wWljakuIbv+viljKITy6Yame3yE5xyMMDnLw4hEX3+chsGi7pp2ne6CsLuQuT+ BRfnBkx3gdp3q5qaLVbk9cgeQ/me+vStrUXmesmOJwZaGB94o7Nsx3Fi0oTE2InnjnK0mOjZVvK2A KLeNgK9Ypbh5P9FMp8LuVU3VRcDP1hIOgEPj9HIQvuxOyP5yyd9KW8Y1EDXJQV/wMYrkSWhjqhCLg cFxwuGB1fKf4ZJkSXvsOBCcQp/wVhL+A66bmFH17TJ4wfhcmkiWg5pmRSAD2LsFSuVS++YZDM4N8x CiXi4UrDQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kirws-0004LU-JF; Sat, 28 Nov 2020 04:35:02 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kirwq-0004L6-Is for linux-arm-kernel@lists.infradead.org; Sat, 28 Nov 2020 04:35:01 +0000 Received: by mail-pf1-x442.google.com with SMTP id s21so6141578pfu.13 for ; Fri, 27 Nov 2020 20:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Oz3P6Bv01WMGgJrlQ1Jw9ujpaP6+pticwUV9K58yqjY=; b=J6okCzp4hUpHZJ186CFTgeWSiK1YvwD2YbXrvdLbUNinTz8bTumrtLkXhqhXncBD/u +EM0s9yzENGVXnskf54Sufspn4LHQURdvOI2eq+fyEvu8YprsBN1nzo5rBV34/kEfrRr 8RORIj/vA/U1IA5WXH0NKQfDknT/Mx7n4bFrbXst9kFve1l3oxTCtgNeuacAK3FYuzOI 4edCltvv7RnR+8LvyCOc/mmdyyNCGrBvDPYbf05Dg4nJmfuOp9gSAcaUJKlJ9X87Udez Pzt9VhOTrgDh4mfg8jJkl4PuJDs6ZdeVBVt3+f7wKX9iyG64ORX5JPmMOpRvwNZd0Yt4 w4Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Oz3P6Bv01WMGgJrlQ1Jw9ujpaP6+pticwUV9K58yqjY=; b=ddjt4ukKV6YnM500g+3w7xlD8M0xv4uuw3PKNnxz19GdB140rSseohFwOIaWGe10Od T6Sr9tXR/PWfvMprjxYkESLMCvO23E7/ktOW1IhdibrQ6xw6sHV0ozp34XbFOsMiR/T9 /xiuAPclWz28fQ+kJm84m8eO9kKb3xaABL4TRpw4R1oSKXN9bXjmyvOanMoTJigdYKLd 98IvRBo5I1kFgPreXGhraHZxVb6DffJfJgnW+0h+fYT4DRE1H8dvf30YhyEiL0Fy3hHt i6jWIyQRdJTnSKWHkAv2aK6P5ugckOQMATMEKpZBmsXoEVhFAfQXS1WUF8rAWFZ7h7IF h+Kg== X-Gm-Message-State: AOAM531tRJpp2z1vjtZYfsEv9eh7vHRF5ibbLa7hBQXThm7gL4L84jtQ Bkn6cf/yQ5Z1gUIIC0Sp4tE= X-Google-Smtp-Source: ABdhPJy4QlBHTCzbZtvgcfWDfLIsNGiyIKLPMQfy2IYap8lT9sZ8DGje0DBAxVnQSJFSrzEzcfaTiw== X-Received: by 2002:a17:90b:891:: with SMTP id bj17mr13651734pjb.59.1606538097778; Fri, 27 Nov 2020 20:34:57 -0800 (PST) Received: from [10.230.28.242] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id ev12sm2754038pjb.22.2020.11.27.20.34.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Nov 2020 20:34:57 -0800 (PST) To: Lukasz Majewski , Vladimir Oltean References: <20201125232459.378-1-lukma@denx.de> <20201126123027.ocsykutucnhpmqbt@skbuf> <20201127003549.3753d64a@jawa> <20201127192931.4arbxkttmpfcqpz5@skbuf> <20201128013310.38ecf9c7@jawa> From: Florian Fainelli Subject: Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC Message-ID: <61fc64a6-a02b-3806-49fa-a916c6d9581a@gmail.com> Date: Fri, 27 Nov 2020 20:34:55 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201128013310.38ecf9c7@jawa> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201127_233500_697769_1A870EFD X-CRM114-Status: GOOD ( 21.49 ) 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: Andrew Lunn , Peng Fan , 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 , 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 On 11/27/2020 4:33 PM, Lukasz Majewski wrote: >> So why use DSA at all? What benefit does it bring you? Why not do the >> entire switch configuration from within FEC, or a separate driver very >> closely related to it? > > Mine rationale to use DSA and FEC: > - Make as little changes to FEC as possible Which is entirely possible if you stick to Vladimir suggestions of exporting services for the MTIP switch driver. > > - Provide separate driver to allow programming FDB, MDB, VLAN setup. > This seems straightforward as MTIP has separate memory region (from > FEC) for switch configuration, statistics, learning, static table > programming. What is even more bizarre FEC and MTIP have the same 8 > registers (with different base address and +4 offset :-) ) as > interface to handle DMA0 transfers. OK, not sure how that is relevant here? The register organization should never ever dictate how to pick a particular subsystem. > > - According to MTIP description from NXP documentation, there is a > separate register for frame forwarding, so it _shall_ also fit into > DSA. And yet it does not, Vladimir went into great length into explaining what makes the MTIP + dual FEC different here and why it does not qualify for DSA. Basically any time you have DMA + integrated switch tightly coupled you have what we have coined a "pure switchdev" wrapper. > > > For me it would be enough to have: > > - lan{12} - so I could enable/disable it on demand (control when switch > ports are passing or not packets). > > - Use standard net tools (like bridge) to setup FDB/MDB, vlan > > - Read statistics from MTIP ports (all of them) > > - I can use lan1 (bridged or not) to send data outside. It would be > also correct to use eth0. You know you can do that without having DSA, right? Look at mlxsw, look at rocker. You can call multiple times register_netdevice() with custom network devices that behave differently whether HW bridging offload is offered or not, whether the switch is declared in Device Tree or not. > > I'm for the most pragmatic (and simple) solution, which fulfill above > requirements. The most pragmatic solution is to implement switchdev operations to offer HW bridging offload, VLAN programming, FDB/MDB programming. It seems to me that you are trying to look for a framework to avoid doing a bit of middle layer work between switchdev and the FEC driver and that is not setting you for success. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel