From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: "Toke Høiland-Jørgensen" <toke@kernel.org>,
netfilter-devel@vger.kernel.org, bpf@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: nf_tables: add ebpf expression
Date: Wed, 31 Aug 2022 22:38:22 +0200 [thread overview]
Message-ID: <Yw/Gvhjy2h47RfU9@salvia> (raw)
In-Reply-To: <20220831153508.GB15107@breakpoint.cc>
On Wed, Aug 31, 2022 at 05:35:08PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > asking the kernel to store an additional label with the program rule?
> >
> > @Florian, could you probably use the object infrastructure to refer to
> > the program?
>
> Yes, I would like to extend objref infra later once this is accepted.
>
> > This might also allow you to refer to this new object type from
> > nf_tables maps.
>
> Yes, but first nft needs to be able to construct some meaningful output
> again. If we don't attach a specific label (such as filename), we need
> to be able to reconstruct info based on what we can query via id/tag and
> bpf syscall.
>
> objref infra doesn't help here unless we'll force something like
> 'nft-defined-objref-name-must-match-elf-binary-name', and I find that
> terrible.
OK, you don't have to select such an ugly long name ;)
But I get your point: users need to declare explicitly the object.
> > It would be good to avoid linear rule-based matching to select what
> > program to run.
>
> Hmmm, I did not consider it a huge deal, its an ebpf program so
> users can dispatch to another program.
>
> Objref is nice if the program to run should be selected from a criterion that isn't
> readily available to a sk_filter program though.
You can also perform updates on the object without the need for
reloading your ruleset. And the declared object also allows for more
attributes to be added on it moving forward.
I think this approach would also allow you to maintain symmetry
between what you add and what it is shown in the listing?
next prev parent reply other threads:[~2022-08-31 20:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 10:16 [PATCH nf-next] netfilter: nf_tables: add ebpf expression Florian Westphal
2022-08-31 12:13 ` Toke Høiland-Jørgensen
2022-08-31 12:56 ` Florian Westphal
2022-08-31 13:41 ` Toke Høiland-Jørgensen
2022-08-31 13:57 ` Florian Westphal
2022-08-31 14:43 ` Toke Høiland-Jørgensen
2022-08-31 15:09 ` Pablo Neira Ayuso
2022-08-31 15:35 ` Florian Westphal
2022-08-31 20:38 ` Pablo Neira Ayuso [this message]
2022-08-31 15:26 ` Florian Westphal
2022-08-31 15:39 ` Alexei Starovoitov
2022-08-31 15:53 ` Florian Westphal
2022-08-31 17:26 ` Alexei Starovoitov
2022-08-31 21:49 ` Daniel Borkmann
2022-09-01 5:18 ` Eyal Birger
2022-09-02 16:53 ` Alexei Starovoitov
2022-09-05 17:50 ` Eyal Birger
2022-09-01 10:14 ` Florian Westphal
2022-09-02 17:06 ` Alexei Starovoitov
2022-09-02 17:52 ` Florian Westphal
2022-08-31 21:57 ` Florian Westphal
2022-09-06 6:57 ` Nicolas Dichtel
2022-09-07 3:04 ` Alexei Starovoitov
2022-09-07 15:52 ` Nicolas Dichtel
2022-09-01 8:08 ` Jan Engelhardt
2022-08-31 20:44 ` Toke Høiland-Jørgensen
2022-08-31 13:44 ` 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=Yw/Gvhjy2h47RfU9@salvia \
--to=pablo@netfilter.org \
--cc=bpf@vger.kernel.org \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=toke@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox