From: Stefano Brivio <sbrivio@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nf-next v2 4/8] netfilter: nft_set_pipapo: prepare walk function for on-demand clone
Date: Fri, 26 Apr 2024 07:44:24 +0200 [thread overview]
Message-ID: <20240426074424.670803cf@elisabeth> (raw)
In-Reply-To: <20240425120651.16326-5-fw@strlen.de>
On Thu, 25 Apr 2024 14:06:43 +0200
Florian Westphal <fw@strlen.de> wrote:
> The existing code uses iter->type to figure out what data is needed, the
> live copy (READ) or clone (UPDATE).
>
> Without pending updates, priv->clone and priv->match will point to
> different memory locations, but they have identical content.
>
> Future patch will make priv->clone == NULL if there are no pending changes,
> in this case we must copy the live data for the UPDATE case.
>
> Currently this would require GFP_ATOMIC allocation. Split the walk
> function in two parts: one that does the walk and one that decides which
> data is needed.
>
> In the UPDATE case, callers hold the transaction mutex so we do not need
> the rcu read lock. This allows to use GFP_KERNEL allocation while
> cloning.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
--
Stefano
next prev parent reply other threads:[~2024-04-26 5:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 12:06 [PATCH nf-next v2 0/8] nft_set_pipapo: remove cannot-fail allocations on commit and abort Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 1/8] netfilter: nft_set_pipapo: move prove_locking helper around Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 2/8] netfilter: nft_set_pipapo: make pipapo_clone helper return NULL Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 3/8] netfilter: nft_set_pipapo: prepare destroy function for on-demand clone Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 4/8] netfilter: nft_set_pipapo: prepare walk " Florian Westphal
2024-04-26 5:44 ` Stefano Brivio [this message]
2024-04-25 12:06 ` [PATCH nf-next v2 5/8] netfilter: nft_set_pipapo: merge deactivate helper into caller Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 6/8] netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clone Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 7/8] netfilter: nft_set_pipapo: move cloning of match info to insert/removal path Florian Westphal
2024-05-10 0:40 ` Pablo Neira Ayuso
2024-05-10 8:29 ` Florian Westphal
2024-04-25 12:06 ` [PATCH nf-next v2 8/8] netfilter: nft_set_pipapo: remove dirty flag Florian Westphal
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=20240426074424.670803cf@elisabeth \
--to=sbrivio@redhat.com \
--cc=fw@strlen.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).