Message ID | 20240228140413.1862310-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3365228dyb; Wed, 28 Feb 2024 06:04:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXxfuxl4qBgf3/Jw7zDLGa1cDf0FITY0nz1dr40YFQYjKgWyML4sZQlFEqHmTbLrw54M2fxlmP+9SLbGFGQT/SYbnmH8w== X-Google-Smtp-Source: AGHT+IES29/hFDq30tTiHwl1AOmPZTnIjvYcdQSmPdToNz1gRCXw2vQmQJQ/pFvbItnHDoh7hPBk X-Received: by 2002:a17:906:260d:b0:a3e:5cb9:8a4f with SMTP id h13-20020a170906260d00b00a3e5cb98a4fmr10042850ejc.58.1709129076929; Wed, 28 Feb 2024 06:04:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709129076; cv=pass; d=google.com; s=arc-20160816; b=kkFA4SoLkwQB0UlvoDFXgfhYQTc0RmVNEB1dGmS7wd9r4tuxnwSzwBLtYI/iiEanEe PPoT10sl5B811ELPsKIhb/lIMpv9ERJjDb1YXLX3P+PYrmbMvLHwRGfbKDXCpsBfe2am gEL4MzitHaAEzVtETEgzS8aAx3jE0cSiY8A7Kv2LziRbcElDe6w4b54+ZJ6y2mIbnu2L KTZJsbI58ipQ7hTfjENplXnXFwZl9qnTCQbZIosVILcN9fr0fMjpJHKgeei9tArYHvxN VY8RH1Mvago+OiIS0wSNWTKYhcuvFQdnvjHgNHYuVjZjSkZ7iQC4+53RQR3FgdRfwAHW SMaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ItJ/3+G/r2T0Bov+Ij90PkYOw7BLy5VkHUT/9UlPYsg=; fh=a8QzMriWbEtO35lyeGR2B6NU2+WX4D/+TrWBheZwsaE=; b=c18ZvNX+WqIQBibPT+9CCb0XC7BqZwdshTk7G8+WOO+ShJ9FAC35xAvpUnn3agzX1Z X7M+/cCaogJIE/xRe4BImfVywTQoW4hSSDdKVMyYT/pzZR1TubOWRrJfyPACk9TsmHeC m1olAu2uWKJJ7m4WDjCya8MFExjPnfrAookasLxUXcGuMWwdUcIqW0ehdMjlhYCma9af Bv7TXxOX8SWMkziCchPdzPqXewukDUoGAHw4Sa9skvm2fkdpCcSnj6DlMfPnz22x//m1 aPIRDnkIvJ9e6THYR75ASF1YMiJL/1BjMQfkWxz1zUysrWEMjwt8ytQ8pevdNb+C2gJX nYZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCFN+cZr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u11-20020a17090617cb00b00a42f801a5b5si1788317eje.920.2024.02.28.06.04.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 06:04:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCFN+cZr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85153-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 8AAD51F23E52 for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 14:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8418E156961; Wed, 28 Feb 2024 14:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YCFN+cZr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DC6FF73519; Wed, 28 Feb 2024 14:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709129060; cv=none; b=CtTsr8k9bYdacoitHZpeSiBbHlfY4l1HqY39LB/SHJPYiElTeFNiBGc9qjjEFUfYIKEIwx/ctyl2bZNX1zRmCbgeVYZiazHqz23WHNH+wPLa6xB5pxFpyUfIodlarAMoeG8Ptp+JWmAoiVt51mr3mre6V5RPj9XPCZ3u9QLTLds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709129060; c=relaxed/simple; bh=5ZN5lb9qZh+wr9R+euAaAWQtDY1Ld9pqoFz7FSR7nU4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bSSYhR0715qTp3tD/JM4m4cnSw8vK6dkDlXBd0I9hcoukkfLEFbMQzD4/Gxu0k3HAn9hQX4EfYnaK9b2I3C+/k8fSFIRCFlfWApxi4uO0cRmMRWELq0Y2nnDcGTD2BSU+oMPkCu0kKKHEsTi/DHmpoqEOdnPT5t5Dj608uxz9Os= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YCFN+cZr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2803C433F1; Wed, 28 Feb 2024 14:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709129059; bh=5ZN5lb9qZh+wr9R+euAaAWQtDY1Ld9pqoFz7FSR7nU4=; h=From:To:Cc:Subject:Date:From; b=YCFN+cZrz77OSYi3x49AK08LMrEZTz1xtiWB12Kz3FE7haRPxCTQL5LArbfAgRCwq pkc38JPw97vWJ/Ss5MDO7rynTPqLcae8421fO+1apsLr4p3jJzOZ9h8n2eauIAGgmL kDDvEcuDe9+WU8kDT0orjDmylaAwLEXOxNsw8iXsXna3/ttxD2yY2TywkWg/jb0qSt nalk09LUf/Q1Y5+ZBreRv07wkrxo8y5ypvOMiwQFbNFGuQ514/+rLwF4MRuz5owzFe Cv1VLVu1+EL2w8DQnylxiG3Do8GLHp5QLN8Ks3BWS6aiE1yr4QmPWK3al8KxhNsgRp BML2iZ2MeCidA== From: Arnd Bergmann <arnd@kernel.org> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Breno Leitao <leitao@debian.org> Cc: Arnd Bergmann <arnd@arndb.de>, Roger Quadros <rogerq@kernel.org>, Siddharth Vadapalli <s-vadapalli@ti.com>, Grygorii Strashko <grygorii.strashko@ti.com>, Dan Carpenter <dan.carpenter@linaro.org>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: ti: am65-cpsw-qos: fix non-bql configs Date: Wed, 28 Feb 2024 15:03:10 +0100 Message-Id: <20240228140413.1862310-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792151730953850899 X-GMAIL-MSGID: 1792151730953850899 |
Series |
net: ethernet: ti: am65-cpsw-qos: fix non-bql configs
|
|
Commit Message
Arnd Bergmann
Feb. 28, 2024, 2:03 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> It is now possible to disable BQL, but that causes cpsw to break: drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue' 297 | dql_avail(&netif_txq->dql), Add an #ifdef check for CONFIG_BQL around this usage. Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
but why do you want to disable BQL? On Wed, Feb 28, 2024 at 9:04 AM Arnd Bergmann <arnd@kernel.org> wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > It is now possible to disable BQL, but that causes cpsw to break: > > drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue' > 297 | dql_avail(&netif_txq->dql), > > Add an #ifdef check for CONFIG_BQL around this usage. > > Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > index 9d2f4ac783e4..3a3ec9959ee2 100644 > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > @@ -294,7 +294,11 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev, > txqueue, > netif_tx_queue_stopped(netif_txq), > jiffies_to_msecs(jiffies - trans_start), > +#ifdef CONFIG_BQL > dql_avail(&netif_txq->dql), > +#else > + 0, > +#endif > k3_cppi_desc_pool_avail(tx_chn->desc_pool)); > > if (netif_tx_queue_stopped(netif_txq)) { > -- > 2.39.2 > >
On Wed, Feb 28, 2024, at 15:44, Dave Taht wrote: > but why do you want to disable BQL? I have no idea, I'm just doing randconfig build tests. I assume Breno has an answer for that, at least he sent the patch that triggered the regression, see below. Arnd commit ea7f3cfaa58873bbe271577efa800647e30f18bd Author: Breno Leitao <leitao@debian.org> Date: Thu Feb 15 09:05:07 2024 -0800 net: bql: allow the config to be disabled It is impossible to disable BQL individually today, since there is no prompt for the Kconfig entry, so, the BQL is always enabled if SYSFS is enabled. Create a prompt entry for BQL, so, it could be enabled or disabled at build time independently of SYSFS. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: David S. Miller <davem@davemloft.net> diff --git a/net/Kconfig b/net/Kconfig index 4adc47d0c9c2..3e57ccf0da27 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -331,6 +331,7 @@ config NET_RX_BUSY_POLL config BQL bool + prompt "Enable Byte Queue Limits" depends on SYSFS select DQL default y
On Wed, Feb 28, 2024 at 03:03:10PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > It is now possible to disable BQL, but that causes cpsw to break: > > drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue' > 297 | dql_avail(&netif_txq->dql), > > Add an #ifdef check for CONFIG_BQL around this usage. I confirmed that all other cases where queue->dql is accessed, it is inside a #ifdef CONFIG_BQL block, so, seems appropriate doing the same here. > Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviwed-by: Breno Leitao <leitao@debian.org>
On Wed, 28 Feb 2024 15:03:10 +0100 Arnd Bergmann wrote: > +#ifdef CONFIG_BQL > dql_avail(&netif_txq->dql), > +#else > + 0, > +#endif Same exact code exists in qdisc_avail_bulklimit() How about we add static inline in netdevice.h wrapping this, like we do for other BQL related functionality? (taking in txq as the argument)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 9d2f4ac783e4..3a3ec9959ee2 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -294,7 +294,11 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev, txqueue, netif_tx_queue_stopped(netif_txq), jiffies_to_msecs(jiffies - trans_start), +#ifdef CONFIG_BQL dql_avail(&netif_txq->dql), +#else + 0, +#endif k3_cppi_desc_pool_avail(tx_chn->desc_pool)); if (netif_tx_queue_stopped(netif_txq)) {