[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+0PXgm_VuSJDKwr9iomxFLuG-=Chi2Ya3k0YPnKaex_w@mail.gmail.com>
Date: Mon, 21 Apr 2025 16:38:59 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: Song Liu <song@...nel.org>, Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
Shuah Khan <skhan@...uxfoundation.org>, LKML <linux-kernel@...r.kernel.org>,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>, android-mm@...gle.com, simona@...ll.ch,
Jonathan Corbet <corbet@....net>, Eduard <eddyz87@...il.com>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Jiri Olsa <jolsa@...nel.org>,
Mykola Lysenko <mykolal@...com>
Subject: Re: [PATCH 2/4] bpf: Add dmabuf iterator
On Mon, Apr 21, 2025 at 1:40 PM T.J. Mercier <tjmercier@...gle.com> wrote:
>
> > > new file mode 100644
> > > index 000000000000..b4b8be1d6aa4
> > > --- /dev/null
> > > +++ b/kernel/bpf/dmabuf_iter.c
> >
> > Maybe we should add this file to drivers/dma-buf. I would like to
> > hear other folks thoughts on this.
>
> This is fine with me, and would save us the extra
> CONFIG_DMA_SHARED_BUFFER check that's currently needed in
> kernel/bpf/Makefile but would require checking CONFIG_BPF instead.
> Sumit / Christian any objections to moving the dmabuf bpf iterator
> implementation into drivers/dma-buf?
The driver directory would need to 'depends on BPF_SYSCALL'.
Are you sure you want this?
imo kernel/bpf/ is fine for this.
You also probably want
.feature = BPF_ITER_RESCHED
in bpf_dmabuf_reg_info.
Also have you considered open coded iterator for dmabufs?
Would it help with the interface to user space?
Powered by blists - more mailing lists