mbox series

[liburing,v1,0/3] add basic zero copy receive support

Message ID 20250215041857.2108684-1-dw@davidwei.uk (mailing list archive)
Headers show
Series add basic zero copy receive support | expand

Message

David Wei Feb. 15, 2025, 4:18 a.m. UTC
Add basic support for io_uring zero copy receive in liburing. Besides
the mandatory syncing of necessary liburing.h headers, add a thin
wrapper around the registration op and a unit test.

Users still need to setup by hand e.g. mmap, setup the registration
structs, do the registration and then setup the refill queue struct
io_uring_zcrx_rq.

In the future, I'll add code to hide the implementation details. But for
now, this unblocks the kernel selftest.

David Wei (3):
  zcrx: sync kernel headers
  zcrx: add basic support
  zcrx: add unit test

 src/include/liburing.h          |  12 +
 src/include/liburing/io_uring.h |  62 ++-
 src/liburing-ffi.map            |   1 +
 src/liburing.map                |   1 +
 src/register.c                  |   6 +
 test/Makefile                   |   1 +
 test/zcrx.c                     | 918 ++++++++++++++++++++++++++++++++
 7 files changed, 999 insertions(+), 2 deletions(-)
 create mode 100644 test/zcrx.c

Comments

Jens Axboe Feb. 18, 2025, 5:01 p.m. UTC | #1
On 2/14/25 9:18 PM, David Wei wrote:
> Add basic support for io_uring zero copy receive in liburing. Besides
> the mandatory syncing of necessary liburing.h headers, add a thin
> wrapper around the registration op and a unit test.
> 
> Users still need to setup by hand e.g. mmap, setup the registration
> structs, do the registration and then setup the refill queue struct
> io_uring_zcrx_rq.
> 
> In the future, I'll add code to hide the implementation details. But for
> now, this unblocks the kernel selftest.

man pages coming for this too?
David Wei Feb. 18, 2025, 5:30 p.m. UTC | #2
On 2025-02-18 09:01, Jens Axboe wrote:
> On 2/14/25 9:18 PM, David Wei wrote:
>> Add basic support for io_uring zero copy receive in liburing. Besides
>> the mandatory syncing of necessary liburing.h headers, add a thin
>> wrapper around the registration op and a unit test.
>>
>> Users still need to setup by hand e.g. mmap, setup the registration
>> structs, do the registration and then setup the refill queue struct
>> io_uring_zcrx_rq.
>>
>> In the future, I'll add code to hide the implementation details. But for
>> now, this unblocks the kernel selftest.
> 
> man pages coming for this too?
> 

I'm working on higher level abstractions so that users hopefully won't
need to call it directly. Could I defer manpages until these take shape?
Jens Axboe Feb. 18, 2025, 5:31 p.m. UTC | #3
On 2/18/25 10:30 AM, David Wei wrote:
> On 2025-02-18 09:01, Jens Axboe wrote:
>> On 2/14/25 9:18 PM, David Wei wrote:
>>> Add basic support for io_uring zero copy receive in liburing. Besides
>>> the mandatory syncing of necessary liburing.h headers, add a thin
>>> wrapper around the registration op and a unit test.
>>>
>>> Users still need to setup by hand e.g. mmap, setup the registration
>>> structs, do the registration and then setup the refill queue struct
>>> io_uring_zcrx_rq.
>>>
>>> In the future, I'll add code to hide the implementation details. But for
>>> now, this unblocks the kernel selftest.
>>
>> man pages coming for this too?
>>
> 
> I'm working on higher level abstractions so that users hopefully won't
> need to call it directly. Could I defer manpages until these take shape?

Yep that's fine, thanks!