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 C6B71C433F5 for ; Fri, 15 Apr 2022 12:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353562AbiDOMhh (ORCPT ); Fri, 15 Apr 2022 08:37:37 -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 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