[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181018.160044.75473782850101628.davem@davemloft.net>
Date: Thu, 18 Oct 2018 16:00:44 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: phil@....cc
Cc: netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [net PATCH] net: sched: Fix for duplicate class dump
From: Phil Sutter <phil@....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@....cc>
Applied and queued up for -stable, thanks Phil.
Powered by blists - more mailing lists