linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Suchit K <suchitkarunakaran@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org,  jhs@mojatatu.com, xiyou.wangcong@gmail.com,
	jiri@resnulli.us, sdf@fomichev.me,  kuniyu@google.com,
	aleksander.lobakin@intel.com, netdev@vger.kernel.org,
	 skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: Revert tx queue length on partial failure in dev_qdisc_change_tx_queue_len()
Date: Tue, 22 Jul 2025 09:28:14 -0700	[thread overview]
Message-ID: <CANn89i+dif2qjKM6oO1o=BKutXoO6w9kWnnPfc50BDBJ7VpAeQ@mail.gmail.com> (raw)
In-Reply-To: <CAO9wTFgzNfPKBOY5XanjnUeE9FfAGovg02ZU6Q1TH-EnA52LAA@mail.gmail.com>

On Tue, Jul 22, 2025 at 9:22 AM Suchit K <suchitkarunakaran@gmail.com> wrote:
>
> >
> > WRITE_ONCE() is missing.
>
> Oops, I'm sorry about that.
>
> >
> > > +               while (i >= 0) {
> > > +                       qdisc_change_tx_queue_len(dev, &dev->_tx[i]);
> >
> > What happens if one of these calls fails ?
> >
> > I think a fix will be more complicated...
>
> I did consider that, but since I didn’t have a solution, I assumed it
> wouldn’t fail.

But this definitely could fail. Exactly the same way than the first time.

I also have a question. In the Qdisc_ops structure,
> there’s a function pointer for change_tx_queue_len, but I was only
> able to find a single implementation which is
> pfifo_fast_change_tx_queue_len. Is that the only one? Apologies if
> this isn’t the right place to ask such questions. I’d really
> appreciate any feedback. Thank you!

I think only pfifo_fast has to re-allocate its data structures.

Other qdiscs eventually dynamically read dev->tx_queue_len (thus the
WRITE_ONCE() I mentioned to you)

  reply	other threads:[~2025-07-22 16:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22  7:15 [PATCH] net: Revert tx queue length on partial failure in dev_qdisc_change_tx_queue_len() Suchit Karunakaran
2025-07-22 13:36 ` Jakub Kicinski
2025-07-22 13:56   ` Suchit K
2025-07-22 14:33     ` Jakub Kicinski
2025-07-22 14:48       ` Suchit K
2025-07-22 15:41 ` Eric Dumazet
2025-07-22 16:21   ` Suchit K
2025-07-22 16:28     ` Eric Dumazet [this message]
2025-07-22 16:45       ` Suchit K
2025-07-23 18:17   ` Suchit K
2025-07-23 18:36     ` Eric Dumazet
2025-07-25 17:47     ` Cong Wang
2025-07-26 11:02       ` Suchit K
2025-07-23 15:52 ` kernel test robot

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='CANn89i+dif2qjKM6oO1o=BKutXoO6w9kWnnPfc50BDBJ7VpAeQ@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=skhan@linuxfoundation.org \
    --cc=suchitkarunakaran@gmail.com \
    --cc=xiyou.wangcong@gmail.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).