All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, linux@slavino.sk
Subject: Re: [PATCH nft] parser_bison: simplify syntax to list all sets in table
Date: Sat, 11 Jan 2025 23:45:30 +0100	[thread overview]
Message-ID: <Z4L0g6aZz9EzxTop@calendula> (raw)
In-Reply-To: <20250111162445.GC14912@breakpoint.cc>

On Sat, Jan 11, 2025 at 05:24:45PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > Revisit f99ccda252fa ("parser: allow listing sets in one table") to add
> > an alias to list all sets in a given table, eg.
> 
> [..]
> 
> > diff --git a/src/parser_bison.y b/src/parser_bison.y
> > index c8714812532d..ac8de398f8a7 100644
> > --- a/src/parser_bison.y
> > +++ b/src/parser_bison.y
> > @@ -1590,8 +1590,13 @@ list_cmd		:	TABLE		table_spec
> >  			{
> >  				$$ = cmd_alloc(CMD_LIST, CMD_OBJ_SETS, &$2, &@$, NULL);
> >  			}
> > +			|	SETS		table_spec
> > +			{
> > +				$$ = cmd_alloc(CMD_LIST, CMD_OBJ_SETS, &$2, &@$, NULL);
> > +			}
> >  			|	SETS		TABLE	table_spec
> >  			{
> > +				/* alias of previous rule. */
> >  				$$ = cmd_alloc(CMD_LIST, CMD_OBJ_SETS, &$3, &@$, NULL);
> >  			}
> 
> I have concerns wrt. to ever expanding list of aliases, it causes divergence as
> to what is allowed:
> 
> <keyword>
> <keyword> inet
> <keyword> inet foo
> <keyword> table inet foo
> 
> In some cases, all of these work  (4 being aliased to 3).
> In others, e.g. "counters" or "quotas" "inet foo" won't work.
> 
> It would be good to at least be consistent.  What about this?
> 
> It would be good to compact it further, this is all because of
> copypastry +slow divergence on later addendums to command subsets.

Consolidating aliases is indeed better approach, please go ahead
submit this patch.

Thanks.

      reply	other threads:[~2025-01-11 22:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11 14:37 [PATCH nft] parser_bison: simplify syntax to list all sets in table Pablo Neira Ayuso
2025-01-11 16:24 ` Florian Westphal
2025-01-11 22:45   ` 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=Z4L0g6aZz9EzxTop@calendula \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=linux@slavino.sk \
    --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.