public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it
@ 2022-10-21 10:16 Pavel Begunkov
  2022-10-21 10:16 ` [PATCH for-6.1 1/3] net: flag sockets supporting msghdr originated zerocopy Pavel Begunkov
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Pavel Begunkov @ 2022-10-21 10:16 UTC (permalink / raw)
  To: Jens Axboe, Jakub Kicinski, Paolo Abeni, David S . Miller
  Cc: io-uring, asml.silence, netdev, Stefan Metzmacher

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(+)

-- 
2.38.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-10-24 22:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-21 10:16 [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it Pavel Begunkov
2022-10-21 10:16 ` [PATCH for-6.1 1/3] net: flag sockets supporting msghdr originated zerocopy Pavel Begunkov
2022-10-21 16:14   ` Jakub Kicinski
2022-10-22 15:57     ` Pavel Begunkov
2022-10-22 16:07       ` Jens Axboe
2022-10-24 12:49         ` Stefan Metzmacher
2022-10-24 14:12           ` Stefan Metzmacher
2022-10-24 17:00             ` Pavel Begunkov
2022-10-24 17:45               ` Stefan Metzmacher
2022-10-21 10:16 ` [PATCH for-6.1 2/3] io_uring/net: fail zc send when unsupported by socket Pavel Begunkov
2022-10-21 10:16 ` [PATCH for-6.1 3/3] io_uring/net: fail zc sendmsg " Pavel Begunkov
2022-10-21 10:27 ` [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it Stefan Metzmacher
2022-10-21 10:42   ` Pavel Begunkov
2022-10-21 12:49     ` Stefan Metzmacher
2022-10-24 20:40 ` patchwork-bot+netdevbpf
2022-10-24 21:15   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox