summaryrefslogtreecommitdiff
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2018-07-27 10:45:05 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-27 19:38:46 +0300
commit1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21 (patch)
tree823f398d9c83214306a5cfb09a12c032fe3b91c6 /include/net/sch_generic.h
parent7a49d3d4ea42fe15db0d36e042df14a645d1fdce (diff)
downloadlinux-1f3ed383fb9a073ae2e408cd7a0717b04c7c3a21.tar.xz
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.h1
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;