On 1/10/2025 1:52 AM, Simon Horman wrote:
On Wed, Jan 08, 2025 at 09:47:14PM +0800, Luo Jie wrote:
Configure unicast and multicast hardware queues for the PPE
ports to enable packet forwarding between the ports.
Each PPE port is assigned with a range of queues. The queue ID
selection for a packet is decided by the queue base and queue
offset that is configured based on the internal priority and
the RSS hash value of the packet.
Signed-off-by: Luo Jie <quic_luoj@xxxxxxxxxxx>
---
drivers/net/ethernet/qualcomm/ppe/ppe_config.c | 357 ++++++++++++++++++++++++-
drivers/net/ethernet/qualcomm/ppe/ppe_config.h | 63 +++++
drivers/net/ethernet/qualcomm/ppe/ppe_regs.h | 21 ++
3 files changed, 440 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
...
@@ -673,6 +701,111 @@ static struct ppe_scheduler_port_config ppe_port_sch_config[] = {
},
};
+/* The scheduler resource is applied to each PPE port, The resource
+ * includes the unicast & multicast queues, flow nodes and DRR nodes.
+ */
+static struct ppe_port_schedule_resource ppe_scheduler_res[] = {
+ { .ucastq_start = 0,
+ .ucastq_end = 63,
+ .mcastq_start = 256,
+ .ucastq_end = 271,
Hi Luo Jie,
This appears to duplicate the initialisation of .ucastq_end.
Should the line above initialise .mcastq_end instead?
Likewise for other elements of this array.
Flagged by W=1 builds with both clang-19 and gcc-14.
Thanks for pointing to this. I will update the code and build the
patches with latest GCC version gcc-14 flagged by W=1 to check the
patches.
+ .flow_id_start = 0,
+ .flow_id_end = 0,
+ .l0node_start = 0,
+ .l0node_end = 7,
+ .l1node_start = 0,
+ .l1node_end = 0,
+ },
+ { .ucastq_start = 144,
+ .ucastq_end = 159,
+ .mcastq_start = 272,
+ .ucastq_end = 275,
+ .flow_id_start = 36,
+ .flow_id_end = 39,
+ .l0node_start = 48,
+ .l0node_end = 63,
+ .l1node_start = 8,
+ .l1node_end = 11,
+ },
...
+};
...