Skip to content

IORING_OP_SEND_ZC improvements

Stefan Metzmacher io-uring netdev 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5io_uring/opdef: rename SENDZC_NOTIF to SEND_ZCio_uring/opdef.c+1 -11 reply
2/5io_uring/core: move io_cqe->fd over from io_cqe->flags to io_cqe->resinclude/linux/io_uring_types.h io_uring/io_uring.c+11 -50 replies
3/5io_uring/core: keep req->cqe.flags on generic errorsio_uring/io_uring.c+5 -30 replies
4/5io_uring/net: let io_sendzc set IORING_CQE_F_MORE before sock_sendmsg()io_uring/net.c+13 -60 replies
5/5io_uring/notif: let userspace know how effective the zero copy usage wasio_uring/notif.c net/ipv4/ip_output.c net/ipv4/tcp.c +1 more+24 -24 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchPavel Begunkov
1/5R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH for-6.0 0/5] IORING_OP_SEND_ZC improvements

Hi Pavel, hi Jens,

I did some initial testing with IORING_OP_SEND_ZC. While reading the code I think I found a race that can lead to IORING_CQE_F_MORE being missing even if the net layer got references.

While there I added some code to allow userpace to know how effective the IORING_OP_SEND_ZC attempt was, in order to avoid it it's not used (e.g. on a long living tcp connection).

This change requires a change to the existing test, see:
https://github.com/metze-samba/liburing/tree/test-send-zerocopy

Stefan Metzmacher (5):
io_uring/opdef: rename SENDZC_NOTIF to SEND_ZC io_uring/core: move io_cqe->fd over from io_cqe->flags to io_cqe->res io_uring/core: keep req->cqe.flags on generic errors io_uring/net: let io_sendzc set IORING_CQE_F_MORE before
sock_sendmsg()
io_uring/notif: let userspace know how effective the zero copy usage
was

 include/linux/io_uring_types.h |  6 +++---
 io_uring/io_uring.c            | 18 +++++++++++++-----
 io_uring/net.c                 | 19 +++++++++++++------
 io_uring/notif.c               | 18 ++++++++++++++++++
 io_uring/opdef.c               |  2 +-
 net/ipv4/ip_output.c           |  3 ++-
 net/ipv4/tcp.c                 |  2 ++
 net/ipv6/ip6_output.c          |  3 ++-
 8 files changed, 54 insertions(+), 17 deletions(-)
Signature · 1 line
2.34.1