Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp939108pxb; Fri, 15 Apr 2022 16:02:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvVmaSjYvPhzWQOMih35CYmF30P9cCA7sWfe8QVQngzgSHP0sWG7e/yGB8+QwphkCJGZGU X-Received: by 2002:a17:907:3f03:b0:6df:b04b:8712 with SMTP id hq3-20020a1709073f0300b006dfb04b8712mr911252ejc.290.1650063757533; Fri, 15 Apr 2022 16:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650063757; cv=none; d=google.com; s=arc-20160816; b=oB4q0RaD9yPZCR5O6o74GZATlxAeOwmiYbP1zxobkerlDprDB84wG/IO1yKMYVhgY4 Zqy+RNowsChjv1VuiM/84VsbzPz4Cj4cpYlAwpS7T6Gqwx5WDqbRTrSq4isFZPuFY9YU e+f6x0qcRAydwoybJGzJH65Ah/+qAN3jgAhLrYMGaBODH6Z9t+Q2URmLtyXrX+mRUzRI z4+hNCM5lVjEyQ7Yz1SLBgQlwTkm+HXLATcWtO8SkNo7b+hdXzGBlrJOF8mvBR7u/9HL DNTp3fu5CQCf97hjlLG9GxFNMarDVyau0msEHaWHvJOc0Ilho3GxEpA0z2oZGDV6vqAO dVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=/rpSdRIr29uNTmJaIt9QZ8DL3HFAoCTObhaQHkW3Kc8=; b=gOsEoZ4jcwcTiztYBQgs+gYhPTr0Qi7KGwp90Y5bVW7gjys/a0JFvCShFLUKFg6H4L E0CvnVTQWFUEZbsIBZTl4Fqxvl9JnG+4Wk09WFCThugduRHEIOXENEs3OUMJ0dWOSPcp BmWw2TfjOSpWYswX/ecWQNcGgdYStlZRqhZX8pqb24T0tAimUA40kOEjo+iEuY1fWOzf hBci2yJISRPlJe79cb0fClfubLW8YWkAuB6TRkefHcqKuil5e94hfGbNlWeRkr+5b+CB gqAS8BhS276geLYaYvupqr1yQJ/FSYdPokZ59D8QlvHYtpa9EU83fxB5wSXWK8DrZ8jW SGVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PMANM4wI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh1-20020a17090720e100b006e8cf792dd7si1688512ejb.372.2022.04.15.16.02.11; Fri, 15 Apr 2022 16:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PMANM4wI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245735AbiDOMhg (ORCPT + 99 others); Fri, 15 Apr 2022 08:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353437AbiDOMhS (ORCPT ); Fri, 15 Apr 2022 08:37:18 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 485DAC74B8; Fri, 15 Apr 2022 05:32:50 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 6B01B24000B; Fri, 15 Apr 2022 12:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1650025969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/rpSdRIr29uNTmJaIt9QZ8DL3HFAoCTObhaQHkW3Kc8=; b=PMANM4wIkVW/Tb63MnsMzWSZrCLJdDueAmYFd0HG4+yq3+ZT5dG+bsiust3DfCU+U4ei7C zzOUf3jW+4KXkACkNhTB1KyHNhCFPEgYADQ1m5PrHB73iS9qh664xxQpeAbvYNxIwnAH2c AvGyCpi/yavxV5erssG/G3WMCJ2XDKhwlcm5FpEj6OyYN1aXFO662a66XW55agee6WsUYe j9darq1RkYXSneWVPn/0Mb0fvJ3CakzU22YSd9g4e32I63v+ylnMroET52hF04AWMwm7Xm F7bOnFbSW5db9ZXZ9BarWjnDEMov6AYm/ZuwWsnKpi934Rl9+ZWLZZGGOtcTOA== Date: Fri, 15 Apr 2022 14:31:20 +0200 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Vladimir Oltean 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?B?TWlxdcOobA==?= 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: <20220415143120.4c406ff9@fixe.home> In-Reply-To: <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> <20220415110524.4lhue7gcwqlhk2iv@skbuf> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Le Fri, 15 Apr 2022 14:05:24 +0300, Vladimir Oltean a =C3=A9crit : > 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 (hos= ts), > > > > 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. =20 > > >=20 > > > 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 th= at > > > are enabled in the bridge. =20 > >=20 > > Is there some public documentation for this pattern matcher? =20 >=20 > 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. Yes, you are right, the driver currently won't support 2 differents bridges. Either I add checks to support explicitely only one, or I add support for multiple bridges. This would probably requires to use VLAN internally to separate trafic. --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com