[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221123160012.k3h3og6f5tjxpjcg@skbuf>
Date: Wed, 23 Nov 2022 18:00:12 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Alexander Lobakin <alexandr.lobakin@...el.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Claudiu Manoil <claudiu.manoil@....com>,
linux-kernel@...r.kernel.org
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.
Powered by blists - more mailing lists