Re: [PATCH net] net: enetc: preserve TX ring priority across reconfiguration
From: Vladimir Oltean
Date: Wed Nov 23 2022 - 11:00:34 EST
On Wed, Nov 23, 2022 at 04:51:16PM +0100, Alexander Lobakin wrote:
> > + if (err) {
> > + for (i = 0; i < priv->num_tx_rings; i++) {
> > + tx_ring = priv->tx_ring[i];
> > + tx_ring->prio = taprio->enable ? 0 : i;
>
> Side note: is that `taprio ? 0 : i` correct? It's an error path
> IIUC, why not just unconditional 0?
Yes, it is intended. On error path the priorities are restored.
If taprio->enable was false, but disabling failed, the ring priorities
need to be set as if taprio->enable was true.