๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #463

Re: [PATCH net-next 4/4] net: ethernet: qualcomm: ppe: Add IPQ5332 support

#463
From: netdev-bot+sashiko
Date: Thu, 08 Oct 2026 03:31
142 lines
10392 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] On IPQ5332, the comment in ppe_clock_init_and_reset() (ppe.c
  lines 187-190) is no longer true.

Pre-existing issues:
- [Medium] This problem wasn't introduced by this patch, but the patch
  depends on it.

--

net: ethernet: qualcomm: ppe: Add IPQ5332 support

This patch adds qcom,ipq5332-ppe match data to the PPE driver: a 200 MHz
PPE clock, four interconnect paths and three ports. It also adds IPQ5332
specific BM/QM limits, thresholds and scheduler arbitration tables, and
reuses the IPQ9574 scheduler resource table for ports 0-2.

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe.c b/drivers/net/ethernet/qualcomm/ppe/ppe.c
> index 0ef72c20364be..69e970db4a78b 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe.c
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe.c

[ ... ]

> @@ -65,6 +89,14 @@ static const struct icc_bulk_data ipq9574_icc_data[] = {
>  	},
>  };
>  
> +static const struct ppe_plat_data ipq5332_ppe_data = {
> +	.soc_cfg = &ipq5332_soc_config,
> +	.icc_data = ipq5332_icc_data,
> +	.ppe_clk_rate = 200000000,

[Severity: Low]
This isn't a bug, but now that IPQ5332 goes through
ppe_clock_init_and_reset(), is the comment there still accurate?

drivers/net/ethernet/qualcomm/ppe/ppe.c:ppe_clock_init_and_reset() {
    ...
	/* The PPE clocks have a common parent clock. Setting the clock
	 * rate of "ppe" ensures the clock rate of all PPE clocks is
	 * configured to the same rate.
	 */
	clk = devm_clk_get(dev, "ppe");
    ...
}

In this series, the qcom,ipq9574-ppe.yaml binding requires a fifth clock
for qcom,ipq5332-ppe. It is described as "PPE sleep clock from GCC" and
does not share the NSSCC parent of the other PPE clocks.

devm_clk_bulk_get_all_enabled() enables that clock at its own rate. Only
"ppe" gets clk_set_rate().

Could the comment be updated so it no longer claims that all PPE clocks
end up at the same rate?

> +	.num_icc = ARRAY_SIZE(ipq5332_icc_data),
> +	.num_ports = 3,
> +};

[ ... ]

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> index 65ac6c0841d5a..91e6ee9524a60 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c

[ ... ]

> @@ -264,6 +298,30 @@ static const struct ppe_qm_queue_config ipq9574_ppe_qm_queue_config[] = {
>  	},
>  };
>  
> +/* IPQ5332 unicast and multicast queue thresholds. */
> +static const struct ppe_qm_queue_config ipq5332_ppe_qm_queue_config[] = {

[ ... ]

> +	{
> +		/* QM settings for multicast queues 256 to 299. */
> +		.queue_start	= 256,
> +		.queue_end	= 299,
> +		.prealloc_buf	= 0,
> +		.ceil		= 50,
> +		.weight		= 0,
> +		.resume_offset	= 18,
> +		.dynamic	= false,
> +	},
> +};

[Severity: Medium]
This is a pre-existing issue, but do these multicast thresholds ever reach
the hardware? ppe_config_qm() indexes the multicast admission control
table with the global queue ID:

drivers/net/ethernet/qualcomm/ppe/ppe_config.c:ppe_config_qm() {
    ...
	} else {
		reg = PPE_AC_MULTICAST_QUEUE_CFG_TBL_ADDR +
		      PPE_AC_MULTICAST_QUEUE_CFG_TBL_INC * queue_id;
    ...
}

The multicast config table is a separate table with 44 entries:

#define PPE_AC_MULTICAST_QUEUE_CFG_TBL_ADDR	0x84a000
#define PPE_AC_MULTICAST_QUEUE_CFG_TBL_ENTRIES	44
#define PPE_AC_MULTICAST_QUEUE_CFG_TBL_INC	0x10

With that indexing, queue 256 maps to 0x84b000 and queue 299 maps to
0x84b2b0. Both addresses are past the end of the table at 0x84a2c0 and
before PPE_AC_GRP_CFG_TBL_ADDR (0x84c000).

The debugfs code for the matching multicast counter table subtracts the
unicast entry count first:

drivers/net/ethernet/qualcomm/ppe/ppe_debugfs.c:ppe_queue_counter_get() {
    ...
			int mq_offset = i - PPE_AC_UNICAST_QUEUE_CFG_TBL_ENTRIES;
    ...
}

If that is the intended indexing, neither these IPQ5332 values (ceil 50,
resume_offset 18) nor the IPQ9574 ones are ever written. The real
multicast entries keep their reset values, and the read-modify-write
cycles hit undocumented QM addresses instead.

This looks like it goes back to commit 806268dc7efd ("net: ethernet:
qualcomm: Initialize PPE queue management for IPQ9574").

Should ppe_config_qm() use queue_id - PPE_AC_UNICAST_QUEUE_CFG_TBL_ENTRIES
as the multicast table index?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261005152915.101780-1-mail%40tk154.de
Technical Details
Message-ID: <179143027873.434549.15034517641240789690@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342709-linux-kernel-netdev=dewy.ru
References: <20261005152915.101780-5-mail@tk154.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342709-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 4/4] net: ethernet: qualcomm: ppe: Add IPQ5332 support
Date: Thu, 08 Oct 2026 03:31:18 +0000
Organization: Usenet Network
Message-ID: <179143027873.434549.15034517641240789690@kernel.org>
References: <20261005152915.101780-5-mail@tk154.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="794324"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:4pF7YGGj1tl0hR7CwzNtTqAMLt4= sha256:tNwwZoxBZpQCz44SdvImVcwnjgbz/SdSgxjUQvzcTnQ=
	sha1:GDM+lHhuUVO9mmMIC6IqD+97okI= sha256:T0YuXk0ZudYhoYL1UsnaOC3B4aTJaVcLQ+igjP3tdz8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 8A68510F2DF; Thu,  8 Oct 2026 06:32:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.44
X-Spam-Status: No, score=-1.44 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id I7BiwRxtI49K;
	Thu,  8 Oct 2026 06:32:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-342709-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 4B96410CAD9; Thu,  8 Oct 2026 06:32:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id 6E069605B7B; Thu,  8 Oct 2026 03:31:45 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ABBA3839A9;
	Thu,  8 Oct 2026 03:31:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SuTyKB8P"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 CE4DD37FF53;
	Thu,  8 Oct 2026 03:31:20 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791430282; cv=none; b=jZhLjal5X8w72wm5pWX1mTaVTKVwHcuxexXndawb9jhfrK5mfWwEKkKpw/I9W8ILBgvdfm5cfbTU8bSd40pnyR4qbxHVdl553gMtxyLJ4Eg8PefQ6QcKoQwSD5jb1QsrJtFlDwceevorUTob9zXqMHURVuCHcaXiT+WRVqnUolU=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791430282; c=relaxed/simple;
	bh=Rsk8qalhAFrI7bNXjDuRHfYdKBM4cNyRHBGNeCntXgU=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=gge6VBwg/0Q/ylsYr2ugsWkz4PWU9f9pz5BuKJ2pKQfsZjcmGzaEDEdjXuFargoLrYmMF4LucFmy80/k5sOHQprf1P3ESNPg0Xd9lQVjPXQ6kwFw+3AtYWA6crGGNQxRr/lYCQT31h0E8FS5xhYofSqfDJrVh+02Pm9vbGnCFOA=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SuTyKB8P; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32AA01F000FF;
	Thu,  8 Oct 2026 03:31:19 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1791430280;
	bh=doKya4TAuwuHLjF27X1lAAmDyISiCJjGAuVsJzbKKn8=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=SuTyKB8PKCpuXQRpNNMteStsvgdrrTq2oVSPKL1hgKIngWsnJNqMsCeOMPeokbN3J
	 +zzkePmdsXkyx29wm5SIejSGty1eVdM8tJXkuJwxrwbi+ki0Sir7RWcrD33lQJNjpG
	 DbuZXEhScB1+Crbc+ehCF6MXNxJqPwTzc55mFDWNR6ca8ChFRG8ycFsH7yE1J6tWfX
	 Yo3eKm9IYYhAZ+n7MqeGhZk8oH32Ou7W3btRNvGo6SUZ/dSeLawd1ApR4KZY09Yi/O
	 LoZ8BxVw1v6vIHiLyPfJtxgN4NrgFt3QlDivG8m8mJrBGScsdyaHuo1+kiuk8omp0e
	 LtI8yrqJImX4Q==
X-Cc: netdev@vger.kernel.org, jie.luo@oss.qualcomm.com, andrew+netdev@lunn.ch,
 davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, horms@kernel.org,
 corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
 quic_leiwei@quicinc.com, quic_suruchia@quicinc.com, quic_pavir@quicinc.com,
 linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
X-In-Reply-To: <20261005152915.101780-5-mail@tk154.de>
X-sashiko-severity: Low
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>