From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: nf_tables: do not refresh timeout when resetting element
Date: Tue, 10 Oct 2023 14:48:03 +0200 [thread overview]
Message-ID: <ZSVIA7v8EyF1cDOx@orbyte.nwl.cc> (raw)
In-Reply-To: <ZR13ejv1iBzrzEor@calendula>
On Wed, Oct 04, 2023 at 04:32:26PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Oct 04, 2023 at 02:48:45PM +0200, Florian Westphal wrote:
> > I also think we need to find a different strategy for the
> > dump-and-reset part when the reset could be interrupted
> > by a transaction.
>
> I think it should be possible to deal with this from userspace.
>
> The idea would be to keep the old cache. Then, from the new cache, if
> EINTR happened before, iterate over the list of objects in the new
> cache and then lookup for the old objects, then pour the stats from
> the old to the new objects, then release old cache. Then only one old
> cache is kept around in worst case. This needs a lookup function for
> each stateful object type on the old cache based on the handle.
In case of EINTR, user space will reset multiple times, right? So
returned state from generation X must be combined with that from
generation X+1. Easy with counters (val1 + val2) but funny and/or
inconsistent with quotas (val1 - val2 might be < 0).
I'd still just declare reset command for multiple items unreliable and
point out the need for scripts to use a combination of list command and
a number of reset commands for the individual items if the actual values
matter.
I just noticed, for the above to be viable 'reset rule' command must be
changed - it is silent right now.
Cheers, Phil
next prev parent reply other threads:[~2023-10-10 12:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 9:05 [PATCH nf] netfilter: nf_tables: do not refresh timeout when resetting element Pablo Neira Ayuso
2023-10-02 9:07 ` Florian Westphal
2023-10-02 18:06 ` Phil Sutter
2023-10-02 21:50 ` Pablo Neira Ayuso
2023-10-02 22:17 ` Pablo Neira Ayuso
2023-10-02 22:55 ` Phil Sutter
2023-10-03 7:46 ` Pablo Neira Ayuso
2023-10-03 15:57 ` Phil Sutter
2023-10-03 17:21 ` Pablo Neira Ayuso
2023-10-03 17:52 ` Phil Sutter
2023-10-03 18:03 ` Pablo Neira Ayuso
2023-10-03 20:12 ` Phil Sutter
2023-10-04 8:01 ` Pablo Neira Ayuso
2023-10-04 8:07 ` Florian Westphal
2023-10-04 8:23 ` Pablo Neira Ayuso
2023-10-04 8:46 ` Florian Westphal
2023-10-04 9:27 ` Pablo Neira Ayuso
2023-10-04 12:48 ` Florian Westphal
2023-10-04 14:32 ` Pablo Neira Ayuso
2023-10-10 12:48 ` Phil Sutter [this message]
2023-10-10 13:18 ` Phil Sutter
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=ZSVIA7v8EyF1cDOx@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.