Message ID | cover.1621424513.git.asml.silence@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | io_uring BPF requests | expand |
> On May 19, 2021, at 7:13 AM, Pavel Begunkov <asml.silence@gmail.com> wrote: > > The main problem solved is feeding completion information of other > requests in a form of CQEs back into BPF. I decided to wire up support > for multiple completion queues (aka CQs) and give BPF programs access to > them, so leaving userspace in control over synchronisation that should > be much more flexible that the link-based approach. > > For instance, there can be a separate CQ for each BPF program, so no > extra sync is needed, and communication can be done by submitting a > request targeting a neighboring CQ or submitting a CQE there directly > (see test3 below). CQ is choosen by sqe->cq_idx, so everyone can > cross-fire if willing. > [...] > bpf: add IOURING program type > io_uring: implement bpf prog registration > io_uring: add support for bpf requests > io_uring: enable BPF to submit SQEs > io_uring: enable bpf to submit CQEs > io_uring: enable bpf to reap CQEs > libbpf: support io_uring > io_uring: pass user_data to bpf executor > bpf: Add bpf_copy_to_user() helper > io_uring: wire bpf copy to user > io_uring: don't wait on CQ exclusively > io_uring: enable bpf reqs to wait for CQs Besides the a few comments, these BPF related patches look sane to me. Please consider add some selftests (tools/testing/selftests/bpf). Thanks, Song
On 5/21/21 1:35 AM, Song Liu wrote: >> On May 19, 2021, at 7:13 AM, Pavel Begunkov <asml.silence@gmail.com> wrote: >> The main problem solved is feeding completion information of other >> requests in a form of CQEs back into BPF. I decided to wire up support >> for multiple completion queues (aka CQs) and give BPF programs access to >> them, so leaving userspace in control over synchronisation that should >> be much more flexible that the link-based approach. >> >> For instance, there can be a separate CQ for each BPF program, so no >> extra sync is needed, and communication can be done by submitting a >> request targeting a neighboring CQ or submitting a CQE there directly >> (see test3 below). CQ is choosen by sqe->cq_idx, so everyone can >> cross-fire if willing. >> > > [...] > >> bpf: add IOURING program type >> io_uring: implement bpf prog registration >> io_uring: add support for bpf requests >> io_uring: enable BPF to submit SQEs >> io_uring: enable bpf to submit CQEs >> io_uring: enable bpf to reap CQEs >> libbpf: support io_uring >> io_uring: pass user_data to bpf executor >> bpf: Add bpf_copy_to_user() helper >> io_uring: wire bpf copy to user >> io_uring: don't wait on CQ exclusively >> io_uring: enable bpf reqs to wait for CQs > > Besides the a few comments, these BPF related patches look sane to me. > Please consider add some selftests (tools/testing/selftests/bpf). The comments are noted. Thanks Song