On Fri, Oct 11, 2024 at 02:32:58AM +0200, Florian Westphal wrote: > v2: only change is in patch 3, and by extension, the last one: > During transaction abort, we need to handle an aggregate container to > contain both new set elements and updates. The latter must be > skipped, else we remove element that already existed at start of the > transaction. > > original cover letter: > > When doing a flush on a set or mass adding/removing elements from a > set, each element needs to allocate 96 bytes to hold the transactional > state. > > In such cases, virtually all the information in struct nft_trans_elem > is the same. > > Change nft_trans_elem to a flex-array, i.e. a single nft_trans_elem > can hold multiple set element pointers. > > The number of elements that can be stored in one nft_trans_elem is limited > by the slab allocator, this series limits the compaction to at most 62 > elements as it caps the reallocation to 2048 bytes of memory. Applied to nf-next, thanks Florian