From mboxrd@z Thu Jan 1 00:00:00 1970 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 68E2CC43217 for ; Tue, 19 Apr 2022 20:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355022AbiDSU7c (ORCPT ); Tue, 19 Apr 2022 16:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbiDSU7b (ORCPT ); Tue, 19 Apr 2022 16:59:31 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045824132B for ; Tue, 19 Apr 2022 13:56:47 -0700 (PDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23JGdwNl009232 for ; Tue, 19 Apr 2022 13:56:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=iP4NK7PknGzhEUhYWPBnltT7ueTaXI7YqhWtCba+Zq8=; b=YGDw+/OpdHJ8RcQo1TldrHaEbUyJffPoSV57uC6ebQjxeCqtVdCYMmPr+Ude5b7aaajU ty5KuPyejQtLaLfyI8s2AFrAsNlE1CR6bKK04JgGRbcthFsPGcEVJpo2YmINrqbbKYln 2LEf8zj/0WgOfrSkgj5SQG4HEQ/Zx5OHTg4= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3fhub744cr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 19 Apr 2022 13:56:47 -0700 Received: from twshared37304.07.ash9.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Apr 2022 13:56:46 -0700 Received: by devvm225.atn0.facebook.com (Postfix, from userid 425415) id 13207DD45FE9; Tue, 19 Apr 2022 13:56:36 -0700 (PDT) From: Stefan Roesch To: , CC: Subject: [PATCH v1 07/11] io_uring: flush completions for CQE32 Date: Tue, 19 Apr 2022 13:56:20 -0700 Message-ID: <20220419205624.1546079-8-shr@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220419205624.1546079-1-shr@fb.com> References: <20220419205624.1546079-1-shr@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: Honps1KSGeJrtGzW4QkoHOIsQT4FO5Lh X-Proofpoint-ORIG-GUID: Honps1KSGeJrtGzW4QkoHOIsQT4FO5Lh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-19_07,2022-04-15_01,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This flushes the completions according to their CQE type: the same processing is done for the default CQE size, but for large CQE's the extra1 and extra2 fields are filled in. Signed-off-by: Stefan Roesch Signed-off-by: Jens Axboe --- fs/io_uring.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index bd352815b9e7..ff6229b6df16 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2877,8 +2877,12 @@ static void __io_submit_flush_completions(struct i= o_ring_ctx *ctx) struct io_kiocb *req =3D container_of(node, struct io_kiocb, comp_list); =20 - if (!(req->flags & REQ_F_CQE_SKIP)) - __io_fill_cqe_req_filled(ctx, req); + if (!(req->flags & REQ_F_CQE_SKIP)) { + if (!(ctx->flags & IORING_SETUP_CQE32)) + __io_fill_cqe_req_filled(ctx, req); + else + __io_fill_cqe32_req_filled(ctx, req); + } } =20 io_commit_cqring(ctx); --=20 2.30.2