Skip to content

RFC io_uring zerocopy receive

Hao Xu io-uring llvm netdev oe-kbuild-all 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net-zerocopy: split zerocopy receive to several partsinclude/net/tcp.h net/ipv4/tcp.c+80 -530 replies
2/3net-zerocopy: remove static for tcp_zerocopy_receive()include/net/tcp.h net/ipv4/tcp.c+6 -30 replies
3/3io_uring: zerocopy receivefs/io_uring.c include/uapi/linux/io_uring.h+73 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] io_uring zerocopy receive

Integrate the current zerocopy receive solution to io_uring for eazier use. The current calling process is:
1) mmap a range of virtual address
2) poll() to wait for data ready of the sockfd
3) call getsockopt() to map the address in 1) to physical pages
4) access the data.

By integrating it to io_uring, 2) and 3) can be merged:
1) mmap a range of virtual address
2) prepare a sqe and submit
3) get a cqe which indicates data is ready and mapped
4) access the data

which reduce one system call and make users be unaware of 3)

Also provide a test case which basically reuses
tools/testing/selftests/net/tcp_mmap.c:
https://github.com/HowHsu/liburing/tree/zc_receive

server side:
taskset -c 1-2 ./zc_receive -s -4 -z -M $((4096+12))

client side:
taskset -c 3 ./tcp_mmap -H '127.0.0.1' -z -4 -M $((4096+12))

no much difference of the result since no functionality change.

Hao Xu (3):
net-zerocopy: split zerocopy receive to several parts
net-zerocopy: remove static for tcp_zerocopy_receive()
io_uring: zerocopy receive

 fs/io_uring.c                 |  72 ++++++++++++++++++
 include/net/tcp.h             |   8 ++
 include/uapi/linux/io_uring.h |   1 +
 net/ipv4/tcp.c                | 134 ++++++++++++++++++++--------------
 4 files changed, 159 insertions(+), 56 deletions(-)
Signature · 1 line
2.25.1