Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp908688rdg; Fri, 11 Aug 2023 04:05:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnZfIE2uZ8TK8We0zkjR2mKIi6OokmE+htylRoRjZ9BmijRg/51kjLqrnvumHLWZ7H8VS/ X-Received: by 2002:a05:6a00:1142:b0:681:eddd:51fb with SMTP id b2-20020a056a00114200b00681eddd51fbmr1834088pfm.18.1691751957756; Fri, 11 Aug 2023 04:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691751957; cv=none; d=google.com; s=arc-20160816; b=byJQHfUj2hOWWH63K2LjTiJ8wjQ8mwFtto0QHeIgBzJYwk9K/4fq/y55KYbwYNJGzL UP2w91nf8AfQKPQCXUXwdyrzwyrNZk0rUv2Yi9rSzD8kdE8581EZ1d2CpvlFHo91BRfr fIax4W2weC3WJz6rQIw5iEEz635rr5/s2satzCrBujaaRhFKTMqmQowwP1YcloR9S9GH B+d+1mfa3ZB0YSTOSLIxIaWQ0ODU9cc8fRXnxvlq95kTjt9qkriCH0JownTwXQYQrU8w e4tWJRHbPM73DaXsi1cos10pc19kN3YK9mEyfhJHTMFi19V0iqQu3qbBzMmJ/DjMua5S hseg== 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=ttMKk9rqBt+1WGSIXymjZZbSeEZephzk63+VZ9udyhk=; fh=o194qlHt+uddAI8DKnAiuWihzWWBG9dRDaE7oe+Cs/0=; b=XMM+jKlB6qSl2TOrd8W06FzzwgQeg5ojkacVWP2dJknMJb6qt7pOnEF11rKCnTIyz4 4fDw0jIXvM38QKAELRHpjkkgyM45eo+xtYI3Pf6E7M6s31ti5KAEInPune6PhDohVPfT aJ4zbNAAmkgpq8vRmIEhpWn/DhOoDpAIItbEhsB+7XQFDie/NwUpmz3btbibpjBDLKuR BZVOHKwHRu652Bo8rqfAIV/l0rorPnR1BqzV3FN7XnbMhST9n3ZxRNMDONijDnY3vstd kjxXKCYZzW/w9LdND9OAIrXjpFObdIOBGfz17AEhyySEn2ICwlTlTkzodFDJtclgOMii b7rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=bPu6sMY1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a056a00230b00b00687505e2bb8si3363751pfh.24.2023.08.11.04.05.44; Fri, 11 Aug 2023 04:05:57 -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=@gmail.com header.s=20221208 header.b=bPu6sMY1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234919AbjHKKDP (ORCPT + 99 others); Fri, 11 Aug 2023 06:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234769AbjHKKDN (ORCPT ); Fri, 11 Aug 2023 06:03:13 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40A16E3; Fri, 11 Aug 2023 03:03:12 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52307552b03so2315984a12.0; Fri, 11 Aug 2023 03:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691748191; x=1692352991; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ttMKk9rqBt+1WGSIXymjZZbSeEZephzk63+VZ9udyhk=; b=bPu6sMY1k+9VJFEa3lLJW4SaCenfmZ2fqfZqSFuSEhUF8gy+ejOhjLjj31X5bRIHPD Itf7pyP3cRTFRXjieeYyq5ymEmWQ+7R2sRTbpqPu+V7LCLeo2G6lHfeFpPlDyamWh2cl Qb65XLfBBlfktmox+II5+BrbxhLamsrUBD/T7a+y7814FiS1upfk2rntYvLgPz22taoH Zqzg3QAij62O1mK0tR8ZbeZitjsJddIwAlbFSfX1kTpx1idHNcaj2jZziK7AAhLMufVm gxjD9fmIQC/cgmv/kP/i7aM+cOOfk25VdR4EK4qH2xK1HI6Xxvvb5j3T/p2of+lMAjTV cLfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691748191; x=1692352991; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ttMKk9rqBt+1WGSIXymjZZbSeEZephzk63+VZ9udyhk=; b=Ml69nZf9oa7TcMMTXAHF+zXotEow1BKWsao/55hC27IZc+9xSep9BoyN1yyFjl5H/e i8taQ9chebQIOFRgHgzvEEjD/LNTzbpiIxAh8C12D1w5lTe1Gdy7Lb/ECoPfHaWThLGZ JkoELVqOxw047i9JHdKu9PlHHs8NgWAkTJzijcVubXmCxqgzSPbrN4bTpSjrDZN0RqQe pzRVeHTpGMJex3FTtu0WFgtMCkBy2gdvBVLUpLJD87STAq4X8hbMePPvfhUl8Z9CwAND fCxq5UTeyGU9jE5rBoxuPxH4VWROA2FLUeppYIUiCTxs/T1ATSjM3J64yv3CovgeG609 mjGA== X-Gm-Message-State: AOJu0YxGRVvzLZFl7AWk2XP5MdMjvkXLB+CSQyfGn8/tZO0AKFb49FqD qFyT677V/zKdkWBvo9B6KyQ= X-Received: by 2002:a05:6402:2031:b0:523:d1ab:b2ec with SMTP id ay17-20020a056402203100b00523d1abb2ecmr718246edb.35.1691748190324; Fri, 11 Aug 2023 03:03:10 -0700 (PDT) Received: from skbuf ([188.27.184.232]) by smtp.gmail.com with ESMTPSA id u14-20020aa7d98e000000b005231e3d89efsm1869472eds.31.2023.08.11.03.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 03:03:10 -0700 (PDT) Date: Fri, 11 Aug 2023 13:03:07 +0300 From: Vladimir Oltean To: alexis.lothore@bootlin.com Cc: =?utf-8?Q?Cl=C3=A9ment?= Leger , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Miquel Raynal , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Thomas Petazzoni Subject: Re: [PATCH net-next v5 2/3] net: dsa: rzn1-a5psw: add support for .port_bridge_flags Message-ID: <20230811100307.ocqkijjj5f6hi3q2@skbuf> References: <20230810093651.102509-1-alexis.lothore@bootlin.com> <20230810093651.102509-3-alexis.lothore@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230810093651.102509-3-alexis.lothore@bootlin.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Hi Alexis, On Thu, Aug 10, 2023 at 11:36:50AM +0200, alexis.lothore@bootlin.com wrote: > + if (flags.mask & BR_FLOOD) { > + val = flags.val & BR_FLOOD ? BIT(port) : 0; > + a5psw_reg_rmw(a5psw, A5PSW_UCAST_DEF_MASK, BIT(port), val); > + } > + > + if (flags.mask & BR_MCAST_FLOOD) { > + val = flags.val & BR_MCAST_FLOOD ? BIT(port) : 0; > + a5psw_reg_rmw(a5psw, A5PSW_MCAST_DEF_MASK, BIT(port), val); > + } > + > + if (flags.mask & BR_BCAST_FLOOD) { > + val = flags.val & BR_BCAST_FLOOD ? BIT(port) : 0; > + a5psw_reg_rmw(a5psw, A5PSW_BCAST_DEF_MASK, BIT(port), val); > + } These 3 port masks will only do what you expect while the bridge has vlan_filtering=0, correct? When vlan_filtering=1, packets classified to a VLAN which don't hit any FDB entry will be always flooded to all ports in that VLAN, correct? Maybe you could restrict transitions to flooding disabled on ports with vlan_filtering 1, and restrict transitions to vlan_filtering 1 on ports with flooding disabled. Or at least add some comments about the limitations. I wouldn't want subtle incompatibilities between the hardware design and Linux' expectations to go under the radar like this.