Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 2/2] evaluate: restrict allowed subtypes of concatenations
Date: Fri, 11 Apr 2025 11:48:20 +0200	[thread overview]
Message-ID: <20250411094820.GA26374@breakpoint.cc> (raw)
In-Reply-To: <Z_jkfafmlGedPQ-H@calendula>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> I am in the need for such a context for payload/meta statements.
> 
>         meta mark set ip dscp map ...
>                       ^^^^^^^
> 
> in this case, ip dscp needs to be evaluated as a key for lookups,
> shift can probably be removed for implicit maps.
> 
> While in this case:
> 
>         meta mark set ip dscp
>                       ^^^^^^^
> 
> in this case, ip dscp needs the shift.
> 
> Then, there is:
> 
>         ip dscp set meta mark
>         ^^^^^^^
> 
> (note: this is not yet supported)
> 
> where ip dscp needs to expand to 16-bit because of the kernel
> checksum routine requirements.
> 
> They are all payload expressions, but evaluation needs to be slightly
> different depending on how the expression is used.
> 
> This context should help disentangle evaluation, evaluation is making
> assumption based on subtle hints, I think there is a need for more
> explicit hints.

Agreed.

> We can revisit in a few weeks, otherwise take this.

OK, lets keep this back for now; technically I don't need
to know the recursion depth, I need to know the placement
(lhs / lookup key resp. rhs / element key) to figure out what
restrictions apply.

      reply	other threads:[~2025-04-11  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 14:50 [PATCH nft 1/2] evaluate: rename recursion counter to recursion.binop Florian Westphal
2025-04-02 14:50 ` [PATCH nft 2/2] evaluate: restrict allowed subtypes of concatenations Florian Westphal
2025-04-10 22:50   ` Pablo Neira Ayuso
2025-04-11  5:52     ` Florian Westphal
2025-04-11  9:44       ` Pablo Neira Ayuso
2025-04-11  9:48         ` Florian Westphal [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=20250411094820.GA26374@breakpoint.cc \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox