From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: eric@garver.life
Subject: [PATCH nft 5/5] cache: position does not require full cache
Date: Thu, 29 Aug 2024 13:31:53 +0200 [thread overview]
Message-ID: <20240829113153.1553089-5-pablo@netfilter.org> (raw)
In-Reply-To: <20240829113153.1553089-1-pablo@netfilter.org>
position refers to the rule handle, it has similar cache requirements as
replace rule command, relax cache requirements.
Commit e5382c0d08e3 ("src: Support intra-transaction rule references")
uses position.id for index support which requires a full cache, but
only in such case.
Fixes: 01e5c6f0ed03 ("src: add cache level flags")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/cache.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/cache.c b/src/cache.c
index db7dfd96081d..3f1324a2f98b 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -58,8 +58,7 @@ static unsigned int evaluate_cache_add(struct cmd *cmd, unsigned int flags)
flags |= NFT_CACHE_TABLE |
NFT_CACHE_SET;
- if (cmd->handle.index.id ||
- cmd->handle.position.id)
+ if (cmd->handle.index.id)
flags |= NFT_CACHE_FULL | NFT_CACHE_UPDATE;
break;
default:
--
2.30.2
next prev parent reply other threads:[~2024-08-29 11:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 11:31 [PATCH nft 1/5] cache: assert filter when calling nft_cache_evaluate() Pablo Neira Ayuso
2024-08-29 11:31 ` [PATCH nft 2/5] cache: clean up evaluate_cache_del() Pablo Neira Ayuso
2024-08-29 11:31 ` [PATCH nft 3/5] cache: remove full cache requirement when echo flag is set on Pablo Neira Ayuso
2024-08-29 11:31 ` [PATCH nft 4/5] cache: relax requirement for replace rule command Pablo Neira Ayuso
2024-08-29 11:31 ` Pablo Neira Ayuso [this message]
2024-08-29 14:35 ` [PATCH nft 1/5] cache: assert filter when calling nft_cache_evaluate() Eric Garver
2024-08-30 10:38 ` Pablo Neira Ayuso
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=20240829113153.1553089-5-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=eric@garver.life \
--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.