diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-08-26 15:45:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-26 23:17:43 +0200 |
commit | a449a3e77a85fc8b31fef7238451dc87af8ff1af (patch) | |
tree | 4e009d7b84bec395c536bcd244f8543ccd33de40 /include/net/sch_generic.h | |
parent | net: sched: refactor block offloads counter usage (diff) | |
download | linux-a449a3e77a85fc8b31fef7238451dc87af8ff1af.tar.xz linux-a449a3e77a85fc8b31fef7238451dc87af8ff1af.zip |
net: sched: notify classifier on successful offload add/delete
To remove dependency on rtnl lock, extend classifier ops with new
ops->hw_add() and ops->hw_del() callbacks. Call them from cls API while
holding cb_lock every time filter if successfully added to or deleted from
hardware.
Implement the new API in flower classifier. Use it to manage hw_filters
list under cb_lock protection, instead of relying on rtnl lock to
synchronize with concurrent fl_reoffload() call.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f90e3b2a3065..c4fbbaff30a2 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -312,6 +312,10 @@ struct tcf_proto_ops { int (*reoffload)(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, void *cb_priv, struct netlink_ext_ack *extack); + void (*hw_add)(struct tcf_proto *tp, + void *type_data); + void (*hw_del)(struct tcf_proto *tp, + void *type_data); void (*bind_class)(void *, u32, unsigned long); void * (*tmplt_create)(struct net *net, struct tcf_chain *chain, |