Re: [PATCH net] net: stmmac: re-apply taprio offload in __stmmac_open()

Maxime Chevallier <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Hello Lorenzo,

On 8/25/26 11:24, Lorenzo Bianconi wrote:
> The core soft reset issued in stmmac_init_dma_engine() clears the
> MTL_EST registers, but nothing re-applies the taprio offload after it:
> priv->est->enable stays true while the hardware EST block is left
> disabled. The TX/XDP paths then keep dropping frames larger than
> priv->est->max_sdu[] and taprio is reported as offloaded, although the
> EST block is not programmed.
> 
> Re-apply the taprio offload in __stmmac_open() after PTP is up. The
> base time is recomputed from the reserved base time and the current PTP
> time, since the timestamp counter has been re-initialized and the
> previously programmed base time is stale.

I agree with idea, but the way I see that, this new reconfigure method shares
some code with stmmac_tc.c's tc_taprio_configure() step (the base time computation).

Can you also take a pass on that, so that we have a single helper (your new
stmmac_est_reconfigure) that does the base time computation and the EST setup, that
would be used in the .ndo_open, clock adjust and tc_taprio configuration ?

Maybe rename it stmmac_setup_est() to keep consistency with the stmmac_setup_ptp()
that comes before, this would also open the door for an equivalent
stmmac_cleanup_est() if we ever need it.

Maxime
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.