diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-07-27 09:45:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-27 18:38:46 +0200 |
commit | 1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21 (patch) | |
tree | 823f398d9c83214306a5cfb09a12c032fe3b91c6 /include/net/sch_generic.h | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klasse... (diff) | |
download | linux-1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21.tar.xz linux-1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21.zip |
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>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 085c509c8674..c5432362dc26 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -314,6 +314,7 @@ struct tcf_chain { struct tcf_block *block; u32 index; /* chain index */ unsigned int refcnt; + unsigned int action_refcnt; bool explicitly_created; const struct tcf_proto_ops *tmplt_ops; void *tmplt_priv; |