From: David Miller <davem@davemloft.net>
To: phil@nwl.cc
Cc: netdev@vger.kernel.org, edumazet@google.com
Subject: Re: [net PATCH] net: sched: Fix for duplicate class dump
Date: Thu, 18 Oct 2018 16:00:44 -0700 (PDT) [thread overview]
Message-ID: <20181018.160044.75473782850101628.davem@davemloft.net> (raw)
In-Reply-To: <20181018083426.6623-1-phil@nwl.cc>
From: Phil Sutter <phil@nwl.cc>
Date: Thu, 18 Oct 2018 10:34:26 +0200
> When dumping classes by parent, kernel would return classes twice:
>
> | # tc qdisc add dev lo root prio
> | # tc class show dev lo
> | class prio 8001:1 parent 8001:
> | class prio 8001:2 parent 8001:
> | class prio 8001:3 parent 8001:
> | # tc class show dev lo parent 8001:
> | class prio 8001:1 parent 8001:
> | class prio 8001:2 parent 8001:
> | class prio 8001:3 parent 8001:
> | class prio 8001:1 parent 8001:
> | class prio 8001:2 parent 8001:
> | class prio 8001:3 parent 8001:
>
> This comes from qdisc_match_from_root() potentially returning the root
> qdisc itself if its handle matched. Though in that case, root's classes
> were already dumped a few lines above.
>
> Fixes: cb395b2010879 ("net: sched: optimize class dumps")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Applied and queued up for -stable, thanks Phil.
prev parent reply other threads:[~2018-10-19 7:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 8:34 [net PATCH] net: sched: Fix for duplicate class dump Phil Sutter
2018-10-18 12:57 ` Jiri Pirko
2018-10-18 13:57 ` Eric Dumazet
2018-10-18 23:00 ` David Miller [this message]
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=20181018.160044.75473782850101628.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
/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).