Patch "io_uring/net: use io_sr_msg for sendzc" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/net: use io_sr_msg for sendzc

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-net-use-io_sr_msg-for-sendzc.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Mon Oct 17 11:35:32 AM CEST 2022
From: Pavel Begunkov <asml.silence@xxxxxxxxx>
Date: Sun, 16 Oct 2022 21:33:26 +0100
Subject: io_uring/net: use io_sr_msg for sendzc
To: stable@xxxxxxxxxxxxxxx
Cc: Jens Axboe <axboe@xxxxxxxxx>, asml.silence@xxxxxxxxx
Message-ID: <b76d955ed29df5670f47dbc6bbb581a1b22ffdb3.1665951939.git.asml.silence@xxxxxxxxx>

From: Pavel Begunkov <asml.silence@xxxxxxxxx>

[ upstream commit ac9e5784bbe72f4f603d1af84760ec09bc0b5ccd ]

Reuse struct io_sr_msg for zerocopy sends, which is handy. There is
only one zerocopy specific field, namely .notif, and we have enough
space for it.

Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
Link: https://lore.kernel.org/r/408c5b1b2d8869e1a12da5f5a78ed72cac112149.1662639236.git.asml.silence@xxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 io_uring/net.c |   18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -60,15 +60,7 @@ struct io_sr_msg {
 	unsigned			done_io;
 	unsigned			msg_flags;
 	u16				flags;
-};
-
-struct io_sendzc {
-	struct file			*file;
-	void __user			*buf;
-	unsigned			len;
-	unsigned			done_io;
-	unsigned			msg_flags;
-	u16				flags;
+	/* used only for sendzc */
 	u16				addr_len;
 	void __user			*addr;
 	struct io_kiocb 		*notif;
@@ -188,7 +180,7 @@ static int io_sendmsg_copy_hdr(struct io
 
 int io_sendzc_prep_async(struct io_kiocb *req)
 {
-	struct io_sendzc *zc = io_kiocb_to_cmd(req, struct io_sendzc);
+	struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
 	struct io_async_msghdr *io;
 	int ret;
 
@@ -885,7 +877,7 @@ out_free:
 
 void io_sendzc_cleanup(struct io_kiocb *req)
 {
-	struct io_sendzc *zc = io_kiocb_to_cmd(req, struct io_sendzc);
+	struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
 
 	zc->notif->flags |= REQ_F_CQE_SKIP;
 	io_notif_flush(zc->notif);
@@ -894,7 +886,7 @@ void io_sendzc_cleanup(struct io_kiocb *
 
 int io_sendzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
 {
-	struct io_sendzc *zc = io_kiocb_to_cmd(req, struct io_sendzc);
+	struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
 	struct io_ring_ctx *ctx = req->ctx;
 	struct io_kiocb *notif;
 
@@ -1000,7 +992,7 @@ static int io_sg_from_iter(struct sock *
 int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
 {
 	struct sockaddr_storage __address, *addr = NULL;
-	struct io_sendzc *zc = io_kiocb_to_cmd(req, struct io_sendzc);
+	struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
 	struct msghdr msg;
 	struct iovec iov;
 	struct socket *sock;


Patches currently in stable-queue which might be from asml.silence@xxxxxxxxx are

queue-6.0/io_uring-correct-pinned_vm-accounting.patch
queue-6.0/io_uring-net-fix-notif-cqe-reordering.patch
queue-6.0/io_uring-net-don-t-update-msg_name-if-not-provided.patch
queue-6.0/io_uring-rw-fix-unexpected-link-breakage.patch
queue-6.0/io_uring-net-don-t-skip-notifs-for-failed-requests.patch
queue-6.0/io_uring-net-rename-io_sendzc.patch
queue-6.0/io_uring-net-refactor-io_sr_msg-types.patch
queue-6.0/io_uring-fix-cqe-reordering.patch
queue-6.0/io_uring-net-don-t-lose-partial-send-recv-on-fail.patch
queue-6.0/io_uring-rw-don-t-lose-partial-io-result-on-fail.patch
queue-6.0/io_uring-net-fix-fast_iov-assignment-in-io_setup_async_msg.patch
queue-6.0/io_uring-net-don-t-lose-partial-send_zc-on-fail.patch
queue-6.0/io_uring-limit-registration-w-single_issuer.patch
queue-6.0/io_uring-net-use-io_sr_msg-for-sendzc.patch
queue-6.0/io_uring-add-custom-opcode-hooks-on-fail.patch
queue-6.0/io_uring-rw-don-t-lose-short-results-on-io_setup_async_rw.patch
queue-6.0/io_uring-af_unix-defer-registered-files-gc-to-io_uring-release.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux