diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2024-03-25 20:47:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-29 09:46:39 +0000 |
commit | 2081fd3445fec6b9813c20e8b910c2abd6de31cb (patch) | |
tree | f8fe6a0431b35d16c5e1b4bbd2c960622d9820b0 /include/net/sch_generic.h | |
parent | f631ef39d81956a2ee69d25039781ceae1162f62 (diff) |
net: sched: cls_api: add filter counter
Maintain a count of filters per block.
Counter updates are protected by cb_lock, which is
also used to protect the offload counters.
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 120a4ca6ec9b..eb3872c22fcd 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -422,6 +422,7 @@ struct tcf_proto { */ spinlock_t lock; bool deleting; + bool counted; refcount_t refcnt; struct rcu_head rcu; struct hlist_node destroy_ht_node; @@ -471,6 +472,7 @@ struct tcf_block { struct flow_block flow_block; struct list_head owner_list; bool keep_dst; + atomic_t filtercnt; /* Number of filters */ atomic_t skipswcnt; /* Number of skip_sw filters */ atomic_t offloadcnt; /* Number of oddloaded filters */ unsigned int nooffloaddevcnt; /* Number of devs unable to do offload */ |