mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: mail@tk154.de
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
Subject: Re: [PATCH net-next 4/4] net: ethernet: qualcomm: ppe: Add IPQ5332 support
Date: Thu, 08 Oct 2026 03:31:18 +0000	[thread overview]
Message-ID: <179143027873.434549.15034517641240789690@kernel.org> (raw)
In-Reply-To: <20261005152915.101780-5-mail@tk154.de>

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

      reply	other threads:[~2026-10-08  3:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 15:29 [PATCH net-next 0/4] " Til Kaiser
2026-10-05 15:29 ` [PATCH net-next 1/4] net: ethernet: qualcomm: ppe: Select hardware configuration by SoC Til Kaiser
2026-10-05 15:29 ` [PATCH net-next 2/4] dt-bindings: net: qcom,ipq9574-ppe: Tighten ethernet port node constraints Til Kaiser
2026-10-08  3:31   ` netdev-bot+sashiko
2026-10-09  8:36   ` Krzysztof Kozlowski
2026-10-05 15:29 ` [PATCH net-next 3/4] dt-bindings: net: qcom,ipq9574-ppe: Add IPQ5332 support Til Kaiser
2026-10-08  3:31   ` netdev-bot+sashiko
2026-10-09  8:38   ` Krzysztof Kozlowski
2026-10-05 15:29 ` [PATCH net-next 4/4] net: ethernet: qualcomm: ppe: " Til Kaiser
2026-10-08  3:31   ` netdev-bot+sashiko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179143027873.434549.15034517641240789690@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jie.luo@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@tk154.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_leiwei@quicinc.com \
    --cc=quic_pavir@quicinc.com \
    --cc=quic_suruchia@quicinc.com \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®