All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH RFC 6/6] scanner: Introduce SCANSTATE_RATE
Date: Fri, 28 Nov 2025 19:07:17 +0100	[thread overview]
Message-ID: <aSnk1YtMPIhkSK9e@orbyte.nwl.cc> (raw)
In-Reply-To: <aSnecCkmj1FPGFHk@strlen.de>

On Fri, Nov 28, 2025 at 06:40:00PM +0100, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> >  struct limit_rate {
> >  	uint64_t rate, unit;
> >  };
> > diff --git a/include/parser.h b/include/parser.h
> > index 8cfd22e9e6c42..889302baf5950 100644
> > --- a/include/parser.h
> > +++ b/include/parser.h
> > @@ -47,6 +47,7 @@ enum startcond_type {
> >  	PARSER_SC_META,
> >  	PARSER_SC_POLICY,
> >  	PARSER_SC_QUOTA,
> > +	PARSER_SC_RATE,
> 
> Could this new scanstate get added in a different patch?
> 
> > -"hour"			{ return HOUR; }
> > -"day"			{ return DAY; }
> > +<*>"hour"		{ return HOUR; }
> > +<*>"day"		{ return DAY; }
> 
> this might allow to scope this to meta+rate first before adding
> the exclusive start condition change.

Sadly, not. Unless you want to get rid of meta_key_unqualified as well:
Since nft accepts rules like "hour 10 accept", we have to keep "hour"
and "day" in global scope.

Cheers, Phil

  reply	other threads:[~2025-11-28 18:07 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
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 [this message]
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=aSnk1YtMPIhkSK9e@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.