]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: optimize class dumps
authorEric Dumazet <edumazet@google.com>
Thu, 11 May 2017 04:59:28 +0000 (21:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2017 01:37:40 +0000 (21:37 -0400)
commit3db3a7a785bb1f8ba60caaf2d2c64f2b32093cbb
tree6f2fbea893bf9e440268a336fa153b066166993d
parent056b0d6a248a6b542d70a52719dfbfc2b3c1bd2c
net: sched: optimize class dumps

In commit ef01a4f4ae16 ("net: sched: convert qdisc linked list to
hashtable") we missed the opportunity to considerably speed up
tc_dump_tclass_root() if a qdisc handle is provided by user.

Instead of iterating all the qdiscs, use qdisc_match_from_root()
to directly get the one we look for.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c