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>
This commit is contained in:
committed by
David S. Miller
parent
f631ef39d8
commit
2081fd3445
@ -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 */
|
||||
|
Reference in New Issue
Block a user