Skip to content

Commit 7500369

Browse files
robot-pigletblinkov
authored andcommitted
Update contrib/libs/liburing to 2.9
commit_hash:88f21b0567edce8f03258355bcc0e4029ea2085b
1 parent 88d1fd9 commit 7500369

File tree

232 files changed

+2927
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+2927
-393
lines changed

contrib/libs/liburing/.yandex_meta/devtools.licenses.report

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ BELONGS ya.make
5252
Match type : REFERENCE
5353
Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-license-reference.LICENSE
5454
Files with this license:
55-
README [103:103]
55+
README [108:108]
5656
Scancode info:
5757
Original SPDX id: GPL-1.0-or-later
5858
Score : 50.00
5959
Match type : REFERENCE
6060
Links : http://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html, https://spdx.org/licenses/GPL-1.0-or-later
6161
Files with this license:
62-
README [103:103]
62+
README [108:108]
6363
Scancode info:
6464
Original SPDX id: Linux-syscall-note
6565
Score : 50.00
6666
Match type : REFERENCE
6767
Links : https://spdx.org/licenses/Linux-syscall-note
6868
Files with this license:
69-
README [103:103]
69+
README [108:108]
7070

7171
KEEP MIT 1eaf467c6d00edd4a5876ad437b67edf
7272
BELONGS ya.make
@@ -151,6 +151,7 @@ BELONGS ya.make
151151
test/fd-pass.c [2:2]
152152
test/fdinfo.c [2:2]
153153
test/fifo-nonblock-read.c [2:2]
154+
test/file-exit-unreg.c [2:2]
154155
test/file-register.c [2:2]
155156
test/file-update.c [2:2]
156157
test/file-verify.c [2:2]
@@ -221,6 +222,7 @@ BELONGS ya.make
221222
test/pollfree.c [2:2]
222223
test/probe.c [2:2]
223224
test/read-before-exit.c [2:2]
225+
test/read-inc-file.c [2:2]
224226
test/read-mshot-empty.c [2:2]
225227
test/read-mshot-stdin.c [2:2]
226228
test/read-mshot.c [2:2]
@@ -232,10 +234,12 @@ BELONGS ya.make
232234
test/reg-fd-only.c [2:2]
233235
test/reg-hint.c [2:2]
234236
test/reg-reg-ring.c [2:2]
237+
test/reg-wait.c [2:2]
235238
test/regbuf-clone.c [2:2]
236239
test/regbuf-merge.c [2:2]
237240
test/register-restrictions.c [2:2]
238241
test/rename.c [2:2]
242+
test/resize-rings.c [2:2]
239243
test/ring-leak.c [2:2]
240244
test/ring-leak2.c [2:2]
241245
test/ringbuf-read.c [2:2]
@@ -254,6 +258,7 @@ BELONGS ya.make
254258
test/skip-cqe.c [2:2]
255259
test/socket-getsetsock-cmd.c [2:2]
256260
test/socket-io-cmd.c [2:2]
261+
test/socket-nb.c [2:2]
257262
test/socket-rw-eagain.c [2:2]
258263
test/socket-rw-offset.c [2:2]
259264
test/socket-rw.c [2:2]
@@ -364,7 +369,7 @@ BELONGS ya.make
364369

365370
KEEP "(GPL-2.0-only WITH Linux-syscall-note OR MIT)" 9566044df50ee1c37e39ed99e7926750
366371
BELONGS ya.make
367-
FILE_INCLUDE COPYING.GPL found in files: README at line 104
372+
FILE_INCLUDE COPYING.GPL found in files: README at line 109
368373
License text:
369374
COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
370375
Scancode info:
@@ -373,14 +378,14 @@ FILE_INCLUDE COPYING.GPL found in files: README at line 104
373378
Match type : REFERENCE
374379
Links : http://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html, https://spdx.org/licenses/GPL-1.0-or-later
375380
Files with this license:
376-
README [104:104]
381+
README [109:109]
377382
Scancode info:
378383
Original SPDX id: Linux-syscall-note
379384
Score : 95.00
380385
Match type : REFERENCE
381386
Links : https://spdx.org/licenses/Linux-syscall-note
382387
Files with this license:
383-
README [104:104]
388+
README [109:109]
384389

385390
KEEP "(LGPL-2.1-only OR MIT)" 9d1d95673c01a94e06648bf72ecda12d
386391
BELONGS ya.make
@@ -409,11 +414,11 @@ BELONGS ya.make
409414
Match type : REFERENCE
410415
Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-license-reference.LICENSE
411416
Files with this license:
412-
README [101:101]
417+
README [106:106]
413418
Scancode info:
414419
Original SPDX id: LGPL-2.0-or-later
415420
Score : 75.00
416421
Match type : REFERENCE
417422
Links : http://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html, http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html, https://spdx.org/licenses/LGPL-2.0-or-later
418423
Files with this license:
419-
README [101:101]
424+
README [106:106]

contrib/libs/liburing/.yandex_meta/override.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
pkgs: attrs: with pkgs; with attrs; rec {
22
name = "liburing";
3-
version = "2.8";
3+
version = "2.9";
44

55
src = fetchFromGitHub {
66
owner = "axboe";
77
repo = "liburing";
88
rev = "liburing-${version}";
9-
hash = "sha256-10zmoMDzO41oNRVXE/6FzDGPVRVJTJTARVUmc1b7f+o=";
9+
hash = "sha256-zOC53i52YJsH3AQIy4afjTGlX/IvVnW2QnYOppFxKiI=";
1010
};
1111

1212
buildPhase = ''

contrib/libs/liburing/CHANGELOG

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
liburing-2.9 release
2+
3+
- Add support for ring resizing
4+
- Add support for registered waits
5+
- Test additions and improvements
6+
- Fix bug with certain ring setups with SQE128 set not fully closing
7+
the ring after io_uring_queue_exit(3) had been called.
8+
- Various man page fixes and updates
9+
110
liburing-2.8 release
11+
212
- Add support for incrementally/partially consumed provided buffers,
313
usable with the provided buffer ring support.
414
- Add support for foo_and_wait_min_timeout(), where it's possible to

contrib/libs/liburing/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Building liburing
6363
#
6464
make -j$(nproc);
6565

66+
#
67+
# Build liburing.pc
68+
#
69+
make liburing.pc
70+
6671
#
6772
# Install liburing (headers, shared/static libs, and manpage).
6873
#

contrib/libs/liburing/src/include/liburing.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,16 @@ int io_uring_submit_and_wait_min_timeout(struct io_uring *ring,
196196
struct __kernel_timespec *ts,
197197
unsigned min_wait,
198198
sigset_t *sigmask);
199-
199+
int io_uring_submit_and_wait_reg(struct io_uring *ring,
200+
struct io_uring_cqe **cqe_ptr, unsigned wait_nr,
201+
int reg_index);
202+
203+
int io_uring_register_wait_reg(struct io_uring *ring,
204+
struct io_uring_reg_wait *reg, int nr);
205+
int io_uring_resize_rings(struct io_uring *ring, struct io_uring_params *p);
206+
int io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring *src,
207+
unsigned int dst_off, unsigned int src_off,
208+
unsigned int nr, unsigned int flags);
200209
int io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src);
201210
int io_uring_register_buffers(struct io_uring *ring, const struct iovec *iovecs,
202211
unsigned nr_iovecs);
@@ -275,6 +284,12 @@ int io_uring_setup(unsigned int entries, struct io_uring_params *p);
275284
int io_uring_register(unsigned int fd, unsigned int opcode, const void *arg,
276285
unsigned int nr_args);
277286

287+
/*
288+
* Mapped/registered regions
289+
*/
290+
int io_uring_register_region(struct io_uring *ring,
291+
struct io_uring_mem_region_reg *reg);
292+
278293
/*
279294
* Mapped buffer ring alloc/register + unregister/free helpers
280295
*/
@@ -394,6 +409,12 @@ IOURINGINLINE void io_uring_sqe_set_flags(struct io_uring_sqe *sqe,
394409
sqe->flags = (__u8) flags;
395410
}
396411

412+
IOURINGINLINE void io_uring_sqe_set_buf_group(struct io_uring_sqe *sqe,
413+
int bgid)
414+
{
415+
sqe->buf_group = (__u16) bgid;
416+
}
417+
397418
IOURINGINLINE void __io_uring_set_target_fixed_file(struct io_uring_sqe *sqe,
398419
unsigned int file_index)
399420
{

contrib/libs/liburing/src/include/liburing/io_uring.h

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ enum io_uring_sqe_flags_bit {
200200
*/
201201
#define IORING_SETUP_NO_SQARRAY (1U << 16)
202202

203+
/* Use hybrid poll in iopoll process */
204+
#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
205+
203206
enum io_uring_op {
204207
IORING_OP_NOP,
205208
IORING_OP_READV,
@@ -518,6 +521,7 @@ struct io_cqring_offsets {
518521
#define IORING_ENTER_EXT_ARG (1U << 3)
519522
#define IORING_ENTER_REGISTERED_RING (1U << 4)
520523
#define IORING_ENTER_ABS_TIMER (1U << 5)
524+
#define IORING_ENTER_EXT_ARG_REG (1U << 6)
521525

522526
/*
523527
* Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -612,6 +616,10 @@ enum io_uring_register_op {
612616
/* clone registered buffers from source ring to current ring */
613617
IORING_REGISTER_CLONE_BUFFERS = 30,
614618

619+
IORING_REGISTER_RESIZE_RINGS = 33,
620+
621+
IORING_REGISTER_MEM_REGION = 34,
622+
615623
/* this goes last */
616624
IORING_REGISTER_LAST,
617625

@@ -632,6 +640,31 @@ struct io_uring_files_update {
632640
__aligned_u64 /* __s32 * */ fds;
633641
};
634642

643+
enum {
644+
/* initialise with user provided memory pointed by user_addr */
645+
IORING_MEM_REGION_TYPE_USER = 1,
646+
};
647+
648+
struct io_uring_region_desc {
649+
__u64 user_addr;
650+
__u64 size;
651+
__u32 flags;
652+
__u32 id;
653+
__u64 mmap_offset;
654+
__u64 __resv[4];
655+
};
656+
657+
enum {
658+
/* expose the region as registered wait arguments */
659+
IORING_MEM_REGION_REG_WAIT_ARG = 1,
660+
};
661+
662+
struct io_uring_mem_region_reg {
663+
__u64 region_uptr; /* struct io_uring_region_desc * */
664+
__u64 flags;
665+
__u64 __resv[2];
666+
};
667+
635668
/*
636669
* Register a fully sparse file space, rather than pass in an array of all
637670
* -1 file descriptors.
@@ -698,13 +731,17 @@ struct io_uring_clock_register {
698731
};
699732

700733
enum {
701-
IORING_REGISTER_SRC_REGISTERED = 1,
734+
IORING_REGISTER_SRC_REGISTERED = (1U << 0),
735+
IORING_REGISTER_DST_REPLACE = (1U << 1),
702736
};
703737

704738
struct io_uring_clone_buffers {
705739
__u32 src_fd;
706740
__u32 flags;
707-
__u32 pad[6];
741+
__u32 src_off;
742+
__u32 dst_off;
743+
__u32 nr;
744+
__u32 pad[3];
708745
};
709746

710747
struct io_uring_buf {
@@ -795,6 +832,43 @@ enum io_uring_register_restriction_op {
795832
IORING_RESTRICTION_LAST
796833
};
797834

835+
enum {
836+
IORING_REG_WAIT_TS = (1U << 0),
837+
};
838+
839+
/*
840+
* Argument for IORING_REGISTER_CQWAIT_REG, registering a region of
841+
* struct io_uring_reg_wait that can be indexed when io_uring_enter(2) is
842+
* called rather than pass in a wait argument structure separately.
843+
*/
844+
struct io_uring_cqwait_reg_arg {
845+
__u32 flags;
846+
__u32 struct_size;
847+
__u32 nr_entries;
848+
__u32 pad;
849+
__u64 user_addr;
850+
__u64 pad2[3];
851+
};
852+
853+
/*
854+
* Argument for io_uring_enter(2) with
855+
* IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument
856+
* is an index into a previously registered fixed wait region described by
857+
* the below structure.
858+
*/
859+
struct io_uring_reg_wait {
860+
struct __kernel_timespec ts;
861+
__u32 min_wait_usec;
862+
__u32 flags;
863+
__u64 sigmask;
864+
__u32 sigmask_sz;
865+
__u32 pad[3];
866+
__u64 pad2[2];
867+
};
868+
869+
/*
870+
* Argument for io_uring_enter(2) with IORING_GETEVENTS | IORING_ENTER_EXT_ARG
871+
*/
798872
struct io_uring_getevents_arg {
799873
__u64 sigmask;
800874
__u32 sigmask_sz;

contrib/libs/liburing/src/include/liburing/io_uring_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
#define LIBURING_VERSION_H
44

55
#define IO_URING_VERSION_MAJOR 2
6-
#define IO_URING_VERSION_MINOR 8
6+
#define IO_URING_VERSION_MINOR 9
77

88
#endif

0 commit comments

Comments
 (0)