nft_set_pipapo: remove cannot-fail allocations on commit and abort
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 3 repliesIn review
- v19 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- rebase on top of nf/net-next tree
- patch
"netfilter: nf_tables: pass new nft_iter_type hint to walker" has been removed, a similar change has been applied already
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | netfilter: nft_set_pipapo: move prove_locking helper aroundnet/ | +11 | 0 replies | |
| 2/8 | netfilter: nft_set_pipapo: make pipapo_clone helper return NULLnet/ | +7 | 0 replies | |
| 3/8 | netfilter: nft_set_pipapo: prepare destroy function for on-demand clonenet/ | +6 | 0 replies | |
| 4/8 | netfilter: nft_set_pipapo: prepare walk function for on-demand clonenet/ | +39 | 1 reply | |
| 5/8 | netfilter: nft_set_pipapo: merge deactivate helper into callernet/ | +9 | 0 replies | |
| 6/8 | netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clonenet/ | +10 | 0 replies | |
| 7/8 | netfilter: nft_set_pipapo: move cloning of match info to insert/removal pathnet/ | +52 | 2 replies | |
| 8/8 | netfilter: nft_set_pipapo: remove dirty flagnet/ net/ | +0 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Stefano Brivio |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH nf-next v2 0/8] nft_set_pipapo: remove cannot-fail allocations on commit and abort
Changes since v1:
- rebase on top of nf/net-next tree
- patch
"netfilter: nf_tables: pass new nft_iter_type hint to walker" has been removed, a similar change has been applied already
I've retained Stefanos RvB tags for commits that have not been changed. Tested with nftables py/shell tests and nft_concat_range on a debug kernel.
V1 cover letter:
pipapo keeps one active set data (used from datapath) and one shadow copy, in priv->clone, used from transactional path to update the set.
On abort and commit, the clone/shadow becomes the active set, and a new clone is made for the next transaction.
The problem with this is that we cannot fail in ->commit.
This patchset rearranges priv->clone allocation so the cloning occurs on the first insertion/removal.
set flush needs a bit of extra work, this is done by adding a iter_type hint to the walker callbacks so that a set flush will be able to perform the needed clone.
The dirty flag is no longer meaningful after these changes, so last patch removes it again.
After this patch it is possible to elide calls to nft_setelem_remove from the abort path IFF the set backend implements an abort() function, but this change isn't included here.
Florian Westphal (8):
netfilter: nft_set_pipapo: move prove_locking helper around
netfilter: nft_set_pipapo: make pipapo_clone helper return NULL
netfilter: nft_set_pipapo: prepare destroy function for on-demand clone
netfilter: nft_set_pipapo: prepare walk function for on-demand clone
netfilter: nft_set_pipapo: merge deactivate helper into caller
netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clone
netfilter: nft_set_pipapo: move cloning of match info to insert/removal path
netfilter: nft_set_pipapo: remove dirty flag
net/netfilter/nft_set_pipapo.c | 261 ++++++++++++++++----------------- net/netfilter/nft_set_pipapo.h | 2 - 2 files changed, 126 insertions(+), 137 deletions(-)
Signature · 1 line
2.43.2