Messages in this thread | | | Date | Wed, 23 Nov 2022 18:00:12 +0200 | From | Vladimir Oltean <> | Subject | Re: [PATCH net] net: enetc: preserve TX ring priority across reconfiguration |
| |
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.
| |