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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7F84C2BA15 for ; Tue, 18 Jun 2024 09:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vIl99Bsod8V04RLLpk94/ZbdVoqKFt8r0SX0Ggp8H3E=; b=ErkWsFVYA9iUAuE9MRCl6nClhn KU8o5FLZXlrSPeFgj8lSJwvp5FhkMzfe30mCGAb5TpHnfH/fdkaEfyn+jS88ZR4r44E4YSOaNA4F4 BIvXaizAdPgACsFsuhqJKqNDLjydUPCWoNzSjYmJeZZNWz3nVoqngETuXUyqG2/RI4HYvuAv32vXu yQMiN5Ta8/AlbXQyxFdxVXLsZvBdpyy+qq7p4vtgmrfBV+9+iQmhvdL/XJgxJT4VAJPRMxwN84k8t 8IQvi/Deautr4oMvs8VdY7oRbTExrnuql1UNJ2F01T2ukFKkE1qeN6tHiLe1KhQzMKAwXKpWv4WI7 fB/wXqJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJVZf-0000000EEgo-0tG3; Tue, 18 Jun 2024 09:56:25 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJVZb-0000000EEfN-22V6 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 09:56:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8D484CE126C; Tue, 18 Jun 2024 09:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21AB1C4AF1A; Tue, 18 Jun 2024 09:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718704576; bh=KjFrD3x7om3gSIqL3pNxCEjKTXG59g1dkIyKmefkQlU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YNt27QS4sw4M6YYfzSPylnGv63F3Qqrd/RAWyAJGj4fx2OScnBYkYvlkTZDaJ3Yu5 x0JoOA99zqVx6Uu1F/sux9O360tqk4se7RLtW4/Ek7jcKpH/tJsde84YLolhRahDJL PKsxU/zg2l21dIcDnae3V/CVqQdIEmN9JrQ2HECCW8dimE2kuLAdXlBTkSybDPD+jE xesC0DGTbbOK14iuNgR/lkmycBLC+CSPxMg3lZdIsdpy3CSoiqu3T9tzIftqIvEZej cRwDH8EzlLokxEdedE9vqP3Od6eQsorkBWDvC7bnLZ0KNg7LM9DMQWTb21hnfBqpZ4 ibv9T2zZr62uw== Date: Tue, 18 Jun 2024 10:56:08 +0100 From: Simon Horman To: Xiaolei Wang Cc: olteanv@gmail.com, linux@armlinux.org.uk, alexandre.torgue@foss.st.com, andrew@lunn.ch, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, wojciech.drewek@intel.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net v2 PATCH] net: stmmac: No need to calculate speed divider when offload is disabled Message-ID: <20240618095608.GI8447@kernel.org> References: <20240617013922.1035854-1-xiaolei.wang@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240617013922.1035854-1-xiaolei.wang@windriver.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_025619_836602_80B8CE8C X-CRM114-Status: GOOD ( 11.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 17, 2024 at 09:39:22AM +0800, Xiaolei Wang wrote: > commit be27b8965297 ("net: stmmac: replace priv->speed with > the portTransmitRate from the tc-cbs parameters") introduced > a problem. When deleting, it prompts "Invalid portTransmitRate > 0 (idleSlope - sendSlope)" and exits. Add judgment on cbs.enable. > Only when offload is enabled, speed divider needs to be calculated. > > Fixes: be27b8965297 ("net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters") > Signed-off-by: Xiaolei Wang > --- > > Change log: > > v1: > https://patchwork.kernel.org/project/netdevbpf/patch/20240614081916.764761-1-xiaolei.wang@windriver.com/ > v2: > When offload is disabled, ptr is initialized to 0 Thanks for the update. Reviewed-by: Simon Horman