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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5C37C4332F for ; Fri, 15 Apr 2022 11:05:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352595AbiDOLIS (ORCPT ); Fri, 15 Apr 2022 07:08:18 -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-Google-Smtp-Source: ABdhPJxir9Fv9dO2LvYZxagXMGCO2X2Qw+Y06fTPieGCLbeU/AHQQrvrOPgc5p/X43uvfvrnIff5Ag== 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> 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.