mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
io_uring: add allow_overflow to io_post_aux_cqe
Some use cases of io_post_aux_cqe would not want to overflow as is, but might want to change the flags/result. For example multishot receive requires in order CQE, and so if there is an overflow it would need to stop receiving until the overflow is taken care of. Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220630091231.1456789-8-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
114eccdf0e
commit
52120f0fad
@@ -31,7 +31,7 @@ static int io_msg_ring_data(struct io_kiocb *req)
|
||||
if (msg->src_fd || msg->dst_fd || msg->flags)
|
||||
return -EINVAL;
|
||||
|
||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))
|
||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0, true))
|
||||
return 0;
|
||||
|
||||
return -EOVERFLOW;
|
||||
@@ -113,7 +113,7 @@ static int io_msg_send_fd(struct io_kiocb *req, unsigned int issue_flags)
|
||||
* completes with -EOVERFLOW, then the sender must ensure that a
|
||||
* later IORING_OP_MSG_RING delivers the message.
|
||||
*/
|
||||
if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))
|
||||
if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0, true))
|
||||
ret = -EOVERFLOW;
|
||||
out_unlock:
|
||||
io_double_unlock_ctx(ctx, target_ctx, issue_flags);
|
||||
|
||||
Reference in New Issue
Block a user