Commit 92149190067dc1ba656ce63a328c4b88b34e3f09

Authored by Vlad Buslov
Committed by David S. Miller
1 parent c24e43d83b

net: sched: flower: set unlocked flag for flower proto ops

Set TCF_PROTO_OPS_DOIT_UNLOCKED for flower classifier to indicate that its
ops callbacks don't require caller to hold rtnl lock. Don't take rtnl lock
in fl_destroy_filter_work() that is executed on workqueue instead of being
called by cls API and is not affected by setting
TCF_PROTO_OPS_DOIT_UNLOCKED. Rtnl mutex is still manually taken by flower
classifier before calling hardware offloads API that has not been updated
for unlocked execution.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

net/sched/cls_flower.c
... ... @@ -368,9 +368,7 @@
368 368 struct cls_fl_filter *f = container_of(to_rcu_work(work),
369 369 struct cls_fl_filter, rwork);
370 370  
371   - rtnl_lock();
372 371 __fl_destroy_filter(f);
373   - rtnl_unlock();
374 372 }
375 373  
376 374 static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f,
... ... @@ -2372,6 +2370,7 @@
2372 2370 .tmplt_destroy = fl_tmplt_destroy,
2373 2371 .tmplt_dump = fl_tmplt_dump,
2374 2372 .owner = THIS_MODULE,
  2373 + .flags = TCF_PROTO_OPS_DOIT_UNLOCKED,
2375 2374 };
2376 2375  
2377 2376 static int __init cls_fl_init(void)