Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1035347pxb; Fri, 15 Apr 2022 19:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxhWQL2raJXU7hcXj4I6w49cmiCh1Yk4h2D58E2rMhZEvle0RzqgQGodjlmDMGGSWmXP0G X-Received: by 2002:a17:90a:8595:b0:1bf:4592:a819 with SMTP id m21-20020a17090a859500b001bf4592a819mr1722654pjn.183.1650074702552; Fri, 15 Apr 2022 19:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074702; cv=none; d=google.com; s=arc-20160816; b=o2Or5nhnoxKL6BSsy3NIPv0mBhDUqKUTaTRl24bX4Ohqo9k4OKVuK9GBsc81ZBu0cb odsKcIU96DvkuXygERX+LmGIb8m5SdZ/N50qScotdsp7GYRGevNNXD+FQLBYpb1GRSYd bdWsPBmLcE46ThX/s+EprX0WoceMYGRL1hwfPDyL6sABdlbTxCy1uLmh+j+/gCN2xQE4 FRUO/xj1HSVpoUlh/viqSUnERcJehuTG7soVgUTAOidUQC+jNd+SWRVnMtExNMfJ2iwu XOE03SSMtoYQCnK/8RJBWmhgAFaCZVVAcBnoZwTyy9Zch5+3LgTtwSUXDTzQhbLZL3zo zUJg== 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:dkim-signature; bh=aNHgNCbgtVNEO2BN8vXFcv/xIVvPMu9dYuO7n9SQH/Q=; b=FY7jZ+ckcd4JUg40tHrXQ2RkNCyzVXMnXlJ7Pi5jX++uuMztou3Yxe8vyxIhgryzIm 6snTF+3UJQMJdSz5l+5Ow8KNmzif/vea96+2bgbZhC9iFWrVH+d3EDLH781ZZP2PxySo gC8ffX8DwjBodDi/+WcBctuq0d4Fr1H2z/5F8AXXUKes/mXMBidiUkJsh/R221p8E8Cy 0EbmymNyR04w9SfSW0zhWV/PR1jGW2XqGZ+u1/6456DcAty+jJpNRgCikNQRDK7o+awN pPQYh95vMA2R7CjRB2mGL6gWa+pqFqZ1ibsyqd+SNmIBkH2fGO6fIvKMwSed1rLaBatl Dehw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b+dxuyyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id pc12-20020a17090b3b8c00b001cb91d2108fsi6488361pjb.117.2022.04.15.19.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b+dxuyyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BFF6B10EC7B; Fri, 15 Apr 2022 18:23:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352585AbiDOLIR (ORCPT + 99 others); Fri, 15 Apr 2022 07:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352685AbiDOLH4 (ORCPT ); Fri, 15 Apr 2022 07:07:56 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41C009680F; Fri, 15 Apr 2022 04:05:28 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id b15so9567882edn.4; Fri, 15 Apr 2022 04:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aNHgNCbgtVNEO2BN8vXFcv/xIVvPMu9dYuO7n9SQH/Q=; b=b+dxuyyW78CHTyt8nvSp6UEZCi6NcD7K8ggtz388LM1PSEu/OLRIrxQWqXdANsVkc3 FQOp4Xi0upySR4tkCJfpS+GCb+nsgkgM6qXChV5u6DtVneqBwJIEMp3n3H/a0juFscen HUphhBL94AAnbA0lYMyc1RAxypQBDbz/j1GfpE9vd8B33OZKWL5sbk+3GkJTTlhlj+vJ /Vy2EVqxmNuXdpxGBlFXhSN6iTgBsh9RJPt9IKiCma+qizoqkUkR43Nw/tcl+cTNGMo6 gftdEs+5GJmY1Wzdxpb9kLzXHn9wDGE4eV3Z3jI2c8Tp32zvUJqrieqNTk6EtV0dSCjz xUAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aNHgNCbgtVNEO2BN8vXFcv/xIVvPMu9dYuO7n9SQH/Q=; b=ufGio1xqHs8akcISTTgVvWU5fBxUATIf8yc5bQbfsQ+pHH4ORfUWicef8rZ5qsXvmm 5WPZpbpsiinqvzVpNi0xp9Z2Figzy58qdeTbuDX1y9RTbflny+5ZG5b3DWzkFyyhgmKs KOpfdxnF0iQJUMnC96GrOaLY8I4nJLNDQ2rkk9e9MXPbGRRM4fkMHPlETybNkKksPlg4 bdiaE/k9iTQ3JbRR8LJhqJl4zBLJoPBFgRqElFZrnjJy9vcSfiAefMhH1DrbMPpvSuHo VIx6zCsjMgTB5ZCdv0MjAmUC06r06a/cxWY+qqVbebgJtVoiHYpOzvhZldp3BbSXes3J zhFA== X-Gm-Message-State: AOAM530Vhxl6AdnTlyZs8t2+D7zx2tBAVQoJIP4H14WqVx2lnRXT2jxQ SwWMLLtBOwFXCbsinHWbf4s= X-Received: by 2002:a05:6402:e85:b0:41d:121b:f436 with SMTP id h5-20020a0564020e8500b0041d121bf436mr7641355eda.121.1650020726814; Fri, 15 Apr 2022 04:05:26 -0700 (PDT) Received: from skbuf ([188.26.57.45]) by smtp.gmail.com with ESMTPSA id r3-20020aa7cb83000000b0041b573e2654sm2477700edt.94.2022.04.15.04.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 04:05:26 -0700 (PDT) Date: Fri, 15 Apr 2022 14:05:24 +0300 From: Vladimir Oltean To: =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Heiner Kallweit , Russell King , Thomas Petazzoni , Herve Codina , =?utf-8?Q?Miqu=C3=A8l?= Raynal , Milan Stevanovic , Jimmy Lalande , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, Jean-Pierre Geslin , Phil Edworthy Subject: Re: [PATCH net-next 06/12] net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver Message-ID: <20220415110524.4lhue7gcwqlhk2iv@skbuf> References: <20220414122250.158113-1-clement.leger@bootlin.com> <20220414122250.158113-7-clement.leger@bootlin.com> <20220414144709.tpxiiaiy2hu4n7fd@skbuf> <20220415113453.1a076746@fixe.home> <20220415105503.ztl4zhoyua2qzelt@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220415105503.ztl4zhoyua2qzelt@skbuf> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 01:55:03PM +0300, Vladimir Oltean wrote: > > > The selftests don't cover nearly enough, but just to make sure that they > > > pass for your switch, when you use 2 switch ports as h1 and h2 (hosts), > > > and 2 ports as swp1 and swp2? There's surprisingly little that you do on > > > .port_bridge_join, I need to study the code more. > > > > Port isolation is handled by using a pattern matcher which is enabled > > for each port at setup. If set, the port packet will only be forwarded > > to the CPU port. When bridging is needed, the pattern matching is > > disabled and thus, the packets are forwarded between all the ports that > > are enabled in the bridge. > > Is there some public documentation for this pattern matcher? Again, I realize I haven't made it clear what concerns me here. On ->port_bridge_join() and ->port_bridge_leave(), the "bridge" is given to you as argument. 2 ports may join br0, and 2 ports may join br1. You disregard the "bridge" argument. So you enable forwarding between br0 and br1. What I'd like to see is what the hardware can do in terms of this "pattern matching", to improve on this situation.