Skip to content

Commit

Permalink
Revert "io_uring: support CQE32 for nop operation"
Browse files Browse the repository at this point in the history
This reverts commit 2bb04df.

CQE32 nops were used for debugging and benchmarking but it doesn't
target any real use case. Revert it, we can return it back if someone
finds a good way to use it.

Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/5ff623d84ccb4b3f3b92a3ea41cdcfa612f3d96f.1655224415.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Jun 14, 2022
1 parent feaf625 commit 8899ce4
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,12 +784,6 @@ struct io_msg {
u32 len;
};

struct io_nop {
struct file *file;
u64 extra1;
u64 extra2;
};

struct io_async_connect {
struct sockaddr_storage address;
};
Expand Down Expand Up @@ -994,7 +988,6 @@ struct io_kiocb {
struct io_msg msg;
struct io_xattr xattr;
struct io_socket sock;
struct io_nop nop;
struct io_uring_cmd uring_cmd;
};

Expand Down Expand Up @@ -5268,14 +5261,6 @@ static int io_splice(struct io_kiocb *req, unsigned int issue_flags)

static int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
/*
* If the ring is setup with CQE32, relay back addr/addr
*/
if (req->ctx->flags & IORING_SETUP_CQE32) {
req->nop.extra1 = READ_ONCE(sqe->addr);
req->nop.extra2 = READ_ONCE(sqe->addr2);
}

return 0;
}

Expand All @@ -5296,11 +5281,7 @@ static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
}

cflags = io_put_kbuf(req, issue_flags);
if (!(req->ctx->flags & IORING_SETUP_CQE32))
__io_req_complete(req, issue_flags, 0, cflags);
else
__io_req_complete32(req, issue_flags, 0, cflags,
req->nop.extra1, req->nop.extra2);
__io_req_complete(req, issue_flags, 0, cflags);
return 0;
}

Expand Down

0 comments on commit 8899ce4

Please sign in to comment.