From patchwork Mon Nov 7 12:52:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Yudaken X-Patchwork-Id: 13034318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF6DAC4332F for ; Mon, 7 Nov 2022 12:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231625AbiKGMxE (ORCPT ); Mon, 7 Nov 2022 07:53:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231682AbiKGMxC (ORCPT ); Mon, 7 Nov 2022 07:53:02 -0500 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97C7D1C131 for ; Mon, 7 Nov 2022 04:53:01 -0800 (PST) Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A75wKAe013036 for ; Mon, 7 Nov 2022 04:53:00 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=dI01kHpT6Bh8dsXyPB9VqjlwwDSWMFy9A1u+I4SG6ss=; b=MKc4OFTwPQBfkyTTVwKtc7lx8zLmHRhaxsfIPhKtuet5l4I0iUZaqta3iAk96BjQmXDB Fkat6WPlaL71Ygs7W3Q/Flw+JvzM8xr6kju48KWQpTG8jQjDMeFWl8Q+Aoytt4agXTQl DuPq76tDQfhITgWV4fuv8wyhclueef56XB+LK/c/5xwXSli6XdiVvtU51Kx+8cTziXvR d6Xwu5grayfHyknjCBzooGm53GUUV+5YNSxcymIwoTA+7DUIz/W1Hga6+owFTc66a48o +QCrGh0yy4aH/HbUPLoX9QrksR+rs/dpQoh2WV6IAM/9V6YFdrlM95HfEPmVruKmzu5l iw== Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3knnbynjc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 07 Nov 2022 04:53:00 -0800 Received: from twshared5287.03.ash8.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 04:53:00 -0800 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 3C4B790D69E5; Mon, 7 Nov 2022 04:52:45 -0800 (PST) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , Dylan Yudaken Subject: [PATCH for-next 1/4] io_uring: revert "io_uring fix multishot accept ordering" Date: Mon, 7 Nov 2022 04:52:33 -0800 Message-ID: <20221107125236.260132-2-dylany@meta.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107125236.260132-1-dylany@meta.com> References: <20221107125236.260132-1-dylany@meta.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-ORIG-GUID: nCqOuxIrMqNcun9tVOdwu4Z8sWL9CbTY X-Proofpoint-GUID: nCqOuxIrMqNcun9tVOdwu4Z8sWL9CbTY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-07_05,2022-11-07_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This is no longer needed after commit aa1df3a360a0 ("io_uring: fix CQE reordering"), since all reordering is now taken care of. This reverts commit cbd25748545c ("io_uring: fix multishot accept ordering"). Signed-off-by: Dylan Yudaken --- io_uring/net.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/io_uring/net.c b/io_uring/net.c index 9a07e79cc0e6..0d77ddcce0af 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -1325,14 +1325,11 @@ int io_accept(struct io_kiocb *req, unsigned int issue_flags) return IOU_OK; } - if (ret >= 0 && - io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE, false)) + if (ret < 0) + return ret; + if (io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE, true)) goto retry; - - io_req_set_res(req, ret, 0); - if (req->flags & REQ_F_POLLED) - return IOU_STOP_MULTISHOT; - return IOU_OK; + return -ECANCELED; } int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) From patchwork Mon Nov 7 12:52:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Yudaken X-Patchwork-Id: 13034317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45CBDC433FE for ; Mon, 7 Nov 2022 12:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbiKGMxD (ORCPT ); Mon, 7 Nov 2022 07:53:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbiKGMxC (ORCPT ); Mon, 7 Nov 2022 07:53:02 -0500 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8954D1C11D for ; Mon, 7 Nov 2022 04:53:01 -0800 (PST) Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A75wx9O015361 for ; Mon, 7 Nov 2022 04:53:00 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=Y5ewqsdmJVnyuEp1zWhiQ6qxliIutqIHhbKITNnyLWE=; b=des6QnKBx2SkEv2XRaqMsMIF5mcF2U23AY2A0vQiZprQcC5cyakFx7viV2bjD9fe2TQD lPGtHzCxIAF/rhAsbO5xd+ipim68/ZIBKan0u/ZemlFckWJEAVK1mNVjtc0bBeUWuqel btr3ihG1XW/Kp+dMAOVn4JY7hPw2Fhlje7GgpfSpKvj2vhuy0wG+uzoNatk7UGoRRKE9 E1M9FOD3YmFsI6eGVqqy4UnMNYRxgERDQonE7VQAf/0JO2KLAH06k0TeJSwlR+uex0Kt +aiI2ixxNZRzGNcgfcKYQHfissojKZlJ8ppn0rW/ypIEZz/9rb3t3SKu3K8FR9pagjIP jA== Received: from maileast.thefacebook.com ([163.114.130.3]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3knnbynjc3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 07 Nov 2022 04:53:00 -0800 Received: from twshared5287.03.ash8.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 04:53:00 -0800 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 435FD90D69E9; Mon, 7 Nov 2022 04:52:45 -0800 (PST) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , Dylan Yudaken Subject: [PATCH for-next 2/4] io_uring: revert "io_uring: fix multishot poll on overflow" Date: Mon, 7 Nov 2022 04:52:34 -0800 Message-ID: <20221107125236.260132-3-dylany@meta.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107125236.260132-1-dylany@meta.com> References: <20221107125236.260132-1-dylany@meta.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-ORIG-GUID: kPMM-zb5d2FB0Jm-Fgt18SnQz_Unqif1 X-Proofpoint-GUID: kPMM-zb5d2FB0Jm-Fgt18SnQz_Unqif1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-07_05,2022-11-07_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This is no longer needed after commit aa1df3a360a0 ("io_uring: fix CQE reordering"), since all reordering is now taken care of. This reverts commit a2da676376fe ("io_uring: fix multishot poll on overflow"). Signed-off-by: Dylan Yudaken --- io_uring/poll.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/io_uring/poll.c b/io_uring/poll.c index 589b60fc740a..e1b8652b670f 100644 --- a/io_uring/poll.c +++ b/io_uring/poll.c @@ -244,10 +244,8 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) req->apoll_events); if (!io_post_aux_cqe(ctx, req->cqe.user_data, - mask, IORING_CQE_F_MORE, false)) { - io_req_set_res(req, mask, 0); - return IOU_POLL_REMOVE_POLL_USE_RES; - } + mask, IORING_CQE_F_MORE, true)) + return -ECANCELED; } else { ret = io_poll_issue(req, locked); if (ret == IOU_STOP_MULTISHOT) From patchwork Mon Nov 7 12:52:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Yudaken X-Patchwork-Id: 13034314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38EE1C4332F for ; Mon, 7 Nov 2022 12:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231421AbiKGMw5 (ORCPT ); Mon, 7 Nov 2022 07:52:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231375AbiKGMw4 (ORCPT ); Mon, 7 Nov 2022 07:52:56 -0500 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D2C3B4A9 for ; Mon, 7 Nov 2022 04:52:55 -0800 (PST) Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.17.1.5/8.17.1.5) with ESMTP id 2A7AhtmW008247 for ; Mon, 7 Nov 2022 04:52:54 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=FUeqoODRlOr1v5SfWTCyNFQ9US62qxvJYbuCNILGR0o=; b=WXwteOlr6a+7eUYFvLtBjo4iMxgc+TJWygV24C+MjxUxuZCD+eTMkZ4dr6lVVy6ZvJlx apn5ZOGjQBq9KkRS/lFpOuYEpbUTerKWLVI8sbp8Z3boioH427DpkhprXDr/d8EycdF8 iU/7q7x4uZa+KCAKzdTZAq0opnH1AVBFGCpXX9poPTrC2/NE+/mbE7roSenJL71CsNe4 5EV7cg8t2WXq1yl4zuliIRUbD9fbgZka7e8X7CpLiiRgl5AXP7KmCmol/VMF50VStp6W EFC8kDBggTol+NUS4DVnvAJWOFDi0yrTVeKoCDOZn8VbuspdyDZokj3F/rccESNGgfDB hQ== Received: from mail.thefacebook.com ([163.114.132.120]) by m0089730.ppops.net (PPS) with ESMTPS id 3knkb7xb56-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 07 Nov 2022 04:52:54 -0800 Received: from twshared2001.03.ash8.facebook.com (2620:10d:c085:108::4) by mail.thefacebook.com (2620:10d:c085:21d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 04:52:53 -0800 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 4E8ED90D69EC; Mon, 7 Nov 2022 04:52:45 -0800 (PST) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , Dylan Yudaken Subject: [PATCH for-next 3/4] io_uring: allow multishot recv CQEs to overflow Date: Mon, 7 Nov 2022 04:52:35 -0800 Message-ID: <20221107125236.260132-4-dylany@meta.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107125236.260132-1-dylany@meta.com> References: <20221107125236.260132-1-dylany@meta.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: TGuD-ZsFf30cG8ezE_QorJuf-3Muxtui X-Proofpoint-ORIG-GUID: TGuD-ZsFf30cG8ezE_QorJuf-3Muxtui X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-07_05,2022-11-07_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org With commit aa1df3a360a0 ("io_uring: fix CQE reordering"), there are stronger guarantees for overflow ordering. Specifically ensuring that userspace will not receive out of order receive CQEs. Therefore this is not needed any more for recv/recvmsg. Signed-off-by: Dylan Yudaken --- io_uring/net.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/io_uring/net.c b/io_uring/net.c index 0d77ddcce0af..4b79b61f5597 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -603,15 +603,11 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, if (!mshot_finished) { if (io_post_aux_cqe(req->ctx, req->cqe.user_data, *ret, - cflags | IORING_CQE_F_MORE, false)) { + cflags | IORING_CQE_F_MORE, true)) { io_recv_prep_retry(req); return false; } - /* - * Otherwise stop multishot but use the current result. - * Probably will end up going into overflow, but this means - * we cannot trust the ordering anymore - */ + /* Otherwise stop multishot but use the current result. */ } io_req_set_res(req, *ret, cflags); From patchwork Mon Nov 7 12:52:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Yudaken X-Patchwork-Id: 13034315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B141C433FE for ; Mon, 7 Nov 2022 12:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbiKGMw6 (ORCPT ); Mon, 7 Nov 2022 07:52:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231375AbiKGMw5 (ORCPT ); Mon, 7 Nov 2022 07:52:57 -0500 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCF9CB4A9 for ; Mon, 7 Nov 2022 04:52:56 -0800 (PST) Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A75wKbe029735 for ; Mon, 7 Nov 2022 04:52:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=HDr+4RsGdo+XXgaVFk6OYydLnwmmmOZvWla8izAeGXE=; b=IWsfanZ0bdx0kkSFlnAz3iinVNttbUr6Du9bT9LPJAtOboKJF8nqkyEZ8uxg6+NZrUpD YkqVFbUO4cv8gqrNqGWlH/K7y/00glMF7I/YhqhIxvh/KY+vmMzeHVTRjj/1nToGL8el oAxmTZbzG1VckzYcY5ELpPF0EIMpQfPMHVvZjGVx+6FhV8gQZpqJMhf5m4vxI31fssBm L9fDZIvroBtMV7jbeMRSqcG7nOehQMV8KjJtTI/+S+GN34PJyPx/VCs7tG0IamZxbk4B SzvmSBbX7Oy8kT2P3wAE3Nit4/fnWk1/qPdrHc3YCH9h+rihoJbt3ret7ZolqOMBmzuj wQ== Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3knmxsny26-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 07 Nov 2022 04:52:56 -0800 Received: from twshared5476.02.ash7.facebook.com (2620:10d:c085:108::8) by mail.thefacebook.com (2620:10d:c085:11d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 04:52:55 -0800 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 53A9890D69EE; Mon, 7 Nov 2022 04:52:45 -0800 (PST) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , Dylan Yudaken Subject: [PATCH for-next 4/4] io_uring: remove allow_overflow parameter Date: Mon, 7 Nov 2022 04:52:36 -0800 Message-ID: <20221107125236.260132-5-dylany@meta.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107125236.260132-1-dylany@meta.com> References: <20221107125236.260132-1-dylany@meta.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-ORIG-GUID: o9VKWS51CVHWzEAeHr4QXypz5c258kqo X-Proofpoint-GUID: o9VKWS51CVHWzEAeHr4QXypz5c258kqo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-07_05,2022-11-07_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org It is now always true, so just remove it Signed-off-by: Dylan Yudaken --- io_uring/io_uring.c | 13 ++++--------- io_uring/io_uring.h | 6 ++---- io_uring/msg_ring.c | 4 ++-- io_uring/net.c | 4 ++-- io_uring/poll.c | 2 +- io_uring/rsrc.c | 4 ++-- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index db0dec120f09..47631cab6517 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -773,8 +773,7 @@ struct io_uring_cqe *__io_get_cqe(struct io_ring_ctx *ctx, bool overflow) return &rings->cqes[off]; } -bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags, - bool allow_overflow) +bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags) { struct io_uring_cqe *cqe; @@ -800,20 +799,16 @@ bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags return true; } - if (allow_overflow) - return io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0); - - return false; + return io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0); } bool io_post_aux_cqe(struct io_ring_ctx *ctx, - u64 user_data, s32 res, u32 cflags, - bool allow_overflow) + u64 user_data, s32 res, u32 cflags) { bool filled; io_cq_lock(ctx); - filled = io_fill_cqe_aux(ctx, user_data, res, cflags, allow_overflow); + filled = io_fill_cqe_aux(ctx, user_data, res, cflags); io_cq_unlock_post(ctx); return filled; } diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index e99a79f2df9b..d14534a2f8e7 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -33,10 +33,8 @@ void io_req_complete_failed(struct io_kiocb *req, s32 res); void __io_req_complete(struct io_kiocb *req, unsigned issue_flags); void io_req_complete_post(struct io_kiocb *req); void __io_req_complete_post(struct io_kiocb *req); -bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags, - bool allow_overflow); -bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags, - bool allow_overflow); +bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags); +bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags); void __io_commit_cqring_flush(struct io_ring_ctx *ctx); struct page **io_pin_pages(unsigned long ubuf, unsigned long len, int *npages); diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index 90d2fc6fd80e..afb543aab9f6 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -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, true)) + if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0)) return 0; return -EOVERFLOW; @@ -116,7 +116,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, true)) + if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0)) ret = -EOVERFLOW; out_unlock: io_double_unlock_ctx(ctx, target_ctx, issue_flags); diff --git a/io_uring/net.c b/io_uring/net.c index 4b79b61f5597..a1a0b8f223e0 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -603,7 +603,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, if (!mshot_finished) { if (io_post_aux_cqe(req->ctx, req->cqe.user_data, *ret, - cflags | IORING_CQE_F_MORE, true)) { + cflags | IORING_CQE_F_MORE)) { io_recv_prep_retry(req); return false; } @@ -1323,7 +1323,7 @@ int io_accept(struct io_kiocb *req, unsigned int issue_flags) if (ret < 0) return ret; - if (io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE, true)) + if (io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE)) goto retry; return -ECANCELED; } diff --git a/io_uring/poll.c b/io_uring/poll.c index e1b8652b670f..d00c8dc76d34 100644 --- a/io_uring/poll.c +++ b/io_uring/poll.c @@ -244,7 +244,7 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) req->apoll_events); if (!io_post_aux_cqe(ctx, req->cqe.user_data, - mask, IORING_CQE_F_MORE, true)) + mask, IORING_CQE_F_MORE)) return -ECANCELED; } else { ret = io_poll_issue(req, locked); diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 55d4ab96fb92..a10c1ea51933 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -170,10 +170,10 @@ static void __io_rsrc_put_work(struct io_rsrc_node *ref_node) if (prsrc->tag) { if (ctx->flags & IORING_SETUP_IOPOLL) { mutex_lock(&ctx->uring_lock); - io_post_aux_cqe(ctx, prsrc->tag, 0, 0, true); + io_post_aux_cqe(ctx, prsrc->tag, 0, 0); mutex_unlock(&ctx->uring_lock); } else { - io_post_aux_cqe(ctx, prsrc->tag, 0, 0, true); + io_post_aux_cqe(ctx, prsrc->tag, 0, 0); } }