From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org, andrew@lunn.ch,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next v2] selftests: drv-net: so_txtime: only send test traffic to sch_etf
Date: Tue, 11 Aug 2026 08:27:23 -0700 [thread overview]
Message-ID: <20260811082723.43a9af08@kernel.org> (raw)
In-Reply-To: <CAF=yD-JsW3moq_xw+ZM5c8hxg77btODoBujMpNut3Nr04PYt4A@mail.gmail.com>
On Tue, 11 Aug 2026 10:29:12 -0400 Willem de Bruijn wrote:
> I can reproduce after
>
> tc qdisc replace dev eth0 root handle pfifo_fast
> tc qdisc replace dev eth0 root handle 1: pfifo_fast
>
> It is not possible to replace tc qdisc replace with a del + add pair,
> due to "Error: Cannot delete qdisc with handle of zero." on systems
> with the default 0: qdisc, like my debian trixie.
>
> The simplest change, then, is to replace the qdisc twice, first for
> the kind, then for the handle.
>
> @@ -45,17 +45,18 @@ def _qdisc_setup(ifname, qdisc, optargs=""):
> """
> orig = tc(f"qdisc show dev {ifname} root", json=True)[0].get("kind", None)
> defer(tc, f"qdisc replace dev {ifname} root {orig}")
> + tc(f"qdisc replace dev {ifname} root {qdisc} {optargs}")
> tc(f"qdisc replace dev {ifname} root handle 1: {qdisc} {optargs}")
>
> It's an extra replace, so a bit ugly. But avoiding that requires
> parsing the json for existing handle, branching on that.
>
> I'm testing the above some more, will send that if no concerns.
If we are adding an extra command adding del would seem more intuitive?
But no preference.
The issue may be because the ring reconfig test now also sets up qdiscs.
And we don't have a proper way to restore previous qdisc config in the
tests. If another test needs to change qdiscs we should probably add
better infra, but for now I think the simple workaround you suggest is
best.
next prev parent reply other threads:[~2026-08-11 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 16:00 [PATCH net-next v2] selftests: drv-net: so_txtime: only send test traffic to sch_etf Willem de Bruijn
2026-08-11 1:20 ` patchwork-bot+netdevbpf
2026-08-11 1:31 ` Jakub Kicinski
2026-08-11 14:29 ` Willem de Bruijn
2026-08-11 15:27 ` Jakub Kicinski [this message]
2026-08-11 18:36 ` Willem de Bruijn
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=20260811082723.43a9af08@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@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