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 85A64C433FE for ; Fri, 21 Oct 2022 17:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbiJURaa (ORCPT ); Fri, 21 Oct 2022 13:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiJURaW (ORCPT ); Fri, 21 Oct 2022 13:30:22 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 686594D148; Fri, 21 Oct 2022 10:30:20 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id t16so8523112edd.2; Fri, 21 Oct 2022 10:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=eODYg6i1slVemJXiAd3VXkmdvCvejpnoks2e1b1sQZA=; b=kWmjcACfBGi4HGfSDqndyHtIVP5QX7I1bLM11RrayrZIHqCnhQks9SjBSlMCCHEK80 3Olz0moI9h1U0OlYkoEqiu2hmUXnePYex6ofPDYB+7XQyM6xvTTUlsKpGxQ7A00r8Qiz 2+yiokVqPbgJw3B97d9FN4gxPBWlld6vPoLR+yVJp0cxnR4nuH0HQlVF9u+Mt8Y9WJsF S5C1i/6ryyquWA+8VoY9IbDLwHRD3s79dKSRYFUQ8vmbRB9XAksydxeCCCfLeVenCyhs T5+eBUYX/+qKlh6s7y2e4VyeezWIF2MQsYA3j9ja+JFF71uvZwts4f4aPzxQtv5neO41 vulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=eODYg6i1slVemJXiAd3VXkmdvCvejpnoks2e1b1sQZA=; b=awKiwMXq6fZjRmSnPAJ0N1AAXx0hNvvNVZcWYAFiICSbsG+81aIlMfrxaiVkDZbL5v fWHkwpkHWVQeWVVrj45lDw92ISWH8UUadb+eNNyaisRw9cl3sEFvBIA9BKVEpiap18vQ rFy7Xl7UmAV0LuCH+G3mXGqpgQPa/2/JBfqqWlfChA1Z1az6HlFw6FBsQQ0t9T9MPMtw AzbxPq/NT15MWYgVn6rPq4vuOVofYp3njKRu8W82VJzPdnsZDV/AxaLkHebjFxQSMEC+ YbnHnlRxSW5G+M7zdNPXiGEL05ikJqX6tVmWglXt4Wa79Fjl14Z+/QfhxBPemoPLdskP IdMw== X-Gm-Message-State: ACrzQf0h5SyICZ6vmqcnSWHV3pKAYG4xw2o4dlk4dG4Fo8jtG4audTRA cUsbNG5Ta9TirUbm7cwLeGc= X-Google-Smtp-Source: AMsMyM4s9UluzXOoPf7cYQVSBAmze6LMyEYjVNnYAFVkJdkbmtuP1IWFdO4gUJPrPwh+bE9aZswPGA== X-Received: by 2002:a17:907:7611:b0:78d:9d69:adf9 with SMTP id jx17-20020a170907761100b0078d9d69adf9mr16728025ejc.283.1666373418592; Fri, 21 Oct 2022 10:30:18 -0700 (PDT) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id g13-20020a170906538d00b0073d638a7a89sm11999567ejo.99.2022.10.21.10.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 10:30:17 -0700 (PDT) Date: Fri, 21 Oct 2022 20:30:14 +0300 From: Vladimir Oltean To: netdev@kapio-technology.com 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 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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?