Linux Documentation
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: jie.luo@oss.qualcomm.com
Cc: 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, quic_leiwei@quicinc.com,
	quic_suruchia@quicinc.com, quic_pavir@quicinc.com,
	horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org,
	rdunlap@infradead.org, netdev@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com
Subject: Re: [PATCH net-next 05/11] net: ethernet: qualcomm: ppe: Add platform support for IPQ5424
Date: Mon, 12 Oct 2026 15:41:55 +0000	[thread overview]
Message-ID: <179181971523.434549.1300369159235274267@kernel.org> (raw)
In-Reply-To: <20261008-qcom_ipq5424_ppe-v1-5-16caf43e44ee@oss.qualcomm.com>

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] In commit "net: ethernet: qualcomm: ppe: Add platform support for
  IPQ5424", the qcom,ipq5424-ppe compatible is enabled before any per-…
- [Low] At commit "net: ethernet: qualcomm: ppe: Add platform support for
  IPQ5424", ppe_port_resource_get() in…

--

net: ethernet: qualcomm: ppe: Add platform support for IPQ5424

This commit adds struct ppe_of_data to the PPE driver. It holds the
per-SoC clock rate, port count, regmap access tables and interconnect
paths. The commit also adds the qcom,ipq5424-ppe compatible.

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe.c b/drivers/net/ethernet/qualcomm/ppe/ppe.c
> index 3c301e609d3e3..f71b673b6f978 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe.c
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe.c

[ ... ]

> @@ -218,8 +301,25 @@ static void qcom_ppe_remove(struct platform_device *pdev)
>  	ppe_debugfs_teardown(ppe_dev);
>  }
>  

[ ... ]

> +static const struct ppe_of_data ipq5424_data = {
> +	.ppe_rate = IPQ5424_PPE_CLK_RATE,
> +	.num_ports = IPQ5424_PPE_PORT_MAX,

[Severity: Low]
At this commit num_ports is 4. With that value, does ppe_port_resource_get()
in ppe_config.c still return the reserved resource when asked for it?

The function still indexes the single IPQ9574 table, where the reserved
entry sits at fixed index 8:

drivers/net/ethernet/qualcomm/ppe/ppe_config.c:ppe_port_resource_get() {
    ...
	if (port > ppe_dev->num_ports)
		return -EINVAL;

	res = ppe_scheduler_res[port];
    ...
}

On IPQ5424, a request with port == num_ports (4) would get the queue and
node ranges of IPQ9574 physical port 4 instead of the reserved entry.
Index 8 can no longer be reached.

No in-tree caller passes port == num_ports at this commit.
ppe_queue_dest_init() iterates port_id < num_ports, and
ppe_queues_to_ring_init() uses port 0.

A later patch in this series, "net: ethernet: qualcomm: ppe: Add IPQ5424
scheduler resource configuration", fixes this. It adds
ipq5424_ppe_scheduler_res[] with the reserved entry last, at index 4. It
also makes ppe_port_resource_get() pick the table per SoC and check
port >= scheduler_res_len.

Could that change come before this one in the series?

> +	.regmap_config = &regmap_config_ipq5424,
> +	.icc_paths = ipq5424_ppe_icc_data,
> +	.num_icc_paths = ARRAY_SIZE(ipq5424_ppe_icc_data),
> +};
> +
>  static const struct of_device_id qcom_ppe_of_match[] = {
> -	{ .compatible = "qcom,ipq9574-ppe" },
> +	{ .compatible = "qcom,ipq9574-ppe", .data = &ipq9574_data },
> +	{ .compatible = "qcom,ipq5424-ppe", .data = &ipq5424_data },

[Severity: Low]
Is it safe to enable the qcom,ipq5424-ppe compatible before ppe_config.c
can tell the two SoCs apart?

At this commit neither struct ppe_of_data nor struct ppe_device has a type
field. So on IPQ5424, ppe_hw_config() still programs the IPQ9574-only
tables:

ppe_config_bm():
	port_cfg = ipq9574_ppe_bm_port_config;

ppe_config_qm():
	queue_cfg = ipq9574_ppe_qm_queue_config;

ppe_config_scheduler():
	bm_cfg = ipq9574_ppe_sch_bm_config;
	...
	qm_cfg = ipq9574_ppe_sch_qm_config;

The scheduler tables give BM/QM arbitration slots to PPE ports 4-7. Those
ports don't exist on IPQ5424, and none of the slots has a backup port.

The BM port thresholds also cover the missing MAC3-5 and EIP ports. The
queue config includes multicast queues 284-299, which IPQ5424 doesn't
have.

Three later patches in this series fix this by adding
switch (ppe_dev->type) with IPQ5424_PPE cases:

  "net: ethernet: qualcomm: ppe: Add IPQ5424 BM buffer configuration"
  "net: ethernet: qualcomm: ppe: Add IPQ5424 QM configuration"
  "net: ethernet: qualcomm: ppe: Add IPQ5424 scheduler configuration"

Could the IPQ5424 compatible be added after those patches? Then a bisect
that lands on this commit wouldn't probe IPQ5424 with the IPQ9574
configuration.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261008-qcom_ipq5424_ppe-v1-0-16caf43e44ee%40oss.qualcomm.com

  reply	other threads:[~2026-10-12 15:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 14:51 [PATCH net-next 00/11] net: ethernet: qualcomm: ppe: Add support for IPQ5424 SoC Luo Jie
2026-10-08 14:51 ` [PATCH net-next 01/11] dt-bindings: net: qcom,ipq9574-ppe: Split EDMA reset into sys and apb Luo Jie
2026-10-08 19:49   ` Rob Herring (Arm)
2026-10-08 14:51 ` [PATCH net-next 02/11] net: ethernet: qualcomm: ppe: Fix multicast queue config table index Luo Jie
2026-10-12 15:41   ` netdev-bot+sashiko
2026-10-08 14:51 ` [PATCH net-next 03/11] dt-bindings: net: qcom,ipq9574-ppe: Add IPQ5424 PPE support Luo Jie
2026-10-08 20:08   ` Rob Herring (Arm)
2026-10-12 15:41   ` netdev-bot+sashiko
2026-10-08 14:51 ` [PATCH net-next 04/11] docs: networking: Document IPQ5424 as a supported SoC Luo Jie
2026-10-12 15:41   ` netdev-bot+sashiko
2026-10-08 14:51 ` [PATCH net-next 05/11] net: ethernet: qualcomm: ppe: Add platform support for IPQ5424 Luo Jie
2026-10-12 15:41   ` netdev-bot+sashiko [this message]
2026-10-08 14:51 ` [PATCH net-next 06/11] net: ethernet: qualcomm: ppe: Add IPQ5424 BM buffer configuration Luo Jie
2026-10-12 15:41   ` netdev-bot+sashiko
2026-10-08 14:51 ` [PATCH net-next 07/11] net: ethernet: qualcomm: ppe: Add IPQ5424 QM configuration Luo Jie
2026-10-12 15:41   ` netdev-bot+sashiko
2026-10-08 14:51 ` [PATCH net-next 08/11] net: ethernet: qualcomm: ppe: Add IPQ5424 scheduler resource configuration Luo Jie
2026-10-08 14:51 ` [PATCH net-next 09/11] net: ethernet: qualcomm: ppe: Add IPQ5424 scheduler configuration Luo Jie
2026-10-08 14:51 ` [PATCH net-next 10/11] net: ethernet: qualcomm: ppe: Add IPQ5424 service code configuration Luo Jie
2026-10-08 14:51 ` [PATCH net-next 11/11] net: ethernet: qualcomm: ppe: Add IPQ5424 counter debugfs support Luo Jie
2026-10-08 14:54 ` [PATCH net-next 00/11] net: ethernet: qualcomm: ppe: Add support for IPQ5424 SoC netdev-bot+sinfo
2026-10-09  3:42   ` Jie Luo
2026-10-08 19:07 ` Andrew Lunn
2026-10-09  3:31   ` Jie Luo

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=179181971523.434549.1300369159235274267@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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_kkumarcs@quicinc.com \
    --cc=quic_leiwei@quicinc.com \
    --cc=quic_linchen@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