lkml.org 
[lkml]   [2022]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-11-23 17:01    [W:0.197 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site