netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Alexander Lobakin <alexandr.lobakin@intel.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: enetc: preserve TX ring priority across reconfiguration
Date: Wed, 23 Nov 2022 18:00:12 +0200	[thread overview]
Message-ID: <20221123160012.k3h3og6f5tjxpjcg@skbuf> (raw)
In-Reply-To: <20221123155116.484163-1-alexandr.lobakin@intel.com>

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.

  reply	other threads:[~2022-11-23 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 13:09 [PATCH net] net: enetc: preserve TX ring priority across reconfiguration Vladimir Oltean
2022-11-23 15:51 ` Alexander Lobakin
2022-11-23 16:00   ` Vladimir Oltean [this message]
2022-11-24  4:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123160012.k3h3og6f5tjxpjcg@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).