linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/22] ublk: support bpf
@ 2025-01-07 12:03 Ming Lei
  2025-01-07 12:03 ` [RFC PATCH 01/22] ublk: remove two unused fields from 'struct ublk_queue' Ming Lei
                   ` (21 more replies)
  0 siblings, 22 replies; 28+ messages in thread
From: Ming Lei @ 2025-01-07 12:03 UTC (permalink / raw)
  To: Jens Axboe, linux-block
  Cc: bpf, Alexei Starovoitov, Martin KaFai Lau, Yonghong Song,
	Ming Lei

Hello,

Patch 1~6 cleans up & prepares for supporting ublk-bpf, which should be
ready to go.

Patch 7~14 supports ublk-bpf over struct_ops and selftests code. And
please see detailed motivation in commit log of "ublk: bpf: add bpf struct_ops"
and the last document patch.

Patch 15~21 adds bpf aio over struct_ops and applies it for ublk-bpf, and
selftests code.

Patch 22 adds document for ublk-bpf.

Git tree:

	https://github.com/ming1/linux.git  ublk_bpf_rfc
	https://github.com/ming1/linux/commits/ublk_bpf_rfc/
    
Kernel selftest:

	make -C tools/testing/selftests TARGETS=ublk run_tests
    
Comments are welcome!


Ming Lei (22):
  ublk: remove two unused fields from 'struct ublk_queue'
  ublk: convert several bool type fields into bitfield of `ublk_queue`
  ublk: add helper of ublk_need_map_io()
  ublk: move ublk into one standalone directory
  ublk: move private definitions into private header
  ublk: move several helpers to private header
  ublk: bpf: add bpf prog attach helpers
  ublk: bpf: add bpf struct_ops
  ublk: bpf: attach bpf prog to ublk device
  ublk: bpf: add kfunc for ublk bpf prog
  ublk: bpf: enable ublk-bpf
  selftests: ublk: add tests for the ublk-bpf initial implementation
  selftests: ublk: add tests for covering io split
  selftests: ublk: add tests for covering redirecting to userspace
  ublk: bpf: add bpf aio kfunc
  ublk: bpf: add bpf aio struct_ops
  ublk: bpf: attach bpf aio prog to ublk device
  ublk: bpf: add several ublk bpf aio kfuncs
  ublk: bpf: wire bpf aio with ublk io handling
  selftests: add tests for ublk bpf aio
  selftests: add tests for covering both bpf aio and split
  ublk: document ublk-bpf & bpf-aio

 Documentation/block/ublk.rst                  |  170 ++
 MAINTAINERS                                   |    3 +-
 drivers/block/Kconfig                         |   32 +-
 drivers/block/Makefile                        |    2 +-
 drivers/block/ublk/Kconfig                    |   52 +
 drivers/block/ublk/Makefile                   |   10 +
 drivers/block/ublk/bpf.c                      |  370 ++++
 drivers/block/ublk/bpf.h                      |  231 +++
 drivers/block/ublk/bpf_aio.c                  |  266 +++
 drivers/block/ublk/bpf_aio.h                  |  118 ++
 drivers/block/ublk/bpf_aio_ops.c              |  174 ++
 drivers/block/ublk/bpf_ops.c                  |  344 ++++
 drivers/block/ublk/bpf_reg.h                  |   77 +
 drivers/block/{ublk_drv.c => ublk/main.c}     |  267 +--
 drivers/block/ublk/ublk.h                     |  237 +++
 include/uapi/linux/ublk_cmd.h                 |   16 +-
 tools/testing/selftests/Makefile              |    1 +
 tools/testing/selftests/ublk/.gitignore       |    4 +
 tools/testing/selftests/ublk/Makefile         |  236 +++
 tools/testing/selftests/ublk/config           |    2 +
 tools/testing/selftests/ublk/progs/ublk_bpf.h |   13 +
 .../selftests/ublk/progs/ublk_bpf_kfunc.h     |   44 +
 .../testing/selftests/ublk/progs/ublk_loop.c  |  166 ++
 .../testing/selftests/ublk/progs/ublk_null.c  |  177 ++
 .../selftests/ublk/progs/ublk_stripe.c        |  319 ++++
 tools/testing/selftests/ublk/test_common.sh   |  119 ++
 tools/testing/selftests/ublk/test_loop_01.sh  |   33 +
 tools/testing/selftests/ublk/test_loop_02.sh  |   24 +
 tools/testing/selftests/ublk/test_null_01.sh  |   19 +
 tools/testing/selftests/ublk/test_null_02.sh  |   23 +
 tools/testing/selftests/ublk/test_null_03.sh  |   21 +
 tools/testing/selftests/ublk/test_null_04.sh  |   21 +
 .../testing/selftests/ublk/test_stripe_01.sh  |   35 +
 .../testing/selftests/ublk/test_stripe_02.sh  |   26 +
 tools/testing/selftests/ublk/ublk_bpf.c       | 1673 +++++++++++++++++
 35 files changed, 5101 insertions(+), 224 deletions(-)
 create mode 100644 drivers/block/ublk/Kconfig
 create mode 100644 drivers/block/ublk/Makefile
 create mode 100644 drivers/block/ublk/bpf.c
 create mode 100644 drivers/block/ublk/bpf.h
 create mode 100644 drivers/block/ublk/bpf_aio.c
 create mode 100644 drivers/block/ublk/bpf_aio.h
 create mode 100644 drivers/block/ublk/bpf_aio_ops.c
 create mode 100644 drivers/block/ublk/bpf_ops.c
 create mode 100644 drivers/block/ublk/bpf_reg.h
 rename drivers/block/{ublk_drv.c => ublk/main.c} (93%)
 create mode 100644 drivers/block/ublk/ublk.h
 create mode 100644 tools/testing/selftests/ublk/.gitignore
 create mode 100644 tools/testing/selftests/ublk/Makefile
 create mode 100644 tools/testing/selftests/ublk/config
 create mode 100644 tools/testing/selftests/ublk/progs/ublk_bpf.h
 create mode 100644 tools/testing/selftests/ublk/progs/ublk_bpf_kfunc.h
 create mode 100644 tools/testing/selftests/ublk/progs/ublk_loop.c
 create mode 100644 tools/testing/selftests/ublk/progs/ublk_null.c
 create mode 100644 tools/testing/selftests/ublk/progs/ublk_stripe.c
 create mode 100755 tools/testing/selftests/ublk/test_common.sh
 create mode 100755 tools/testing/selftests/ublk/test_loop_01.sh
 create mode 100755 tools/testing/selftests/ublk/test_loop_02.sh
 create mode 100755 tools/testing/selftests/ublk/test_null_01.sh
 create mode 100755 tools/testing/selftests/ublk/test_null_02.sh
 create mode 100755 tools/testing/selftests/ublk/test_null_03.sh
 create mode 100755 tools/testing/selftests/ublk/test_null_04.sh
 create mode 100755 tools/testing/selftests/ublk/test_stripe_01.sh
 create mode 100755 tools/testing/selftests/ublk/test_stripe_02.sh
 create mode 100644 tools/testing/selftests/ublk/ublk_bpf.c

-- 
2.47.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-01-15 20:11 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 12:03 [RFC PATCH 00/22] ublk: support bpf Ming Lei
2025-01-07 12:03 ` [RFC PATCH 01/22] ublk: remove two unused fields from 'struct ublk_queue' Ming Lei
2025-01-07 12:03 ` [RFC PATCH 02/22] ublk: convert several bool type fields into bitfield of `ublk_queue` Ming Lei
2025-01-07 12:03 ` [RFC PATCH 03/22] ublk: add helper of ublk_need_map_io() Ming Lei
2025-01-07 12:03 ` [RFC PATCH 04/22] ublk: move ublk into one standalone directory Ming Lei
2025-01-07 12:03 ` [RFC PATCH 05/22] ublk: move private definitions into private header Ming Lei
2025-01-07 12:03 ` [RFC PATCH 06/22] ublk: move several helpers to " Ming Lei
2025-01-07 12:03 ` [RFC PATCH 07/22] ublk: bpf: add bpf prog attach helpers Ming Lei
2025-01-07 12:03 ` [RFC PATCH 08/22] ublk: bpf: add bpf struct_ops Ming Lei
2025-01-10  1:43   ` Alexei Starovoitov
2025-01-13  4:08     ` Ming Lei
2025-01-13 21:30       ` Alexei Starovoitov
2025-01-15 11:58         ` Ming Lei
2025-01-15 20:11           ` Amery Hung
2025-01-07 12:04 ` [RFC PATCH 09/22] ublk: bpf: attach bpf prog to ublk device Ming Lei
2025-01-07 12:04 ` [RFC PATCH 10/22] ublk: bpf: add kfunc for ublk bpf prog Ming Lei
2025-01-07 12:04 ` [RFC PATCH 11/22] ublk: bpf: enable ublk-bpf Ming Lei
2025-01-07 12:04 ` [RFC PATCH 12/22] selftests: ublk: add tests for the ublk-bpf initial implementation Ming Lei
2025-01-07 12:04 ` [RFC PATCH 13/22] selftests: ublk: add tests for covering io split Ming Lei
2025-01-07 12:04 ` [RFC PATCH 14/22] selftests: ublk: add tests for covering redirecting to userspace Ming Lei
2025-01-07 12:04 ` [RFC PATCH 15/22] ublk: bpf: add bpf aio kfunc Ming Lei
2025-01-07 12:04 ` [RFC PATCH 16/22] ublk: bpf: add bpf aio struct_ops Ming Lei
2025-01-07 12:04 ` [RFC PATCH 17/22] ublk: bpf: attach bpf aio prog to ublk device Ming Lei
2025-01-07 12:04 ` [RFC PATCH 18/22] ublk: bpf: add several ublk bpf aio kfuncs Ming Lei
2025-01-07 12:04 ` [RFC PATCH 19/22] ublk: bpf: wire bpf aio with ublk io handling Ming Lei
2025-01-07 12:04 ` [RFC PATCH 20/22] selftests: add tests for ublk bpf aio Ming Lei
2025-01-07 12:04 ` [RFC PATCH 21/22] selftests: add tests for covering both bpf aio and split Ming Lei
2025-01-07 12:04 ` [RFC PATCH 22/22] ublk: document ublk-bpf & bpf-aio Ming Lei

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).