On 12.01, ana@xxxxxxxxx wrote: > From: Ana Rey <ana@xxxxxxxxx> > > This adds accounting objects support to allow us to manipulate the nftables's > extended accounting intraestructure. > > +/** > + * struct nft_acct - nf_tables acct instance > + * > + * @list: table acct list node > + * @name: name of the acct > + * @pkts: number of packets > + * @bytes: number of bytes > + * use: number of rule references to this acct > + */ > +struct nft_acct { > + struct list_head list; > + char name[NFT_ACCT_MAXNAMELEN]; > + atomic64_t pkts; > + atomic64_t bytes; > + u32 use; > +}; Also I think it would be nice to use the same accounting structure for regular counters and these counters regarding the accounting part. I'm not saying we should necessarily use the nft_counter variant with a seqlock, but whatever reasoning we use to decide for one variant should fully apply to the other as well. The nft_acct would then simply be a container with a list_head, a use counter and an embedded nft counter structure. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html