Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp284958rwe; Wed, 24 Aug 2022 00:28:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR53SEjPN91VDd1HS2lPZAt2V19y3hBqFsCGssvyxLiNz4bctJGX5FUT2dlBJUPkZphsuIZ1 X-Received: by 2002:a05:6a02:44:b0:429:f999:bd76 with SMTP id az4-20020a056a02004400b00429f999bd76mr23361611pgb.513.1661326100294; Wed, 24 Aug 2022 00:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661326100; cv=none; d=google.com; s=arc-20160816; b=V3hHY8yVr36TJ79FVbnLhr5iU/ZHaNuOC/4MpQi1uNQTMo5qN0MAaL1W3GX3N/CyuU ryMq2ksO+Z8ZJVpaqfl7kHA4Za2jQfXoSJGMqNOZX1YUWt1GtVm4kEku9ZR27VqDfUmA MUa+uIz4OejZFVEpbG9j7YOoFSed4LDkQFBkkGUDaPel1/70zevFNcciBswjNFZNriCr SDnJw9iLj60pWd6M69YPLzg1LU9Ei4ahAgt8YwEahHWoAlcF6RGNGF2XkeAj6WkRnRwd GtdvUJ71KRdrkGoVV+t9gSn3r0e4GeEV4VPa+/5MeJBFNSAMqEhYk2NvIKd2JNQTeUFl oWIA== 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=dQf94WJvowkf5UC8UCY3dDZyD3E9e3uRDLnXz9mNG/0=; b=aS163NNEII5Qdy2xnGDGe1TvvnMkuJa7s3RHGQGE7u9N9dYKPB4q5oXH8waKAD9sI0 gbBxjEArVmggriq9WjgKpb8VeHA5Ag/0kLtPCUyMrbWuDnaIZjNxv4GSieVQuZ/WdW9d aUnmnDbM4+GOwhNFhg3YoAdRB2C7RXwXkHPQMTmxmINAIP1d97tqHyTOvaU64xjWSeEb 9dwC6GDDkXALK8Oscw9/eDSXUJY8cwnwpMnxNWR4R89wfucMhUAyMv5ry1qaPmnWSvwz Y9byHk8gLFfTQ/kVFbHlglIh/TjyNWX0If5EOSf7BkIhLTwpEeFw1oZ8glZrcGxRcqna vBig== 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 k190-20020a6384c7000000b0041cfefd9844si10980210pgd.694.2022.08.24.00.28.09; Wed, 24 Aug 2022 00:28:20 -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 S229551AbiHXHH3 (ORCPT + 99 others); Wed, 24 Aug 2022 03:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbiHXHH2 (ORCPT ); Wed, 24 Aug 2022 03:07:28 -0400 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A77885FE2; Wed, 24 Aug 2022 00:07:26 -0700 (PDT) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id 84B0B1884C76; Wed, 24 Aug 2022 07:07:23 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id 6880E25032B8; Wed, 24 Aug 2022 07:07:23 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id 5802FA1A0052; Wed, 24 Aug 2022 07:07:23 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 MIME-Version: 1.0 Date: Wed, 24 Aug 2022 09:07:23 +0200 From: netdev@kapio-technology.com To: Ido Schimmel Cc: Vladimir Oltean , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 net-next 3/6] drivers: net: dsa: add locked fdb entry flag to drivers In-Reply-To: References: <34dd1318a878494e7ab595f8727c7d7d@kapio-technology.com> <9dcb4db4a77811308c56fe5b9b7c5257@kapio-technology.com> <553c573ad6a2ddfccfc47c7847cc5fb7@kapio-technology.com> User-Agent: Gigahost Webmail Message-ID: <5390cb1d1485db40a71bb3fbf674b67a@kapio-technology.com> 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,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 On 2022-08-23 14:36, Ido Schimmel wrote: > On Tue, Aug 23, 2022 at 09:37:54AM +0200, netdev@kapio-technology.com > wrote: > > "learning on locked on" is really a misconfiguration, but it can also > happen today and entries do not roam with the "locked" flag for the > simple reason that it does not exist. I see two options: > > 1. Do not clear / set "locked" flag during roaming. Given learning > should be disabled on locked ports, then the only half interesting case > is roaming to an unlocked port. Keeping the "locked" flag basically > means "if you were to lock the port, then the presence of this entry is > not enough to let traffic with the SA be forwarded by the bridge". > Unlikely that anyone will do that. > > 2. Always set "locked" flag for learned entries (new & roamed) on > locked > ports and clear it for learned entries on unlocked ports. > > Both options are consistent in how they treat the "locked" flag (either > always do nothing or always set/clear) and both do not impact the > integrity of the solution when configured correctly (disabling learning > on locked ports). I guess users will find option 2 easier to understand > / work with. Roaming to a locked port with an entry without the locked bit set would open the port for said MAC without necessary authorization. Thus I think that the only real option is the 2. case.