Skip to content

fail io_uring zc with sockets not supporting it

Pavel Begunkov io-uring netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: flag sockets supporting msghdr originated zerocopyinclude/linux/net.h net/ipv4/tcp.c net/ipv4/udp.c+3 -07 repliesApplied
2/3io_uring/net: fail zc send when unsupported by socketio_uring/net.c+2 -00 repliesApplied
3/3io_uring/net: fail zc sendmsg when unsupported by socketio_uring/net.c+2 -00 repliesApplied

Reviews trailers per patch

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

PatchJakub Kicinski
1/3A-b
2/3
3/3

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.1 0/3] fail io_uring zc with sockets not supporting it

Some sockets don't care about msghdr::ubuf_info and would execute the request by copying data. Such fallback behaviour was always a pain in my experience, so we'd rather want to fail such requests and have a more robust api in the future.

Mark struct socket that support it with a new SOCK_SUPPORT_ZC flag. I'm not entirely sure it's the best place for the flag but at least we don't have to do a bunch of extra dereferences in the hot path.

P.S. patches 2 and 3 are not combined for backporting purposes.

Pavel Begunkov (3):
net: flag sockets supporting msghdr originated zerocopy io_uring/net: fail zc send when unsupported by socket io_uring/net: fail zc sendmsg when unsupported by socket

 include/linux/net.h | 1 +
 io_uring/net.c      | 4 ++++
 net/ipv4/tcp.c      | 1 +
 net/ipv4/udp.c      | 1 +
 4 files changed, 7 insertions(+)
Signature · 1 line
2.38.0