[PATCH net-next 07/11] net: ethernet: qualcomm: ppe: Add IPQ5424 QM configuration

From: Luo Jie

Date: Thu Oct 08 2026 - 10:58:48 EST


Multicast queues are dedicated per PPE port. IPQ5424 has only 3 physical
PPE ports, versus IPQ9574's 6 PPE ports, so multicast queues 284 to 299 are
not available on IPQ5424, and 2010 buffers are assigned to the shared
group0 buffer pool, instead of IPQ9574's 2000.

Signed-off-by: Luo Jie <jie.luo@xxxxxxxxxxxxxxxx>
---
drivers/net/ethernet/qualcomm/ppe/ppe_config.c | 36 ++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
index 3afa57119323..dec8eed77253 100644
--- a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
+++ b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
@@ -314,6 +314,37 @@ static const struct ppe_qm_queue_config ipq9574_ppe_qm_queue_config[] = {
},
};

+/* Multicast queues are dedicated per PPE port. IPQ5424 has only 3 physical
+ * PPE ports, versus IPQ9574's 6 PPE ports, so multicast queues 284 to 299
+ * are not available on IPQ5424, and the buffer pool assigned to the general
+ * 'group0' is larger here, 2010 versus IPQ9574's 2000.
+ */
+static const int ipq5424_ppe_qm_group_config = 2010;
+
+/* Default QM settings for unicast and multicast queues for IPQ5424. */
+static const struct ppe_qm_queue_config ipq5424_ppe_qm_queue_config[] = {
+ {
+ /* QM settings for unicast queues 0 to 255. */
+ .queue_start = 0,
+ .queue_end = 255,
+ .prealloc_buf = 0,
+ .ceil = 1200,
+ .weight = 7,
+ .resume_offset = 36,
+ .dynamic = true,
+ },
+ {
+ /* QM settings for multicast queues 256 to 283. */
+ .queue_start = 256,
+ .queue_end = 283,
+ .prealloc_buf = 0,
+ .ceil = 250,
+ .weight = 0,
+ .resume_offset = 36,
+ .dynamic = false,
+ },
+};
+
/* PPE scheduler configuration for BM includes multiple entries. Each entry
* indicates the primary port to be assigned the buffers for the ingress or
* to release the buffers for the egress. Backup port ID will be used when
@@ -1547,6 +1578,11 @@ static int ppe_config_qm(struct ppe_device *ppe_dev)
queue_cfg = ipq9574_ppe_qm_queue_config;
queue_cfg_count = ARRAY_SIZE(ipq9574_ppe_qm_queue_config);
break;
+ case IPQ5424_PPE:
+ group_buffer_cfg = ipq5424_ppe_qm_group_config;
+ queue_cfg = ipq5424_ppe_qm_queue_config;
+ queue_cfg_count = ARRAY_SIZE(ipq5424_ppe_qm_queue_config);
+ break;
default:
dev_err(ppe_dev->dev, "Invalid PPE type %d\n", ppe_dev->type);
return -EINVAL;

--
2.43.0