From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>,
[email protected], Stefan Metzmacher <[email protected]>
Subject: [PATCH for-6.1 2/2] io_uring/net: fail zc sendmsg for unsupported protocols
Date: Thu, 20 Oct 2022 02:42:36 +0100 [thread overview]
Message-ID: <0f5e5b81ab680649bf56f025da94497f3f6a3f53.1666229889.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
The previous patch fails zerocopy send requests for protocols that don't
support it, do the same for zerocopy sendmsg.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io_uring/net.c b/io_uring/net.c
index 28127f1de1f0..735eec545115 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1160,6 +1160,8 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
+ if (!io_sock_support_zc(sock))
+ return -EOPNOTSUPP;
if (req_has_async_data(req)) {
kmsg = req->async_data;
--
2.38.0
next prev parent reply other threads:[~2022-10-20 1:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 1:42 [PATCH for-6.1 0/2] don't fallback if sock doesn't undestand zc Pavel Begunkov
2022-10-20 1:42 ` [PATCH for-6.1 1/2] io_uring/net: fail zc send for unsupported protocols Pavel Begunkov
2022-10-20 9:13 ` Stefan Metzmacher
2022-10-20 12:48 ` Pavel Begunkov
2022-10-20 13:05 ` Stefan Metzmacher
2022-10-20 12:49 ` Jens Axboe
2022-10-20 12:53 ` Pavel Begunkov
2022-10-20 12:59 ` Jens Axboe
2022-10-20 1:42 ` Pavel Begunkov [this message]
2022-10-20 2:26 ` [PATCH for-6.1 0/2] don't fallback if sock doesn't undestand zc Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f5e5b81ab680649bf56f025da94497f3f6a3f53.1666229889.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox