From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <brouer@redhat.com>,
John Fastabend <john.fastabend@gmail.com>,
Lorenz Bauer <lmb@cloudflare.com>, Andrey Ignatov <rdna@fb.com>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH RFC] Userspace library for handling multiple XDP programs on an interface
Date: Sat, 29 Feb 2020 11:37:28 +0100 [thread overview]
Message-ID: <87sgitu1av.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4Bzaqr2uZca2iZvRpz54C-ohLsNK1sdN8daBr1qkRQ+NhWg@mail.gmail.com>
Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:
> On Fri, Feb 28, 2020 at 6:22 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>>
>> Hi everyone
>>
>> As most of you are no doubt aware, we've had various discussions on how
>> to handle multiple XDP programs on a single interface. With the freplace
>> functionality, the kernel infrastructure is now there to handle this
>> (almost, see "missing pieces" below).
>>
>> While the freplace mechanism offers userspace a lot of flexibility in
>> how to handle dispatching of multiple XDP programs, userspace also has
>> to do quite a bit of work to implement this (compared to just issuing
>> load+attach). The goal of this email is to get some feedback on a
>> library to implement this, in the hope that we can converge on something
>> that will be widely applicable, ensuring that both (a) everyone doesn't
>> have to reinvent the wheel, and (b) we don't end up with a proliferation
>> of subtly incompatible dispatcher models that makes it hard or
>> impossible to mix and match XDP programs from multiple sources.
>>
>
> [...]
>
>>
>> **** Missing pieces
>> While the libxdp code can assemble a basic dispatcher and load it into the
>> kernel, there are a couple of missing pieces on the kernel side; I will propose
>> patches to fix these, but figured there was no reason to hold back posting of
>> the library for comments because of this. These missing pieces are:
>>
>> - There is currently no way to persist the freplace after the program exits; the
>> file descriptor returned by bpf_raw_tracepoint_open() will release the program
>> when it is closed, and it cannot be pinned.
>
> This is completely addressed by patch set [0] I just posted. It will
> allow you to pin freplace BPF link in BPF FS. Feel free to review and
> comment there, if anything is missing.
>
> [0]
> https://patchwork.ozlabs.org/project/netdev/list/?series=161582&state=*
Ah, excellent! I'll take a look, thanks for the pointer :)
-Toke
prev parent reply other threads:[~2020-02-29 10:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 14:22 [PATCH RFC] Userspace library for handling multiple XDP programs on an interface Toke Høiland-Jørgensen
2020-02-28 14:22 ` [PATCH RFC] libxdp: Add libxdp (FOR COMMENT ONLY) Toke Høiland-Jørgensen
2020-02-28 22:15 ` [PATCH RFC] Userspace library for handling multiple XDP programs on an interface Andrey Ignatov
2020-02-29 10:36 ` Toke Høiland-Jørgensen
2020-03-03 1:03 ` Andrey Ignatov
2020-03-03 9:50 ` Toke Høiland-Jørgensen
2020-03-03 16:24 ` Alexei Starovoitov
2020-03-03 16:27 ` Toke Høiland-Jørgensen
2020-03-03 19:53 ` Andrii Nakryiko
2020-02-28 23:21 ` Andrii Nakryiko
2020-02-29 10:37 ` Toke Høiland-Jørgensen [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=87sgitu1av.fsf@toke.dk \
--to=toke@redhat.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kuba@kernel.org \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
--cc=rdna@fb.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).