Message ID | 20240207001036.1333450-1-quic_abchauha@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1902362dyb; Tue, 6 Feb 2024 16:11:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcwva02GMvZthmy/SuGsR1iijjBtIKqLP82okEB4dCsnDX/v3Gl5rqMpe0C0z+mDh5yjQC X-Received: by 2002:a05:622a:1:b0:42c:3acf:2ba5 with SMTP id x1-20020a05622a000100b0042c3acf2ba5mr1815862qtw.0.1707264680603; Tue, 06 Feb 2024 16:11:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707264680; cv=pass; d=google.com; s=arc-20160816; b=NxA7g4YUzg+OzqF06rrvT8UnyJ3CgIoWMwTw9tpgkfvMF8SLLCSJ8et62X2SYq7rgL z1rG81KfasdIOXlAN1Z2/J+wW4/wBqWAXU7M5ZFwuh1bH1rbsr/9gXolJUGSlE9OM49H 2I6cX6yPRs92en5+IgVnEbW0xz2CZL+mU/V7Vxf4+KzfzsdJphkuFXkjUsujUIOpFLew pB0sgbSNG8vlv+gg3gWHiN/wH+6xlmo48MO/6I8KAETvvPJdxmGiI7N0PhmPKcb/W6hW FF6Iu1gaBR+5N2mWq5SECm16NsvYy6FjUM/G0gn5NPcE+bk/4lrwnrD10MC9NKL4U4ur VvDw== 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=Skg3HbQjq2/sqhBqmP0VZ8miwYY04Us8dUh25zkVrRE=; fh=Bh4m/n4jrqdSz7gZKmWZbCO5+GA6NMCGPan36CbP/NQ=; b=t6bbQIFtPFruNTTGKQFdOu+b5LUHHaJeneCsgk++7ncaIwVLLNWFOuO3pjhoOm1ErK Lvo8ra60a5PXekw3Nz2Ys7LbrleETlAL+5kHVIzQG+PEXGltubPRr56MqILl9fiCI4IK hb6fr/RZ/6OuAEePcQNovH2I198pR3cLDi+0nGfrAYQXbQGXQa+PD4vJl9YQvNEIgs1q KEwnuH1xvFGRGwa8yXZr5yr3KY+E8Ia40kfKc4mPGGvLCptHZG9kO6LURrHBpcEFST5v WkBhUbBQzFSljek6f2iPR7InktXCHIuR9DU5nx8WSRQ1WEHdtOD8Ar1Ze7hYNH8+AVP7 q2lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Uw21QNs9; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=2; AJvYcCVA5fZJmajAYjF5F9q/ohvmz1WSvLBpP6CADUbyrF20BK19VvA+GAx9B4VcPWLzHseTMj7KLALT7fEJuSPTEO93jv8fjw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f17-20020ac85d11000000b0042c268a9666si40831qtx.799.2024.02.06.16.11.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 16:11:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Uw21QNs9; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4987F1C214A0 for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 00:11:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79D41EEDC; Wed, 7 Feb 2024 00:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Uw21QNs9" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 DCFC5DDA0; Wed, 7 Feb 2024 00:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707264655; cv=none; b=HhYD4wsX4h5DaHsbSJ+d59G0fBrlQpAe2nSC+PQWJYxUtHaRb4odDIMhv0HaOJQ8rJIuI5xRPYwihGhYAhMhN+eQnAPfvpHAmcyuSstQbHqh42TDKvKHQ6pi0Ic/IaQyct/P51fIVuZn2dcvzjohjiBglciNx7Q2ek2CaeaO5TU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707264655; c=relaxed/simple; bh=6reKaR74PsLEEhWXFF0eYoOTUvHn7NUWzmF0g9nPW+k=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=s/Lc4KHK6Puk241P9PI2hAg9DKofMGs5dQpieJzPidkhfixfvWqXSFcV0wyzkrVKQmYAz7pGz48xEtWBZ2FEpj/oDcgePf6VzNxjY2B0NKIMCAmQQuGUS+hyZwNTp1P1UQakWPl6T5bWhzt+hrPNUvxSswM3tmrubr5b2WML1tI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Uw21QNs9; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 416NISTZ010794; Wed, 7 Feb 2024 00:10:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=Skg3HbQjq2/sqhBqmP0V Z8miwYY04Us8dUh25zkVrRE=; b=Uw21QNs9FXkmcZGXLoDo2qZoXPcwQ0ZqwPNt pabH1bIQXEqzBe1AeA/7kBvCRFhIi8S5hgjVBtG5M0Z9H5RBh88KA1vthCqYvicn HRMCj2Xq6jky79/V1JKxIBfllnzY0OqII2Xu/YXa28/MxPa7n/MyvZtTtfVrrGfR 1gRqet3r9qSyl30SK1Rpwo8jWja0kxEYxI1GWGTvnynEXLynu+uc2vUts0gltE/K C8FToJft24r1UMfLcEJ4KwJKT0/naAVer3rf0bkApjb7Fy+iMZN+LMi2uplPUBaQ IhJowCUsW4fI7nj3YDJe22XvtVgVlMTFAIXwepsTypOCVOJ0kw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w3ud2ree6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Feb 2024 00:10:38 +0000 (GMT) Received: from pps.filterd (NALASPPMTA04.qualcomm.com [127.0.0.1]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4170AbMC031971; Wed, 7 Feb 2024 00:10:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 3w37h10ecd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Feb 2024 00:10:37 +0000 Received: from NALASPPMTA04.qualcomm.com (NALASPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4170Ab4d031966; Wed, 7 Feb 2024 00:10:37 GMT Received: from hu-devc-lv-u20-a-new.qualcomm.com (hu-abchauha-lv.qualcomm.com [10.81.25.35]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 4170AaGU031961 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Feb 2024 00:10:37 +0000 Received: by hu-devc-lv-u20-a-new.qualcomm.com (Postfix, from userid 214165) id 5216A22B62; Tue, 6 Feb 2024 16:10:36 -0800 (PST) From: Abhishek Chauhan <quic_abchauha@quicinc.com> To: Vinod Koul <vkoul@kernel.org>, Bhupesh Sharma <bhupesh.sharma@linaro.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Prasad Sodagudi <psodagud@quicinc.com>, Andrew Halaney <ahalaney@redhat.com>, Rob Herring <robh@kernel.org> Cc: kernel@quicinc.com Subject: [PATCH v2] net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0 Date: Tue, 6 Feb 2024 16:10:36 -0800 Message-Id: <20240207001036.1333450-1-quic_abchauha@quicinc.com> X-Mailer: git-send-email 2.25.1 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-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: pFMpKkgujDH8ky-4mt2LIGwBn_H2n5fc X-Proofpoint-GUID: pFMpKkgujDH8ky-4mt2LIGwBn_H2n5fc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-06_15,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 mlxscore=0 adultscore=0 mlxlogscore=801 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402060171 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790196769826376865 X-GMAIL-MSGID: 1790196769826376865 |
Series |
[v2] net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0
|
|
Commit Message
Abhishek Chauhan
Feb. 7, 2024, 12:10 a.m. UTC
TSO and TBS cannot co-exist. TBS requires special descriptor to be
allocated at bootup. Initialising Tx queues at probe to support
TSO and TBS can help in allocating those resources at bootup.
TX queues with TBS can support etf qdisc hw offload.
This is similar to the patch raised by NXP <3b12ec8f618e>
<"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings">
Changes since v1:
- Subject is changed as per upstream guidelines
- Added a reference of a similar change done by NXP in
body of the commit message
Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On 2/6/2024 4:10 PM, Abhishek Chauhan wrote: > TSO and TBS cannot co-exist. TBS requires special descriptor to be > allocated at bootup. Initialising Tx queues at probe to support > TSO and TBS can help in allocating those resources at bootup. > > TX queues with TBS can support etf qdisc hw offload. > > This is similar to the patch raised by NXP <3b12ec8f618e> > <"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings"> note that there is a standard way to refer to a prior patch, in your case: 3b12ec8f618e ("net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings") (note this format is defined in the context of the Fixes tag at <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>) /jeff
On Wed, 7 Feb 2024 09:26:05 -0800 Jeff Johnson wrote: > > This is similar to the patch raised by NXP <3b12ec8f618e> > > <"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings"> > > note that there is a standard way to refer to a prior patch, in your case: > 3b12ec8f618e ("net: stmmac: dwmac-imx: set TSO/TBS TX queues default > settings") Yes, please fix. > (note this format is defined in the context of the Fixes tag at > <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>) A fixes tag would be great. But we can't point at 3b12ec8f618e, right? Can someone explain what the user-visible problem is? TBS cannot be used? Device reinit is require to enable it?
Hey ABC, I may have swamped you with information last time when talking about the commit message etiquette. This looks a lot better, there's some discussion going on about the canonical way to refer to another patch in the other thread (which I agree with in the other thread, outside that this looks pretty good to me). All that to say, I think you didn't understand my ask prior on the subject line: This is a new feature for netdev, so the Subject should have "net-next" in it: https://docs.kernel.org/process/maintainer-netdev.html#tl-dr i.e. assuming no other changes: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0 since at the moment I'm considering this a new feature. If it was a fix (and had a Fixes: tag), you'd target "net" instead of "net-next". I'll try and test this later today! I'm not sure how accustomed to inline responses you are, so I'll be verbose, but normally all responses are inline on list so look for em inline. I'll repost my missed comment from v1 below inline. On Tue, Feb 06, 2024 at 04:10:36PM -0800, Abhishek Chauhan wrote: > TSO and TBS cannot co-exist. TBS requires special descriptor to be > allocated at bootup. Initialising Tx queues at probe to support > TSO and TBS can help in allocating those resources at bootup. > > TX queues with TBS can support etf qdisc hw offload. > > This is similar to the patch raised by NXP <3b12ec8f618e> > <"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings"> > > Changes since v1: > - Subject is changed as per upstream guidelines > - Added a reference of a similar change done by NXP in > body of the commit message > > Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 31631e3f89d0..d2f9b8f6c027 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -728,7 +728,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > struct stmmac_resources stmmac_res; > struct device *dev = &pdev->dev; > struct qcom_ethqos *ethqos; > - int ret; > + int ret, i; > > ret = stmmac_get_platform_resources(pdev, &stmmac_res); > if (ret) > @@ -822,6 +822,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown; > } > > + /*Enable TSO on queue0 and enable TBS on rest of the queues*/ nitpicky: Please put spaces around the comment markers i.e. /* this */ over /*this*/ Thanks, Andrew > + for (i = 1; i < plat_dat->tx_queues_to_use; i++) > + plat_dat->tx_queues_cfg[i].tbs_en = 1; > + > return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); > } > > -- > 2.25.1 >
On Wed, Feb 07, 2024 at 10:19:34AM -0800, Jakub Kicinski wrote: > On Wed, 7 Feb 2024 09:26:05 -0800 Jeff Johnson wrote: > > > This is similar to the patch raised by NXP <3b12ec8f618e> > > > <"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings"> > > > > note that there is a standard way to refer to a prior patch, in your case: > > 3b12ec8f618e ("net: stmmac: dwmac-imx: set TSO/TBS TX queues default > > settings") > > Yes, please fix. > > > (note this format is defined in the context of the Fixes tag at > > <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>) > > A fixes tag would be great. But we can't point at 3b12ec8f618e, right? > Can someone explain what the user-visible problem is? > TBS cannot be used? Device reinit is require to enable it? > I'm not sure you'd consider this a fix, but yes the syntax there should be using that fixes style for sure. This enables the ability to use TBS / etf on queues other than 0. So I'd consider this a new feature for the Qualcomm variant of things here personally. Longer term it would be nice to be able to change which queues can do what via ethtool as was discussed over here, but for now this at least improves things and follows suit with the imx and intel variants: https://lore.kernel.org/netdev/c2497eef-1041-4cd0-8220-42622c8902f4@quicinc.com/ Thanks, Andrew
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 31631e3f89d0..d2f9b8f6c027 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -728,7 +728,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) struct stmmac_resources stmmac_res; struct device *dev = &pdev->dev; struct qcom_ethqos *ethqos; - int ret; + int ret, i; ret = stmmac_get_platform_resources(pdev, &stmmac_res); if (ret) @@ -822,6 +822,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev) plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown; } + /*Enable TSO on queue0 and enable TBS on rest of the queues*/ + for (i = 1; i < plat_dat->tx_queues_to_use; i++) + plat_dat->tx_queues_cfg[i].tbs_en = 1; + return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); }