Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp43975imn; Fri, 1 Jul 2022 09:34:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vbcB8mTOT5giZRege1FsMzvm8H4pOO/Gbha3+q4+puzyMVnWElUcmbeLcoxEvgupYdzpUM X-Received: by 2002:a05:6402:50ce:b0:435:a2bf:e44d with SMTP id h14-20020a05640250ce00b00435a2bfe44dmr20206874edb.386.1656693253302; Fri, 01 Jul 2022 09:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656693253; cv=none; d=google.com; s=arc-20160816; b=PXm+9VGTPxre/WazE2P+MNhHWA+v/xx7qd6Yi0FaMVVxM6RuNRjj7NPH5y73aA/us4 xp8m/XRjMg+OiPi9DwnhWw5HLVskRWacydZa8z+ItOvzsvTPkCBHczgumNI5VQRVm/4P Y5NB+6s0j0EPF5B26Fi5kzLs2RdZtcNlVNwnbMDeAj3e9SIPwLEKyrPb9wU0ekd7FY1y ogLyZlQzlYd+6OiFjPxL7Mx1FRJ6vI6FVPzcKJ6x85eeBruet22hKMRqjcXfmmIJSAtO ZKuUjj81rOZzVYHxHhESpISl/Qio6RK95eAEeKUjUDw1Fm/svfqNlFK63YhrPek0S5WV y0kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fHKMope5SWjzop2Rp2Epmmp+QmZit+SL7styTSQamZY=; b=VY8z7qg0Jc2qzz4QYeuzOB97ssxAFFWasU5PgjOMNjP8udvV6SBVTgTEYdn1aXKrlO XPa77ltJl2NpmjlCiBeKQEa+HOUMyMkQMXdWcDOW63dmI7rs+Nt77pTolKpYUYbkVnjs rrgHTXzM08jGo5Ugmmz/aurcKHrRA3UXV/oiJccz0EatWM8QA+wSoppVQs8NV+ZKMKWA OeECIVVunLaktn9JwkgtBV8JVZ5ShVpMXVkqM6ncH4JX5sWoahO/ZWWYEkZpa+qTRLFV T1gwlv/oy+pzUh8+L0k5vgvsmCZefdF/zZQ1N5Jh3y4Yg4oQxFyaPAijjiphS7Hs+mXI b7AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cRRLhPkA; 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 a27-20020a1709063a5b00b006ff05cc7140si24456682ejf.255.2022.07.01.09.33.46; Fri, 01 Jul 2022 09:34:13 -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=20210112 header.b=cRRLhPkA; 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 S230285AbiGAQH1 (ORCPT + 99 others); Fri, 1 Jul 2022 12:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiGAQHX (ORCPT ); Fri, 1 Jul 2022 12:07:23 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBBCB22BE6; Fri, 1 Jul 2022 09:07:22 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id r20so3913046wra.1; Fri, 01 Jul 2022 09:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fHKMope5SWjzop2Rp2Epmmp+QmZit+SL7styTSQamZY=; b=cRRLhPkA26KHCS0gtvJXn447hDg4hRDT5oKadmE0G58kf6IdaSYc1buPIirB/Blm+H bVU6AvPAFeGP+2Zsv2TIQaeOskpNDYvxUMLd30+e1rWqJK1XxnEmbGkzDOxOchJd/VIH xZKWBKD0He04ZcEFAPOhPCvGhYx9w5ONil9zZu148QunDcBxDXctq6HkqU2yqD7GEOs/ w9ih4spSeU9JtlzmQkpDR0LmtgiswNebBF/A+7yc7I5HAis+v6a4ykAtPgs/V4evTugq DJMXJeUJStNwWwyVyBWBuP0lEenR74t52c7fjmNRXvUafpRZbrJ3aLsYHyf1fTU3vAhq 6D2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fHKMope5SWjzop2Rp2Epmmp+QmZit+SL7styTSQamZY=; b=KcmXvMwiEW0YFX7QJuc+eeoGtQ/4ZSE1/Q6WLGY+dZhta5dERFXKWjpXhLp9R8p7pa 44XnsieCqybLkAr5JqvRjYpuciEKZCkAWRicswADUvF4RQaKmUjHO3xCsaEYM0tDukX/ 4yOp0Vpk4+gL1u6wKjRT8CoVAMN0KjZPiVsezHUS1QW3L4UCKysoQZjXzeLjF5eWYDHa peEinHSafz2J9XsSniztBx1QRDMtZ3/RQPaZtIMwN0ZnS4RkXDHj7GQy40jAV+fWTSUf u4GmMz1Cn4Jlt6AmID4hB4CZJFjuvLO2W5gtg3w/RujeWqsHcHWvzhrc2TRKm8UKypYx hmqQ== X-Gm-Message-State: AJIora8+LUp6WilsIhrv8vUxF34TvrupX0Uu+rW2TVlHS80sjcVZW6ey Nae93vGE3sbuZIuSH79jykJFI9hiyUT6RwQPYHA= X-Received: by 2002:a5d:4c90:0:b0:21b:8b2a:1656 with SMTP id z16-20020a5d4c90000000b0021b8b2a1656mr14427680wrs.249.1656691641354; Fri, 01 Jul 2022 09:07:21 -0700 (PDT) MIME-Version: 1.0 References: <20220630111634.610320-1-hans@kapio-technology.com> In-Reply-To: From: Hans S Date: Fri, 1 Jul 2022 18:07:10 +0200 Message-ID: Subject: Re: [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port To: Ido Schimmel Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , Hans Schultz , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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_NONE,SPF_HELO_NONE,SPF_PASS,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 There is several issues when learning is turned off with the mv88e6xxx driver: Mac-Auth requires learning turned on, otherwise there will be no miss violation interrupts afair. Refreshing of ATU entries does not work with learning turn off, as the PAV is set to zero when learning is turned off. This then further eliminates the use of the HoldAt1 feature and age-out interrupts. With dynamic ATU entries (an upcoming patch set), an authorized unit gets a dynamic ATU entry, and if it goes quiet for 5 minutes, it's entry will age out and thus get removed. That also solves the port relocation issue as if a device relocates to another port it will be able to get access again after 5 minutes. On Fri, Jul 1, 2022 at 3:51 PM Ido Schimmel wrote: > > On Fri, Jul 01, 2022 at 09:47:24AM +0200, Hans S wrote: > > One question though... wouldn't it be an issue that the mentioned > > option setting is bridge wide, while the patch applies a per-port > > effect? > > Why would it be an issue? To me, the bigger issue is changing the > semantics of "locked" in 5.20 compared to previous kernels. > > What is even the use case for enabling learning when the port is locked? > In current kernels, only SAs from link local traffic will be learned, > but with this patch, nothing will be learned. So why enable learning in > the first place? As an administrator, I mark a port as "locked" so that > only traffic with SAs that I configured will be allowed. Enabling > learning when the port is locked seems to defeat the purpose? > > It would be helpful to explain why mv88e6xxx needs to have learning > enabled in the first place. IIUC, the software bridge can function > correctly with learning disabled. It might be better to solve this in > mv88e6xxx so that user space would not need to enable learning on the SW > bridge and then work around issues caused by it such as learning from > link local traffic.