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 06/11] net: ethernet: qualcomm: ppe: Add IPQ5424 BM buffer configuration
Date: Mon, 12 Oct 2026 15:41:57 +0000	[thread overview]
Message-ID: <179181971709.434549.2234734092674556107@kernel.org> (raw)
In-Reply-To: <20261008-qcom_ipq5424_ppe-v1-6-16caf43e44ee@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 1

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] IPQ5424 probe fails at this one commit and works again after
  the next patch.
- [Low] The IPQ5424 BM USED/REACT debugfs dump reads the wrong registers
  at this one commit and is fixed later in the series.

--

net: ethernet: qualcomm: ppe: Add IPQ5424 BM buffer configuration

This commit adds a PPE type field so the driver can pick settings per SoC.
It also adds the IPQ5424 BM port and shared group buffer configuration. Some
BM register addresses and entry counts become per-device macros, because
IPQ5424 has 19 BM ports and some BM tables sit at different addresses.

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> index 8a553902ffad1..3afa571193238 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c

[ ... ]

> @@ -1472,12 +1535,23 @@ static int ppe_config_bm(struct ppe_device *ppe_dev)
>   */
>  static int ppe_config_qm(struct ppe_device *ppe_dev)
>  {
> +	int ret, i, group_buffer_cfg, queue_id, queue_cfg_count;
>  	const struct ppe_qm_queue_config *queue_cfg;
> -	int ret, i, queue_id, queue_cfg_count;
>  	u32 reg, multicast_queue_cfg[5];
>  	u32 unicast_queue_cfg[4];
>  	u32 group_cfg[3];
>  
> +	switch (ppe_dev->type) {
> +	case IPQ9574_PPE:
> +		group_buffer_cfg = ipq9574_ppe_qm_group_config;
> +		queue_cfg = ipq9574_ppe_qm_queue_config;
> +		queue_cfg_count = ARRAY_SIZE(ipq9574_ppe_qm_queue_config);
> +		break;
> +	default:
> +		dev_err(ppe_dev->dev, "Invalid PPE type %d\n", ppe_dev->type);
> +		return -EINVAL;
> +	}

[Severity: Medium]
Does IPQ5424 fail to probe at this commit? This switch has no IPQ5424_PPE
case. However, this patch now sets ppe_dev->type = IPQ5424_PPE for the
qcom,ipq5424-ppe compatible.

ppe_hw_config() always calls ppe_config_qm() right after ppe_config_bm().
On IPQ5424 the path is:

qcom_ppe_probe()
  ppe_hw_config()
    ppe_config_bm()    <- succeeds with the new IPQ5424 tables
    ppe_config_qm()    <- default branch, returns -EINVAL

Probe then fails with "PPE HW config failed".

The next patch in the series, "net: ethernet: qualcomm: ppe: Add IPQ5424
QM configuration", adds the IPQ5424_PPE case, so the series works once it
is fully applied.

Could the QM case be added here, or the ppe_config_qm() refactor be moved
into the next patch? Either way, this commit would stay bisectable on
IPQ5424.

Also, the commit message only describes the BM changes. It doesn't mention
the ppe_config_qm() refactor.

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_regs.h b/drivers/net/ethernet/qualcomm/ppe/ppe_regs.h
> index 746dfbb5a6821..441e8e04a80b1 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe_regs.h
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe_regs.h
> @@ -386,17 +386,32 @@

[ ... ]

> -#define PPE_BM_PORT_GROUP_ID_ADDR		0x600180
> -#define PPE_BM_PORT_GROUP_ID_ENTRIES		15
> +#define PPE_BM_PORT_GROUP_ID_IPQ9574_ADDR	0x600180
> +#define PPE_BM_PORT_GROUP_ID_IPQ5424_ADDR	0x6001c0

[Severity: Low]
Does the BM USED/REACT dump in debugfs read the wrong registers on IPQ5424
at this commit?

The IPQ5424 group ID table now starts at 0x6001c0. The counter tables
further down this file still use the IPQ9574 addresses and entry counts:

drivers/net/ethernet/qualcomm/ppe/ppe_regs.h:
#define PPE_BM_USED_CNT_TBL_ADDR		0x6001c0
#define PPE_BM_USED_CNT_TBL_ENTRIES		15
...
#define PPE_BM_REACT_CNT_TBL_ADDR		0x600240
#define PPE_BM_REACT_CNT_TBL_ENTRIES		15

ppe_bm_counter_get() uses these values whatever ppe_dev->type is:

drivers/net/ethernet/qualcomm/ppe/ppe_debugfs.c:ppe_bm_counter_get() {
    ...
	for (i = 0; i < PPE_BM_USED_CNT_TBL_ENTRIES; i++) {
		reg = PPE_BM_USED_CNT_TBL_ADDR + i * PPE_BM_USED_CNT_TBL_INC;
    ...
		reg = PPE_BM_REACT_CNT_TBL_ADDR + i * PPE_BM_REACT_CNT_TBL_INC;
    ...
}

On IPQ5424 this has three effects:

- The group ID registers are reported as used buffer counts.
- The react counts are read from the wrong address.
- BM ports 15-18 are never read.

The last patch in the series, "net: ethernet: qualcomm: ppe: Add IPQ5424
counter debugfs support", appears to fix this. It adds per-device
PPE_BM_USED_CNT_TBL_ADDR(ppe_dev) (0x600220) and
PPE_BM_REACT_CNT_TBL_ADDR(ppe_dev) (0x600280), both with 19 entries.

Could those definitions move into this patch with the other BM address
changes?

-- 
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
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 [this message]
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=179181971709.434549.2234734092674556107@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