Re: [PATCH net-next 2/2] net: macb: configure ENST registers for all queues
From: Karumanchi, Vineeth
Date: Mon Jul 27 2026 - 01:32:43 EST
Hi Théo Lebrun,
On 7/24/2026 11:36 PM, Théo Lebrun wrote:
Hello Vineeth,//
On Fri Jul 24, 2026 at 6:32 AM CEST, Vineeth Karumanchi wrote:
The initial "tc" command was not overwriting the reset value of ENSTBut if a subset of queues are configured, the remaining queues don't
registers if only a subset of queues were configured, leading to an
invalid setup. To fix this, configure all queues unconditionally.
Unconfigured queues are zero-initialized via kcalloc(), ensuring a
complete and consistent configuration.
have their ENST support enabled thanks to ENST_CONTROL and their ENST
per-queue register values aren't read? Or HW is broken and reads ENST
registers anyway? Or something else I misunderstood?
What reset value of ENST regs you observed that caused you trouble?
That info could make it into the commit message.
Yes, this is a confirmed hardware issue. We raised it with Cadence, and they have
acknowledged the problem. The reset value of the |enst_on_time_qX| registers is *0x0001FFFF*.
During ENST initialization, packet interleaving was observed when only a
subset of the available queues was configured, while the remaining queues—whose
corresponding |enst_on_time_qX| registers still contained non-zero values—were left disabled in |ENST_CONTROL|.
For example, in a configuration where only two of the four queues are enabled,
some packets from *Q0* getting transmitted during the *Q1* time slot, and vice versa.
Furthermore, once the hardware enters this state, it does not recover even after a
complete ENST queue reconfiguration is performed.
Thanks
🙏 Vineeth
The queue_id field in struct macb_queue_enst_config becomes redundantThanks,
once the array is indexed by queue id, so drop it.
Key changes:
- Drop queue_id from struct macb_queue_enst_config
- Allocate enst_queue[] based on bp->num_queues instead of
conf->num_entries
- Index enst_queue[] directly with the queue number
- Program ENST registers for all queues
Fixes: 89934dbf169e ("net: macb: Add TAPRIO traffic scheduling support")
Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@xxxxxxx>
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com