Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp138256lqh; Thu, 30 May 2024 17:22:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjlG6cKG2HLjB7aOX2T8tI8y64tQOjiUNiQnnz8Bue+hE6BOuP03mEvejmG1+WL1736hw5OAtaUj+wMbOZd3Z3q8640G7Z0GTriahxwA== X-Google-Smtp-Source: AGHT+IGkB2LXcl5/oHlmaOfR6vMn34NehkfKhoppuwN2V0ke4y0DtMqf3TrORqGjGvUP9r1aDogW X-Received: by 2002:a50:bb02:0:b0:572:6af5:1b61 with SMTP id 4fb4d7f45d1cf-57a3634ac88mr304762a12.6.1717114923728; Thu, 30 May 2024 17:22:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717114923; cv=pass; d=google.com; s=arc-20160816; b=EmefuqcGTWmtYSVUk7YnCTxFrxANUt+YWilNgf8p/oKJVAippS/udUGZuVKtQ5kgTu fkIF1mMQMSQUTVA17fuOMXZCquebDdaEzTeCXL1SYwcveez8toOINV25c0W8oQ9NW6F9 cl3FD19DIx4bEypJCPdKdSYMbPDKmIagxs+dBozNTLEyGDo4ich+cCdoMHNhWNi/kPPQ 8PUmhZFwmLpE1a9t2avLD4rE1wSa8QtvV115t6w4naKA5DJsIJcAdbyMhNiy/MLWwJIX qBURxtdkrK9a9yqsXBJRMt5iCMKTHquQGFyAi/PxbevklNvLL8h2lPny21Xr/f1OHeQX 5u9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vp67wFYTbUwXuSwLjkdoCHGgsqLcjt0B0qRwZL8jd6c=; fh=KpmHmQofqmKB0tnkDZ0PiY6ov1DzY7HVztjUsxe/pOw=; b=XTV0+gehn/DpM4cB2c+iOuJ0C6H13gn+XC3/x526kbtSUkOTCJOm/StcczGB8U5Wng ANQlBmczQ5X+8p3ghoU2PvKX7L/tY1QV6U0xwzzsNCqPDRgqnFlExouX8hWdKKH2LsVA k66PH6r/DxKvn6VMEMSSi5/D3VjwYu5wi06kWLwawsgZAbZLyDzJqAYZtRtTmdgAAnr7 qmprgzXnN8EKfs03NfcIfmtkDI4L8ZTVyv5rNPYtMzzlnK7IVXb407hjQ/6sDk4SREwt K3aiLdiT/uD/2pyFSrswPy/Yu7242Z7DHCDg9Rqq+URc37AicNt8lzg8orQFjEU10yCi WBRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="2z/xM3GY"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-196073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c766b6si330114a12.360.2024.05.30.17.22.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 17:22:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="2z/xM3GY"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-196073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6AF6A1F250C4 for ; Fri, 31 May 2024 00:22:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9857A4C79; Fri, 31 May 2024 00:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="2z/xM3GY" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 624C4A3D; Fri, 31 May 2024 00:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717114914; cv=none; b=ROng1vCCN0cCZieCLkS9pheeS1R3JIivO5hX154qDMKvFIPgMprVwEWPioFew81OLm8YhIIiqsCGFB/a3xIEp0suU3srPw3DrHu4e6b3PQfg/esK+2JTytDolhbssHSjwjNC7QoruAqpUdnlN6qNDui2cufQChD9R/7jvL2+rHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717114914; c=relaxed/simple; bh=rm48JD8+zTQAEVtlC6KRVk0RK56MJgDn3fJMxSO/ivI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NDXLxE37/1XkRwjoMjl9iW789riCe1swm/G9wuf153tB9XcEmYTGCIznAC1SmxDd+QUiT0yxIgqq892mERNGNR1Nm6zSjyIUugyOc+T5mLA3307Isx72PG5f3GAruY6HxWdQHz53wO2bXYPE26Qmi5d05RyxsluJ3slckEizEjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=2z/xM3GY; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=vp67wFYTbUwXuSwLjkdoCHGgsqLcjt0B0qRwZL8jd6c=; b=2z/xM3GYZDbajIFLk3vtUBEX1v eIJvVNVuK0I4Fqhcthga6J4wnrB3L45RNQZ9/NuSua/4rTw1fOp+8Z6K/R/VVXXEktwzc/YjIzRqM 52L7d9u+3LSIYNXE1WBoLOe4BWGGBmUsCoBZFFu70p+Odu4ODEYJtOGZl2VkgYl9KWrI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sCq1X-00GQ74-Oc; Fri, 31 May 2024 02:21:35 +0200 Date: Fri, 31 May 2024 02:21:35 +0200 From: Andrew Lunn To: Tristram.Ha@microchip.com Cc: pabeni@redhat.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Arun.Ramadoss@microchip.com, Woojung.Huh@microchip.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com Subject: Re: [PATCH net] net: dsa: microchip: fix KSZ9477 set_ageing_time function Message-ID: <78e2e9b1-e980-4e67-b2a2-352a06619411@lunn.ch> References: <1716932192-3555-1-git-send-email-Tristram.Ha@microchip.com> <4a467adcdb3ca8e272bd3ae1be54272610aabc9b.camel@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > > Is the additional accuracy worthy the added complexity WRT: > > > > mult = DIV_ROUND_UP(secs, 0xff); > > > > ? > > I do not know much accuracy is expected of this function. I do not know > whether users can easily specify the amount, but the default is 3 seconds > which is the same as the hardware default where the multiplier is 4 and > the count is 75. So most of the time the rest of the code will not be > executed. Are you sure it is 3 seconds? #define BR_DEFAULT_AGEING_TIME (300 * HZ) Fast ageing, after a topology change, is i think 15 seconds. Andrew