diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-11 10:55:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-12 13:41:33 -0500 |
commit | 7d5509fa0d3ddfe252b4418513e493ac98de3317 (patch) | |
tree | d20be370f7b681c84946808aa29e4a4456594227 /include/net/sch_generic.h | |
parent | ec6743a10996d38e0438e5f45f2347ff2f42df0a (diff) | |
download | lwn-7d5509fa0d3ddfe252b4418513e493ac98de3317.tar.gz lwn-7d5509fa0d3ddfe252b4418513e493ac98de3317.zip |
net: sched: extend proto ops with 'put' callback
Add optional tp->ops->put() API to be implemented for filter reference
counting. This new function is called by cls API to release filter
reference for filters returned by tp->ops->change() or tp->ops->get()
functions. Implement tfilter_put() helper to call tp->ops->put() only for
classifiers that implement it.
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-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 e8cf36ed3e87..410dda80ca62 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -277,6 +277,7 @@ struct tcf_proto_ops { struct netlink_ext_ack *extack); void* (*get)(struct tcf_proto*, u32 handle); + void (*put)(struct tcf_proto *tp, void *f); int (*change)(struct net *net, struct sk_buff *, struct tcf_proto*, unsigned long, u32 handle, struct nlattr **, |