[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ae0fcbf-fe4a-b2e6-5e7a-4f62c8e91d7e@gmail.com>
Date: Fri, 21 May 2021 01:43:30 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Song Liu <songliubraving@...com>
Cc: "io-uring@...r.kernel.org" <io-uring@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jens Axboe <axboe@...nel.dk>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Horst Schirmeier <horst.schirmeier@...dortmund.de>,
"Franz-B . Tuneke" <franz-bernhard.tuneke@...dortmund.de>,
Christian Dietrich <stettberger@...ucode.de>
Subject: Re: [PATCH 13/23] io_uring: implement bpf prog registration
On 5/21/21 12:45 AM, Song Liu wrote:
>> On May 19, 2021, at 7:13 AM, Pavel Begunkov <asml.silence@...il.com> wrote:
>>
>> [de]register BPF programs through io_uring_register() with new
>> IORING_ATTACH_BPF and IORING_DETACH_BPF commands.
>>
>> Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
>> ---
>> fs/io_uring.c | 81 +++++++++++++++++++++++++++++++++++
>> include/uapi/linux/io_uring.h | 2 +
>> 2 files changed, 83 insertions(+)
>>
>> diff --git a/fs/io_uring.c b/fs/io_uring.c
>> index 882b16b5e5eb..b13cbcd5c47b 100644
>> --- a/fs/io_uring.c
>> +++ b/fs/io_uring.c
>> @@ -78,6 +78,7 @@
>> #include <linux/task_work.h>
>> #include <linux/pagemap.h>
>> #include <linux/io_uring.h>
>> +#include <linux/bpf.h>
>>
>> #define CREATE_TRACE_POINTS
>> #include <trace/events/io_uring.h>
>> @@ -103,6 +104,8 @@
>> #define IORING_MAX_RESTRICTIONS (IORING_RESTRICTION_LAST + \
>> IORING_REGISTER_LAST + IORING_OP_LAST)
>>
>> +#define IORING_MAX_BPF_PROGS 100
>
> Is 100 a realistic number here?
Arbitrary test value, will update
>
>> +
>> #define SQE_VALID_FLAGS (IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK| \
>> IOSQE_IO_HARDLINK | IOSQE_ASYNC | \
>> IOSQE_BUFFER_SELECT)
>> @@ -266,6 +269,10 @@ struct io_restriction {
>> bool registered;
>> };
>>
>
> [...]
>
--
Pavel Begunkov
Powered by blists - more mailing lists