Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2531685imw; Wed, 6 Jul 2022 07:31:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uq+XMmq9SdXJKH8XTIIXRvbo50GcGbN7WSjTRufhXsScd+jKgk0A0ep8cA33HH52YRJQ3Z X-Received: by 2002:a17:907:7811:b0:6ef:a896:b407 with SMTP id la17-20020a170907781100b006efa896b407mr39869257ejc.645.1657117908100; Wed, 06 Jul 2022 07:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657117908; cv=none; d=google.com; s=arc-20160816; b=ERV7C7iGDJJhowcTOTw/noJrb2HJ3WDkPFx31QUhIBwNRO1ozodcLOhuQaHLRUI3+2 4LrLplXYpAemgqGZVho2uAcVRRdF7LtkvCAx9DBDEUVFinGdzkMSwRVlzq9BiRttGhkH htdC+dnLiqw2xznXt7SGxcquCgX0xfE0A8tDy33wBZWQOf7UZXPALe0spQ0HUCKPkMS3 uFa6TMnUCAcK0NXewKtNhFo20z/Hct3CPpDJuhRbzNe6QYcrQtlCBIAeDjNUwYYca3O3 LscsmbHJS0X11l9Da8Fc1i6n9sL7FOpzXbNcpLU1WxM0doY1VwJ1ixGuI5ZSuo9hyXIA 60QA== 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=WPpPFt2vreAvukEchuJ8KcyDhd0FY1gp7qevaVZJpHI=; b=keJn7dEeSKg11bZQD9rB8/uikRDibtvJrBS0R4sVoh/ILOwE+4z3+mktTGUwlxlaC6 oAIsQJ+ukCw/tV0+UKsQi68elZe6E3Hn4XblW1UnZNTPRqhjrwl/ND0YoX98TCvHzUKQ J3c1Y6MPExCPKp4y46fFN+gjEeCOUPjI/qmdZfXmn5Gtooro2oolYX1o4W2yhZn1hFsr 67bhoLY2+YcLBvExpAhA7wbMNisFa8xqZtlpYEoKi8d1pp+0V9zGKVtLFNmdGcO8KSvR ysOAPQfmBgQX0T5YP8/h0ky5hj2tPE08phnQDlQdIyXXgiTx/DmpclzUisHFQi4EIrKy 8Geg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MipxUNNv; 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 nb23-20020a1709071c9700b0072b02ef4ad9si551606ejc.307.2022.07.06.07.31.23; Wed, 06 Jul 2022 07:31:48 -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=MipxUNNv; 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 S233024AbiGFOXl (ORCPT + 99 others); Wed, 6 Jul 2022 10:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbiGFOXj (ORCPT ); Wed, 6 Jul 2022 10:23:39 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E6C21A7; Wed, 6 Jul 2022 07:23:37 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id f2so16941595wrr.6; Wed, 06 Jul 2022 07:23:37 -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=WPpPFt2vreAvukEchuJ8KcyDhd0FY1gp7qevaVZJpHI=; b=MipxUNNv1CuzDomW4TDLl1zhaylRYTrx3HZq9GYsjxdcB9+8zSPYgqHTdiwr1z+vMx 1FrXYtgFdTKQJAw332y5OtL+a1DSibzdekPFpU8scZF5wsXT5IozNxflL5z/F9J/EOc8 6fUUAb+3A0iOvdHXB3B0v7vb03sGXtWPoywgxAYh5fGJNL2Gf/akgZZ3o5Q2t/X8AhTv oGRsf1z5hI6JAZutJvqwANARqRbZmUNjWEgtE6le0ja1+VhmfDcpIbt7w6NmofsaRELe 4kHBuQJNq9n9YQUGsOMl/wOhnMFV9A/p892T0cj4Bxeo7uwyANFpUYfIfrchPmUhtkUp n2Rw== 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=WPpPFt2vreAvukEchuJ8KcyDhd0FY1gp7qevaVZJpHI=; b=LBHHB0ohVYLuqsHu7iV26RaERXR4L4u4RGSgB2CGW/WeUB/Uz9BCtxwX1RUMTCIw/T yOR0mm/9iMfQ3muhp7y5YZ2C+qSdQdvixJnF/dPr8VZo5yKpIIZHImPNqqzQOmlOUkaR 7aMfZEEyk/+tMRqSZ19l0brOdwoODOSVUyteEDxPCXW7xfY/tJNwaXLwrwUtOJeBz56N xu+wAqPp7aefBhmCjHSY7DYakR2uIh+B0Aea2/YQNFCSoAqeXj+o0cvwzP4hFIDLTHFA 7zrh42WlXE0RDC/PmK6+plaBHcSY8VFN6PjafOjKmkcxpGypp7KdND0xIuLnXZvK13RZ NsPQ== X-Gm-Message-State: AJIora8Zcqwi3t2CGBqtimr/51MXR5RsUkcVR6VIrQy5dfBfR3nD48/2 1kIE3lAECQD6mM5x9FOzU/d834rns2/K6+oooJQ= X-Received: by 2002:a5d:4304:0:b0:21b:9b2c:be34 with SMTP id h4-20020a5d4304000000b0021b9b2cbe34mr40056150wrq.577.1657117416326; Wed, 06 Jul 2022 07:23:36 -0700 (PDT) MIME-Version: 1.0 References: <20220524152144.40527-1-schultz.hans+netdev@gmail.com> <20220524152144.40527-4-schultz.hans+netdev@gmail.com> <20220627180557.xnxud7d6ol22lexb@skbuf> <20220706085559.oyvzijcikivemfkg@skbuf> In-Reply-To: From: Hans S Date: Wed, 6 Jul 2022 16:23:25 +0200 Message-ID: Subject: Re: [PATCH V3 net-next 3/4] net: dsa: mv88e6xxx: mac-auth/MAB implementation To: Vladimir Oltean Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Hans Schultz , Andrew Lunn , Vivien Didelot , Florian Fainelli , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , Ido Schimmel , 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 > >> @@ -919,6 +920,9 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port, > >> if (err) > >> dev_err(chip->dev, > >> "p%d: failed to force MAC link down\n", port); > >> + else > >> + if (mv88e6xxx_port_is_locked(chip, port, true)) > >> + mv88e6xxx_atu_locked_entry_flush(ds, port); > > > >This is superfluous, is it not? The bridge will transition a port whose > >link goes down to BR_STATE_DISABLED, which will make dsa_port_set_state() > >fast-age the dynamic FDB entries on the port, which you've already > >handled below. > > I removed this code, but then on link down the locked entries were not > cleared out. Something not as thought? I don't see a fast ageing happening on link down. There is the two cases: 1. Soft link down With iproute2 command the link is brought down and mv88e6xxx_mac_link_down() is called with rtnl lock taken. 2. Hard link down I remove the cable from the port and mv88e6xxx_mac_link_down() is called without rtnl lock. As the hard link down case calls without rtnl lock, either I trigger the case you have mentioned or I have to use rtnl_is_locked() somewhere along the line?