All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <ffmancera@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 1/2 nf-next v2] netfilter: nf_tables: Introduce stateful object update operation
Date: Fri, 23 Aug 2019 14:41:42 +0200	[thread overview]
Message-ID: <20190823124142.dsmyr3mkwt3ppz3y@salvia> (raw)
In-Reply-To: <20190822164827.1064-1-ffmancera@riseup.net>

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().

  parent reply	other threads:[~2019-08-23 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 16:48 [PATCH 1/2 nf-next v2] netfilter: nf_tables: Introduce stateful object update operation Fernando Fernandez Mancera
2019-08-22 16:48 ` [PATCH 2/2 nf-next v2] netfilter: nft_quota: add quota object update support Fernando Fernandez Mancera
2019-08-23 12:41 ` Pablo Neira Ayuso [this message]
2019-08-23 12:42   ` [PATCH 1/2 nf-next v2] netfilter: nf_tables: Introduce stateful object update operation Pablo Neira Ayuso
2019-08-23 18:05     ` Fernando Fernandez Mancera
2019-08-23 18:28       ` Fernando Fernandez Mancera
2019-08-24 16:29         ` Pablo Neira Ayuso
2019-08-26 10:16           ` Fernando Fernandez Mancera
2019-08-26 10:31             ` Pablo Neira Ayuso
2019-08-26 10:38               ` Fernando Fernandez Mancera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190823124142.dsmyr3mkwt3ppz3y@salvia \
    --to=pablo@netfilter.org \
    --cc=ffmancera@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.