Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2145043rwb; Fri, 11 Nov 2022 05:46:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf40BHWqeSfTufXB7uzvvnwKHkD4qmuT3b5Z2+LETZoxVJ/vWM7RCI1/CQPfXyjvhNZR6ONS X-Received: by 2002:a17:902:dac4:b0:186:5f54:18cf with SMTP id q4-20020a170902dac400b001865f5418cfmr2627401plx.141.1668174381204; Fri, 11 Nov 2022 05:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668174381; cv=none; d=google.com; s=arc-20160816; b=RNhp1yxXlQL+vXgw2TUe3bqQsgpF/BLqZeltFNSjJubeCm7ay9e+LcOj/1/fzohvuT KGR+7POzZtD2PREK0urlkqfIsbYAoYDR1UBGZwnPqYde+u+/wBSYyffJe6KvL/YkKf04 tD7N56Q7mT9HjrGdPV7SnDvnw5/VQJog85U5gYLGNfAGaEjaAQV406DuBUMwNk7C8EN7 h12PA/+NFzleT+YrjHiV5eUs+In33wjc9UJ8gOjxEP3xpxtRlJaQl+sVjrYnLmDdy/LG GNIQYJzX4GUl+uXKPrMamTgSJs2HDEKLF09I/LFb9mjebpcuXvANSfiQONGRKk4uFyn/ 6GOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=+BHaopmuZwWm/OefFANW2YbUIWLtNvme+VMrXXenRbs=; b=CEdtQdtdiZjVL0u7zjwS83qtq2WrR+EPtL3GyARFZTr0pUOi/3RGP8urn35F3EE/Ep 2NPSeCVPbTQ6NbGd9ofPE0Sqy83lpdTkm2eAD2sGWwFk5vp/bRxuCDU+kvkzsIwVXj2g 01Joma0qzNdvTPy2L/uiuziGkCcntqQasB/lLO+qkerDf/yPQKjT6rjX0KJ2XOoSCsrN ZOQVz92Pf4AqFWjj8+MmNKxkQxTor/CexfQrHQ0aCwpBtSxOMZ8+eIdIHu5VC7QKxdz4 26Y9dNAxI80JwFuotC8D4fYBcB9cI9esYvP9BCXA+7YGD9thS7ltpjApHGK9hjZ29d8U SuTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hfsWscfQ; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a637343000000b004700983430esi2411990pgn.794.2022.11.11.05.46.08; Fri, 11 Nov 2022 05:46:21 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=hfsWscfQ; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232855AbiKKNfz (ORCPT + 92 others); Fri, 11 Nov 2022 08:35:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbiKKNfy (ORCPT ); Fri, 11 Nov 2022 08:35:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A582213FB8; Fri, 11 Nov 2022 05:35:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46B3561FB9; Fri, 11 Nov 2022 13:35:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03BDEC433C1; Fri, 11 Nov 2022 13:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668173752; bh=CaRWFQiIEk3LaLCfHVLBit9YNmh0dMLE9iEL18b83rU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=hfsWscfQevV1MMDKPneC9LR/rjZe4/oQJjeVp5jQN/y5d9QKQBb8gIwJukxN8etsp GG7UWqx9E+6h37zbMTMTzc9huTz4Ym/eZYuCGXuoRDNYtm6PtfJ9mSs6Nry7T1ktBC YIAJiXygu+qgANsYedd7jpejnc+i9GyArejbXQpTVv48RlbcTzK1Xlz8q0imDumlDE GeyuVVY/yKX9yqAygpVzXofsBPe6kajCmQmBYW21tJTdVYteb9BEp5S02wOG9Dj1rP knY6Ji4F76flOWGmMHsyRTKBcncPz0sz1SOntyFp421LPXehWeZqhM/R54yNTr65I0 W3N+dD8x9lj3w== Message-ID: <8958bf63-d5e4-9f3c-ad61-b85068cb2fd3@kernel.org> Date: Fri, 11 Nov 2022 15:35:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] net: ethernet: ti: cpsw_ale: optimize cpsw_ale_restore() Content-Language: en-US To: Vladimir Oltean , Jakub Kicinski Cc: Ido Schimmel , Nikolay Aleksandrov , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "vigneshr@ti.com" , "srk@ti.com" , "linux-omap@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20221108135643.15094-1-rogerq@kernel.org> <20221109191941.6af4f71d@kernel.org> <32eacc9d-3866-149a-579a-41f8e405123f@kernel.org> <20221110123249.5f0e19df@kernel.org> <20221111120350.waumn6x35vwfnrfc@skbuf> From: Roger Quadros In-Reply-To: <20221111120350.waumn6x35vwfnrfc@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 11/11/2022 14:03, Vladimir Oltean wrote: > On Thu, Nov 10, 2022 at 12:32:49PM -0800, Jakub Kicinski wrote: >>> I have a question here. How should ageable entries be treated in this case? >> >> Ah, no idea :) Let's me add experts to To: > > Not a real expert, but if suspend/resume loses the Ethernet link, > I expect that no dynamically learned entries are preserved across > a link loss event. Understood. We loose the link in this particular case. > > In DSA for example, we only keep ageable entries in hardware as long as > the port STP state, plus BR_LEARNING port flag, are compatible with > having such FDB entries. Otherwise, any transition to such a state > flushes the ageable FDB entries. > > A link loss generates a bridge port transition to the DISABLED state, > which DSA uses to generate a SWITCHDEV_FDB_FLUSH_TO_BRIDGE event. > > I'm not sure if it would even be possible to accurately do the right > thing and update the ageing timer of the FDB entries with the amount of > time that the system was suspended. In that case I'll leave the entries as they are and let the Switch logic deal with the stale entries. They should eventually get flushed out. cheers, -roger