netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net/sched: avoid walk() while deleting filters that still use rtnl_lock
@ 2019-12-24  9:30 Davide Caratti
  2019-12-24  9:30 ` [PATCH net 1/2] Revert "net/sched: cls_u32: fix refcount leak in the error path of u32_change()" Davide Caratti
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Davide Caratti @ 2019-12-24  9:30 UTC (permalink / raw)
  To: David S. Miller, netdev, Vlad Buslov, Jamal Hadi Salim

we don't need to use walk() on deletion of TC filters, at least for those
implementations that don't have TCF_PROTO_OPS_DOIT_UNLOCKED.

- patch 1/2 restores walk() semantic in cls_u32, that was recently
  changed to fix semi-configured filters in the error path of u32_change().
- patch 2/2 moves the delete_empty() logic to cls_flower, the only filter
  that currently needs to guard against concurrent insert/delete.
  For flower, the current delete_empty() still [ab,]uses walk(), to
  preserve the bugfixes introduced by [1] and [2]: a follow-up commit
  in the future can implement a proper delete_empty() that avoids calls
  to fl_walk().

(tested with tdc "concurrency", "matchall", "basic" and "u32")

[1] 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty")
[2] 8b64678e0af8 ("net: sched: refactor tp insert/delete for concurrent execution")

Davide Caratti (2):
  Revert "net/sched: cls_u32: fix refcount leak in the error path of
    u32_change()"
  net/sched: add delete_empty() to filters and use it in cls_flower

 include/net/sch_generic.h |  2 ++
 net/sched/cls_api.c       | 29 ++++-------------------------
 net/sched/cls_flower.c    | 23 +++++++++++++++++++++++
 net/sched/cls_u32.c       | 25 -------------------------
 4 files changed, 29 insertions(+), 50 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-26 23:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-24  9:30 [PATCH net 0/2] net/sched: avoid walk() while deleting filters that still use rtnl_lock Davide Caratti
2019-12-24  9:30 ` [PATCH net 1/2] Revert "net/sched: cls_u32: fix refcount leak in the error path of u32_change()" Davide Caratti
2019-12-24  9:30 ` [PATCH net 2/2] net/sched: add delete_empty() to filters and use it in cls_flower Davide Caratti
2019-12-24 11:48   ` Vlad Buslov
2019-12-24 14:53     ` Davide Caratti
2019-12-24 15:17       ` Vlad Buslov
2019-12-24 12:49 ` [PATCH net 0/2] net/sched: avoid walk() while deleting filters that still use rtnl_lock Jamal Hadi Salim
2019-12-26 23:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).