From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH RFC 1/6] parser_bison: Introduce tokens for monitor events
Date: Fri, 28 Nov 2025 15:51:59 +0100 [thread overview]
Message-ID: <aSm3D2ixdyD8yT_1@strlen.de> (raw)
In-Reply-To: <20251126151346.1132-2-phil@nwl.cc>
Phil Sutter <phil@nwl.cc> wrote:
> There already is a start condition for "monitor" keyword and also a
> DESTROY token. So just add the missing one and get rid of the
> intermediate string buffer.
>
> Keep checking the struct monitor::event value in eval phase just to be
> on the safe side.
Looks good, just minor nits below:
> diff --git a/include/rule.h b/include/rule.h
> index e8b3c0376e367..4c647f732caf2 100644
> --- a/include/rule.h
> +++ b/include/rule.h
> @@ -739,15 +739,22 @@ enum {
> CMD_MONITOR_OBJ_MAX
> };
>
> +enum {
> + CMD_MONITOR_EVENT_ANY,
> + CMD_MONITOR_EVENT_NEW,
> + CMD_MONITOR_EVENT_DEL,
> + CMD_MONITOR_EVENT_MAX
> +};
> +
> struct monitor {
> struct location location;
> uint32_t format;
> uint32_t flags;
> uint32_t type;
> - const char *event;
> + uint32_t event;
any reason for using u32_t rather than an enum?
> -struct monitor *monitor_alloc(uint32_t format, uint32_t type, const char *event);
> +struct monitor *monitor_alloc(uint32_t format, uint32_t type, uint32_t event);
If we can get rid of internal parsing I would prefer
... , enum monitor_event_type event); or similar.
next prev parent reply other threads:[~2025-11-28 14:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 15:13 [nft PATCH RFC 0/6] parser_bison: Less STRING more tokens Phil Sutter
2025-11-26 15:13 ` [nft PATCH RFC 1/6] parser_bison: Introduce tokens for monitor events Phil Sutter
2025-11-28 14:51 ` Florian Westphal [this message]
2025-11-28 15:13 ` Phil Sutter
2025-11-26 15:13 ` [nft PATCH RFC 2/6] parser_bison: Introduce tokens for chain types Phil Sutter
2025-11-28 15:07 ` Florian Westphal
2025-11-28 15:38 ` Phil Sutter
2025-11-26 15:13 ` [nft PATCH RFC 3/6] parser_bison: Introduce tokens for osf ttl values Phil Sutter
2025-11-28 15:14 ` Florian Westphal
2025-11-26 15:13 ` [nft PATCH RFC 4/6] parser_bison: Introduce tokens for log levels Phil Sutter
2025-11-28 15:15 ` Florian Westphal
2025-11-26 15:13 ` [nft PATCH RFC 5/6] parser_bison: Introduce bytes_unit Phil Sutter
2025-11-28 15:50 ` Florian Westphal
2025-11-26 15:13 ` [nft PATCH RFC 6/6] scanner: Introduce SCANSTATE_RATE Phil Sutter
2025-11-28 17:40 ` Florian Westphal
2025-11-28 18:07 ` Phil Sutter
2025-11-28 18:11 ` 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=aSm3D2ixdyD8yT_1@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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.