Skip to content

netfilter: nf_tables: remove rbtree async garbage collection

Florian Westphal netfilter-devel 1 version Applied

Status from this message: Applied to nf-next, thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3netfilter: nf_tables: de-constify set commit ops function argumentinclude/net/netfilter/nf_tables.h net/netfilter/nft_set_pipapo.c+4 -50 replies
2/3netfilter: nft_set_rbtree: rename gc deactivate+erase functionnet/netfilter/nft_set_rbtree.c+6 -51 reply
3/3netfilter: nft_set_rbtree: prefer sync gc to async workernet/netfilter/nft_set_rbtree.c+65 -591 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/3] netfilter: nf_tables: remove rbtree async garbage collection

The 'rbtree' set backend does not support insertion/removal of elements from the datapath (ruleset).

Elements can only be added from the control plane, so there is no compelling reason for regular, async gc scans in the background.

Change rbtree to use the existing 'commit' callback to do a gc scan instead. This is run as a last step in the commit phase, when all checks have passed.

This makes rbtree less complex. It also avoids the need to use atomic allocations during gc: the commit hook is allowed to sleep, the transaction mutex prevents any interference during walk.

Florian Westphal (3):
netfilter: nf_tables: de-constify set commit ops function argument
netfilter: nft_set_rbtree: rename gc deactivate+erase function
netfilter: nft_set_rbtree: prefer sync gc to async worker

 include/net/netfilter/nf_tables.h |   2 +-
 net/netfilter/nft_set_pipapo.c    |   7 +-
 net/netfilter/nft_set_rbtree.c    | 135 ++++++++++++++++--------------
 3 files changed, 75 insertions(+), 69 deletions(-)
Signature · 1 line
2.41.0