]> asedeno.scripts.mit.edu Git - linux.git/commit
net: sched: don't dump chains only held by actions
authorJiri Pirko <jiri@mellanox.com>
Fri, 27 Jul 2018 07:45:05 +0000 (09:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Jul 2018 16:38:46 +0000 (09:38 -0700)
commit1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21
tree823f398d9c83214306a5cfb09a12c032fe3b91c6
parent7a49d3d4ea42fe15db0d36e042df14a645d1fdce
net: sched: don't dump chains only held by actions

In case a chain is empty and not explicitly created by a user,
such chain should not exist. The only exception is if there is
an action "goto chain" pointing to it. In that case, don't show the
chain in the dump. Track the chain references held by actions and
use them to find out if a chain should or should not be shown
in chain dump.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h
include/net/sch_generic.h
net/sched/act_api.c
net/sched/cls_api.c