Skip to content

Commit

Permalink
liburing: update to 2.3
Browse files Browse the repository at this point in the history
Changes included:
 - update list of tests
 - update list of examples
 - update list of man pages
 - actually use `no_glibc_statx` in compat.h
 - define `CONFIG_HAVE_NVME_URING` in config-host.h when applicable
 - remove `CONFIG_HAVE_MEMFD_CREATE` as it is no longer used
  • Loading branch information
pobrn authored and eli-schwartz committed May 10, 2023
1 parent 33c89f5 commit d41fd1d
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 25 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@
"uring"
],
"versions": [
"2.3-1",
"2.2-2",
"2.2-1",
"2.1-1",
Expand Down
8 changes: 4 additions & 4 deletions subprojects/liburing.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = liburing-liburing-2.2
source_url = https://github.com/axboe/liburing/archive/refs/tags/liburing-2.2.tar.gz
source_filename = liburing-2.2.tar.gz
source_hash = e092624af6aa244ade2d52181cc07751ac5caba2f3d63e9240790db9ed130bbc
directory = liburing-liburing-2.3
source_url = https://github.com/axboe/liburing/archive/refs/tags/liburing-2.3.tar.gz
source_filename = liburing-2.3.tar.gz
source_hash = 60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8
patch_directory = liburing

[provide]
Expand Down
33 changes: 19 additions & 14 deletions subprojects/packagefiles/liburing/examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
executable('io_uring-cp',
'io_uring-cp.c',
dependencies: uring)

executable('io_uring-test',
'io_uring-test.c',
dependencies: uring)

executable('link-cp',
'link-cp.c',
dependencies: uring)
all_examples = [
'io_uring-cp.c',
'io_uring-test.c',
'io_uring-udp.c',
'link-cp.c',
'poll-bench.c',
'send-zerocopy.c',
]

if has_ucontext
executable('ucontext-cp',
'ucontext-cp.c',
dependencies: uring)
all_examples += 'ucontext-cp.c'
endif

fs = import('fs')

foreach example_source : all_examples
executable(
fs.stem(example_source),
example_source,
dependencies: uring,
)
endforeach
20 changes: 20 additions & 0 deletions subprojects/packagefiles/liburing/man/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ install_man(
'io_uring_cqe_get_data.3',
'io_uring_cqe_get_data64.3',
'io_uring_cqe_seen.3',
'io_uring_cq_has_overflow.3',
'io_uring_cq_ready.3',
'io_uring_enter.2',
'io_uring_enter2.2',
'io_uring_free_probe.3',
'io_uring_get_events.3',
'io_uring_get_probe.3',
'io_uring_get_sqe.3',
'io_uring_opcode_supported.3',
'io_uring_peek_cqe.3',
'io_uring_prep_accept.3',
'io_uring_prep_accept_direct.3',
'io_uring_prep_cancel.3',
'io_uring_prep_cancel64.3',
'io_uring_prep_close.3',
'io_uring_prep_close_direct.3',
'io_uring_prep_connect.3',
Expand All @@ -34,6 +38,7 @@ install_man(
'io_uring_prep_msg_ring.3',
'io_uring_prep_multishot_accept.3',
'io_uring_prep_multishot_accept_direct.3',
'io_uring_prep_nop.3',
'io_uring_prep_openat2.3',
'io_uring_prep_openat2_direct.3',
'io_uring_prep_openat.3',
Expand All @@ -49,14 +54,18 @@ install_man(
'io_uring_prep_readv.3',
'io_uring_prep_recv.3',
'io_uring_prep_recvmsg.3',
'io_uring_prep_recvmsg_multishot.3',
'io_uring_prep_recv_multishot.3',
'io_uring_prep_remove_buffers.3',
'io_uring_prep_rename.3',
'io_uring_prep_renameat.3',
'io_uring_prep_send.3',
'io_uring_prep_sendmsg.3',
'io_uring_prep_send_zc.3',
'io_uring_prep_shutdown.3',
'io_uring_prep_socket.3',
'io_uring_prep_socket_direct.3',
'io_uring_prep_socket_direct_alloc.3',
'io_uring_prep_splice.3',
'io_uring_prep_statx.3',
'io_uring_prep_symlink.3',
Expand All @@ -75,15 +84,25 @@ install_man(
'io_uring_queue_exit.3',
'io_uring_queue_init.3',
'io_uring_queue_init_params.3',
'io_uring_recvmsg_cmsg_firsthdr.3',
'io_uring_recvmsg_cmsg_nexthdr.3',
'io_uring_recvmsg_name.3',
'io_uring_recvmsg_out.3',
'io_uring_recvmsg_payload.3',
'io_uring_recvmsg_payload_length.3',
'io_uring_recvmsg_validate.3',
'io_uring_register.2',
'io_uring_register_buffers.3',
'io_uring_register_buf_ring.3',
'io_uring_register_eventfd.3',
'io_uring_register_eventfd_async.3',
'io_uring_register_file_alloc_range.3',
'io_uring_register_files.3',
'io_uring_register_files_sparse.3',
'io_uring_register_iowq_aff.3',
'io_uring_register_iowq_max_workers.3',
'io_uring_register_ring_fd.3',
'io_uring_register_sync_cancel.3',
'io_uring_setup.2',
'io_uring_sqe_set_data.3',
'io_uring_sqe_set_data64.3',
Expand All @@ -92,6 +111,7 @@ install_man(
'io_uring_sqring_wait.3',
'io_uring_sq_space_left.3',
'io_uring_submit.3',
'io_uring_submit_and_get_events.3',
'io_uring_submit_and_wait.3',
'io_uring_submit_and_wait_timeout.3',
'io_uring_unregister_buffers.3',
Expand Down
8 changes: 3 additions & 5 deletions subprojects/packagefiles/liburing/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('liburing', ['c','cpp'],
version: '2.2',
version: '2.3',
license: ['MIT', 'LGPL-2.1-only', 'GPL-2.0-only WITH Linux-syscall-note'],
meson_version: '>=0.57.0',
default_options: ['default_library=both',
Expand Down Expand Up @@ -92,9 +92,7 @@ has_cxx = cpp.compiles(code, name: 'C++')
has_ucontext = (cc.has_type('ucontext_t', prefix: '#include <ucontext.h>')
and cc.has_function('makecontext', prefix: '#include <ucontext.h>'))

has_memfd_create = cc.has_function('memfd_create',
args: ['-D_GNU_SOURCE'],
prefix: '#include <sys/mman.h>')
has_nvme_uring_cmd = cc.has_type('struct nvme_uring_cmd', prefix: '#include <linux/nvme_ioctl.h>')

conf_data = configuration_data()
conf_data.set('CONFIG_HAVE_KERNEL_RWF_T', has__kernel_rwf_t)
Expand All @@ -104,7 +102,7 @@ conf_data.set('CONFIG_HAVE_STATX', has_statx)
conf_data.set('CONFIG_HAVE_GLIBC_STATX', glibc_statx)
conf_data.set('CONFIG_HAVE_CXX', has_cxx)
conf_data.set('CONFIG_HAVE_UCONTEXT', has_ucontext)
conf_data.set('CONFIG_HAVE_MEMFD_CREATE', has_memfd_create)
conf_data.set('CONFIG_HAVE_NVME_URING', has_nvme_uring_cmd)
configure_file(output: 'config-host.h',
configuration: conf_data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
@__kernel_rwf_t_compat@
@__kernel_timespec_compat@
@open_how_compat@
@no_glibc_statx@
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ conf_data.set('__kernel_timespec_compat', __kernel_timespec_compat)
conf_data.set('open_how_compat', open_how_compat)

if not glibc_statx and has_statx
conf_data.set('no_glibc_statx', '#include <stat/stat.h>')
conf_data.set('no_glibc_statx', '#include <sys/stat.h>')
else
conf_data.set('no_glibc_statx', '')
endif

configure_file(input: 'compat.h.meson',
Expand Down
14 changes: 13 additions & 1 deletion subprojects/packagefiles/liburing/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ all_tests = [
'd4ae271dfaae.c',
'd77a67ed5f27.c',
'defer.c',
'defer-taskrun.c',
'double-poll-crash.c',
'drop-submit.c',
'eeed8b54e0df.c',
Expand All @@ -39,6 +40,7 @@ all_tests = [
'fadvise.c',
'fallocate.c',
'fc2a85cb02ef.c',
'fd-pass.c',
'file-register.c',
'files-exit-hang-poll.c',
'files-exit-hang-timeout.c',
Expand All @@ -52,7 +54,9 @@ all_tests = [
'hardlink.c',
'io-cancel.c',
'iopoll.c',
'iopoll-leak.c',
'io_uring_enter.c',
'io_uring_passthrough.c',
'io_uring_register.c',
'io_uring_setup.c',
'lfs-openat.c',
Expand All @@ -64,6 +68,7 @@ all_tests = [
'mkdir.c',
'msg-ring.c',
'multicqes_drain.c',
'nolibc.c',
'nop-all-sizes.c',
'nop.c',
'openat2.c',
Expand All @@ -80,6 +85,7 @@ all_tests = [
'poll-link.c',
'poll-many.c',
'poll-mshot-update.c',
'poll-mshot-overflow.c',
'poll-ring.c',
'poll-v-poll.c',
'pollfree.c',
Expand All @@ -88,15 +94,17 @@ all_tests = [
'read-write.c',
'recv-msgall.c',
'recv-msgall-stream.c',
'recv-multishot.c',
'register-restrictions.c',
'rename.c',
'ringbuf-read.c',
'ring-leak2.c',
'ring-leak.c',
'rsrc_tags.c',
'rw_merge_test.c',
'self.c',
'send_recv.c',
'sendmsg_fs_cve.c',
'send_recv.c',
'send_recvmsg.c',
'shared-wq.c',
'short-read.c',
Expand All @@ -118,8 +126,10 @@ all_tests = [
'sqpoll-sleep.c',
'sq-space_left.c',
'stdout.c',
'submit-and-wait.c',
'submit-link-fail.c',
'submit-reuse.c',
'sync-cancel.c',
'symlink.c',
'teardowns.c',
'thread-exit.c',
Expand All @@ -130,6 +140,8 @@ all_tests = [
'unlink.c',
'wakeup-hang.c',
'xattr.c',
'single-issuer.c',
'send-zerocopy.c',
]

if has_statx or glibc_statx
Expand Down

0 comments on commit d41fd1d

Please sign in to comment.