On 8/23/19 2:42 PM, Pablo Neira Ayuso wrote: > On Fri, Aug 23, 2019 at 02:41:42PM +0200, Pablo Neira Ayuso wrote: >> On Thu, Aug 22, 2019 at 06:48:26PM +0200, Fernando Fernandez Mancera wrote: >>> @@ -1405,10 +1409,16 @@ struct nft_trans_elem { >>> >>> struct nft_trans_obj { >>> struct nft_object *obj; >>> + struct nlattr **tb; >> >> Instead of annotatint tb[] on the object, you can probably add here: >> >> union { >> struct quota { >> uint64_t consumed; >> uint64_t quota; >> } quota; >> }; >> >> So the initial update annotates the values in the transaction. >> >> I guess you will need two new indirections? Something like >> prepare_update() and update(). > > Or you have a single update() and pass enum nft_trans_phase as > parameter, so this only needs one single indirection. > But also we would need to continue passing the 'bool commit' as a parameter too right? I will take a look to nft_trans_phase. Thanks! :-)