Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3074282rwi; Fri, 21 Oct 2022 11:09:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5tVwrMwd/CnZI8XpDiJF0CzXtViO7DmI8JwFQgvtVResS+d5yrQ5Q12nLB3NxvMK+Pp8/G X-Received: by 2002:a17:906:b08d:b0:782:d526:3e36 with SMTP id x13-20020a170906b08d00b00782d5263e36mr16685379ejy.358.1666375776439; Fri, 21 Oct 2022 11:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666375776; cv=none; d=google.com; s=arc-20160816; b=m3+wwzVBsiWe5zljqXA8nJaY0JfBhqHGe5+w+/yHjKGoELh9y9vE2X8lTFM4DlCYJY 4hhNpthdauVqOIQknBDLr8VgcuXDvZzJ77tztQgNL1+a6gJEuEIwUKNeIbSvcibSekTI x4tDIVN5X0b00/Tj/R75L1AXXMXxfOboAd6hyciYmQYylVlzD2juGYIu6aN5Hds2e2F+ Sp/OJ6pQxoQG8qr3ZLAPAn6zLA01E32PWn5rU9muGyooNlf5xoN8KdzuW6epHDjf0hD9 IBPifRZ765rH0rb/o+8gQ2u8GmX8hBxcnYgKQo+xh5Wb5l6VhZ6WmKa9nALSY3/Dzy0a +GqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=d6UoboT3GPFH+yR0u6A5+iJDgDFwbOcLPjKNv58lNNQ=; b=pxlYcv9TsmQrHiWAY3nU7TkqyBURq9OdYvIvukBIBb6PHrvo66fyYkm7a57Z+MydmA npQpgBjGY5qH8tUw2DhQwVIocJiOsGdP9rLy9sorzNg3+OI9lh3SlKqZScXY+SlagyD1 T1xyrDlJQFKHj3k5/BFNqwykdX2iEgLeJHrLRUi1c7wNkf8ViGRQRaFJJAAXlCYQpeio 0DSfy2MOT9rLC2LCkNsyWEgdSGUi1p08L3lfyU1ww7FfC+NsAW+wYrkv53GPrxV0BDpc 7wxCW6TFUdGoS6umZ/MwBDhgehLIIzjs79/B7HuqtKeTERHe6BnCJs2Ahe901eXqnC36 ENAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o26-20020aa7c7da000000b00458ff6921e6si18321608eds.79.2022.10.21.11.09.10; Fri, 21 Oct 2022 11:09:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230258AbiJURjp (ORCPT + 99 others); Fri, 21 Oct 2022 13:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbiJURjl (ORCPT ); Fri, 21 Oct 2022 13:39:41 -0400 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22B033841; Fri, 21 Oct 2022 10:39:36 -0700 (PDT) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id D5B4618846E9; Fri, 21 Oct 2022 17:39:34 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id C5ECE250007B; Fri, 21 Oct 2022 17:39:34 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id BA4459EC0005; Fri, 21 Oct 2022 17:39:34 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 MIME-Version: 1.0 Date: Fri, 21 Oct 2022 19:39:34 +0200 From: netdev@kapio-technology.com To: Vladimir Oltean Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vivien Didelot , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , UNGLinuxDriver@microchip.com, Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Russell King , Christian Marangi , Daniel Borkmann , Yuwei Wang , Petr Machata , Ido Schimmel , Florent Fourcot , Hans Schultz , Joachim Wiberg , Amit Cohen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v8 net-next 10/12] net: dsa: mv88e6xxx: mac-auth/MAB implementation In-Reply-To: <20221021173014.oit3qmpkrsjwzbgu@skbuf> References: <20221018165619.134535-11-netdev@kapio-technology.com> <20221018165619.134535-11-netdev@kapio-technology.com> <20221020132538.reirrskemcjwih2m@skbuf> <2565c09bb95d69142522c3c3bcaa599e@kapio-technology.com> <20221020225719.l5iw6vndmm7gvjo3@skbuf> <82d23b100b8d2c9e4647b8a134d5cbbf@kapio-technology.com> <20221021112216.6bw6sjrieh2znlti@skbuf> <7bfaae46b1913fe81654a4cd257d98b1@kapio-technology.com> <20221021163005.xljk2j3fkikr6uge@skbuf> <20221021173014.oit3qmpkrsjwzbgu@skbuf> User-Agent: Gigahost Webmail Message-ID: X-Sender: netdev@kapio-technology.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 On 2022-10-21 19:30, Vladimir Oltean wrote: > On Fri, Oct 21, 2022 at 07:18:59PM +0200, netdev@kapio-technology.com > wrote: >> On 2022-10-21 18:30, Vladimir Oltean wrote: >> > On Fri, Oct 21, 2022 at 03:16:21PM +0200, netdev@kapio-technology.com wrote: >> > > As it is now in the bridge, the locked port part is handled before learning >> > > in the ingress data path, so with BR_LEARNING and BR_PORT_LOCKED, I think it >> > > will work as it does now except link local packages. >> > >> > If link-local learning is enabled on a locked port, I think those >> > addresses should also be learned with the BR_FDB_LOCKED flag. The >> > creation of those locked FDB entries can be further suppressed by the >> > BROPT_NO_LL_LEARN flag. >> > >> > > If your suggestion of BR_LEARNING causing BR_FDB_LOCKED on a locked port, I >> > > guess it would be implemented under br_fdb_update() and BR_LEARNING + >> > > BR_PORT_LOCKED would go together, forcing BR_LEARNING in this case, thus also >> > > for all drivers? >> > >> > Yes, basically where this is placed right now (in br_handle_frame_finish): >> >> As I don't know what implications it would have for other drivers to >> have learning >> forced enabled on locked ports, I cannot say if it is a good idea or >> not. >> Right now learning is not forced either way as is, but the consensus >> is that learning >> should be off with locked ports, which it would be either way in the >> common case I >> think. > > I don't think I fully understand what you mean by forcing BR_LEARNING. > A bridge port gets created with a default set of flags as can be seen > in new_nbp(). > Those flags include BR_LEARNING but don't include BR_PORT_LOCKED. > > The user can decide he wants to make the port use 802.1X without MAB, > so > he enables BR_PORT_LOCKED and disables BR_LEARNING, all with the same > netlink command (ip link set swp0 type bridge_slave learning off locked > on). > > How was the driver forced into anything? Well, with this change, to have MAB working, the bridge would need learning on of course, but how things work with the bridge according to the flags, they should also work in the offloaded case if you ask me. There should be no difference between the two, thus MAB in drivers would have to be with learning on.