diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-11 11:55:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-12 21:41:33 +0300 |
commit | 12db03b65c2b90752e4c37666977fd4a1b5f5824 (patch) | |
tree | 6915e0a9fae6df1abbd8ce54ce5a13d6b2688953 /net/sched/sch_api.c | |
parent | 7d5509fa0d3ddfe252b4418513e493ac98de3317 (diff) | |
download | linux-12db03b65c2b90752e4c37666977fd4a1b5f5824.tar.xz |
net: sched: extend proto ops to support unlocked classifiers
Add 'rtnl_held' flag to tcf proto change, delete, destroy, dump, walk
functions to track rtnl lock status. Extend users of these function in cls
API to propagate rtnl lock status to them. This allows classifiers to
obtain rtnl lock when necessary and to pass rtnl lock status to extensions
and driver offload callbacks.
Add flags field to tcf proto ops. Add flag value to indicate that
classifier doesn't require rtnl lock.
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 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 9a530cad2759..2283924fb56d 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1914,14 +1914,14 @@ static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid, chain = tcf_get_next_chain(block, chain)) { struct tcf_proto *tp; - for (tp = tcf_get_next_proto(chain, NULL); - tp; tp = tcf_get_next_proto(chain, tp)) { + for (tp = tcf_get_next_proto(chain, NULL, true); + tp; tp = tcf_get_next_proto(chain, tp, true)) { struct tcf_bind_args arg = {}; arg.w.fn = tcf_node_bind; arg.classid = clid; arg.cl = new_cl; - tp->ops->walk(tp, &arg.w); + tp->ops->walk(tp, &arg.w, true); } } } |