[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+K12zUyZbwBpYRKHSa7=gtQTpHAg=y_jYFgSOGP1aWmw@mail.gmail.com>
Date: Thu, 18 Oct 2018 06:57:09 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: phil@....cc, David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [net PATCH] net: sched: Fix for duplicate class dump
On Thu, Oct 18, 2018 at 6:03 AM Jiri Pirko <jiri@...nulli.us> wrote:
>
> Thu, Oct 18, 2018 at 10:34:26AM CEST, phil@....cc wrote:
> >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>
>
> Reviewed-by: Jiri Pirko <jiri@...lanox.com>
Good catch, thanks for the fix !
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists