[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1666346426.git.asml.silence@gmail.com>
Date: Fri, 21 Oct 2022 11:16:38 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Jens Axboe <axboe@...nel.dk>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
"David S . Miller" <davem@...emloft.net>
Cc: io-uring@...r.kernel.org, asml.silence@...il.com,
netdev@...r.kernel.org, Stefan Metzmacher <metze@...ba.org>
Subject: [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(+)
--
2.38.0
Powered by blists - more mailing lists