Commit b0e9b551 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring/net: rename io_sendzc()

Simple renaming of io_sendzc*() functions in preparatio to adding
a zerocopy sendmsg variant.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/265af46829e6076dd220011b1858dc3151969226.1663668091.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 516e82f0
...@@ -904,7 +904,7 @@ int io_recv(struct io_kiocb *req, unsigned int issue_flags) ...@@ -904,7 +904,7 @@ int io_recv(struct io_kiocb *req, unsigned int issue_flags)
return ret; return ret;
} }
void io_sendzc_cleanup(struct io_kiocb *req) void io_send_zc_cleanup(struct io_kiocb *req)
{ {
struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg); struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
...@@ -913,7 +913,7 @@ void io_sendzc_cleanup(struct io_kiocb *req) ...@@ -913,7 +913,7 @@ void io_sendzc_cleanup(struct io_kiocb *req)
zc->notif = NULL; zc->notif = NULL;
} }
int io_sendzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{ {
struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg); struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
struct io_ring_ctx *ctx = req->ctx; struct io_ring_ctx *ctx = req->ctx;
...@@ -1022,7 +1022,7 @@ static int io_sg_from_iter(struct sock *sk, struct sk_buff *skb, ...@@ -1022,7 +1022,7 @@ static int io_sg_from_iter(struct sock *sk, struct sk_buff *skb,
return ret; return ret;
} }
int io_sendzc(struct io_kiocb *req, unsigned int issue_flags) int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)
{ {
struct sockaddr_storage __address; struct sockaddr_storage __address;
struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg); struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
......
...@@ -56,9 +56,9 @@ int io_connect_prep_async(struct io_kiocb *req); ...@@ -56,9 +56,9 @@ int io_connect_prep_async(struct io_kiocb *req);
int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
int io_connect(struct io_kiocb *req, unsigned int issue_flags); int io_connect(struct io_kiocb *req, unsigned int issue_flags);
int io_sendzc(struct io_kiocb *req, unsigned int issue_flags); int io_send_zc(struct io_kiocb *req, unsigned int issue_flags);
int io_sendzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
void io_sendzc_cleanup(struct io_kiocb *req); void io_send_zc_cleanup(struct io_kiocb *req);
void io_send_zc_fail(struct io_kiocb *req); void io_send_zc_fail(struct io_kiocb *req);
void io_netmsg_cache_free(struct io_cache_entry *entry); void io_netmsg_cache_free(struct io_cache_entry *entry);
......
...@@ -496,10 +496,10 @@ const struct io_op_def io_op_defs[] = { ...@@ -496,10 +496,10 @@ const struct io_op_def io_op_defs[] = {
.manual_alloc = 1, .manual_alloc = 1,
#if defined(CONFIG_NET) #if defined(CONFIG_NET)
.async_size = sizeof(struct io_async_msghdr), .async_size = sizeof(struct io_async_msghdr),
.prep = io_sendzc_prep, .prep = io_send_zc_prep,
.issue = io_sendzc, .issue = io_send_zc,
.prep_async = io_send_prep_async, .prep_async = io_send_prep_async,
.cleanup = io_sendzc_cleanup, .cleanup = io_send_zc_cleanup,
.fail = io_send_zc_fail, .fail = io_send_zc_fail,
#else #else
.prep = io_eopnotsupp_prep, .prep = io_eopnotsupp_prep,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment