From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] nft_set_rbtree: Move clauses for expired nodes, last active node as leaf
Date: Thu, 16 Jun 2022 11:08:40 +0200 [thread overview]
Message-ID: <YqrzGBGCUlfd63O0@salvia> (raw)
In-Reply-To: <20220614115814.61f8c667@elisabeth>
On Tue, Jun 14, 2022 at 11:58:14AM +0200, Stefano Brivio wrote:
> On Mon, 6 Jun 2022 11:01:21 +0200
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
[...]
> > That sounds an incremental fix, I prefer this too.
>
> ...finally posted now.
Thanks.
[...]
> > I don't see how we can obsolete "activate" operation, though, the
> > existing approach works at set element granularity.
>
> Yes, and that's what I'm arguing against: it would be more natural, in
> a transaction, to have a single commit operation for all the elements
> at hand -- otherwise it's not so much of a transaction.
>
> To the user it's atomic (minus bugs) because we have tricks to ensure
> it, but to the set back-ends it's absolutely not. I think we have this
> kind of situation:
>
>
> nft <-> core <-> set back-end <-> storage
> | | |
>
> hash: transaction commit element commit element commit
>
> rbtree: transaction commit element commit element commit
> ^ problematic to the
> point we're
> considering a
> transaction approach
>
> pipapo: transaction commit element commit transaction commit
>
> The single advantage I see of the current approach is that with the
> hash back-ends we don't need two copies of the hash table, but that
> also has the downside of the nft_set_elem_active(&he->ext, genmask)
> check in the lookup function, which should be, in relative terms, even
> more expensive than it is in the pipapo implementation, given that hash
> back-ends are (in most cases) faster.
There is also runtime set updates from packet path. In that case, we
cannot keep a copy of the data structure that is being updated from
the control plane while the packet path is also adding/deleting
entries from it.
prev parent reply other threads:[~2022-06-16 9:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 18:34 [PATCH nf] nft_set_rbtree: Move clauses for expired nodes, last active node as leaf Stefano Brivio
2022-05-16 18:16 ` Pablo Neira Ayuso
2022-05-17 12:57 ` Stefano Brivio
2022-05-20 15:45 ` Stefano Brivio
2022-05-23 14:59 ` Pablo Neira Ayuso
2022-05-25 12:15 ` Stefano Brivio
2022-06-01 11:15 ` Pablo Neira Ayuso
2022-06-03 13:04 ` Stefano Brivio
2022-06-06 9:01 ` Pablo Neira Ayuso
2022-06-14 9:58 ` Stefano Brivio
2022-06-16 9:08 ` Pablo Neira Ayuso [this message]
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=YqrzGBGCUlfd63O0@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=sbrivio@redhat.com \
/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.