Skip to content

Commit c55e284

Browse files
isilenceaxboe
authored andcommitted
io_uring/net: combine sendzc flags writes
Save an instruction / trip to the cache and assign some of sendzc flags together. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/c519d6f406776c3be3ef988a8339a88e45d1ffd9.1743202294.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 5f36411 commit c55e284

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

io_uring/net.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,6 @@ int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
12911291

12921292
zc->done_io = 0;
12931293
zc->retry = false;
1294-
req->flags |= REQ_F_POLL_NO_LAZY;
12951294

12961295
if (unlikely(READ_ONCE(sqe->__pad2[0]) || READ_ONCE(sqe->addr3)))
12971296
return -EINVAL;
@@ -1305,7 +1304,7 @@ int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
13051304
notif->cqe.user_data = req->cqe.user_data;
13061305
notif->cqe.res = 0;
13071306
notif->cqe.flags = IORING_CQE_F_NOTIF;
1308-
req->flags |= REQ_F_NEED_CLEANUP;
1307+
req->flags |= REQ_F_NEED_CLEANUP | REQ_F_POLL_NO_LAZY;
13091308

13101309
zc->flags = READ_ONCE(sqe->ioprio);
13111310
if (unlikely(zc->flags & ~IO_ZC_FLAGS_COMMON)) {

0 commit comments

Comments
 (0)