Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1419718rdb; Mon, 4 Sep 2023 13:24:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBpfyS0BPmGuMgE/57IovXVOvBePYoRDMrS6eBy98ZRgWz02bs8547kfNaTDDTxkhMkrXb X-Received: by 2002:aa7:d50e:0:b0:52a:10b3:3cc2 with SMTP id y14-20020aa7d50e000000b0052a10b33cc2mr9074506edq.30.1693859090871; Mon, 04 Sep 2023 13:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693859090; cv=none; d=google.com; s=arc-20160816; b=ltZj+J6VCelhK244yeRLtqaSoBpRPZTkjRBnO3GBqy3ODXn6sRbitgs1viI4UEucsp onQRMTfw5fRsHq7zyKOjz7a5QPndX5cxSURUn8KGuqJFCIJaJARFIUw2JRlAUfUnCtPA ATZnKKb24/XG5QxqhTi8EWnj4SWHeG1LNGqRx9JU7V+77C20OwEygQfxMIrHe2I83RNS hfFJ2fqkXUxTAg5wdZdfofSjK47Qs5PBvgmtinakuH0ICqd2eODmLziyJIepfq7wirVG +pgRcBLSB3r4ulb5dj2Nk6Whd+bZtIbg0YhL9EZfsNwkocmYEpfi9nWxvkyLhOWN+2g/ 1s4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gptGKutv8UrS/zDN0Qmum7MxSe9eEjLIE1n6bMLfanE=; fh=HYA7Slyre3OXY0bNpmznUTUmpJlmx2zYQto5A2ZSyFk=; b=iSxo4YWUsWYPoN9EwJRdmXDbuRILNM0S0IWBMG8VAwMm2tVN75TgsJweFGR63vwdr+ /4s5ovOn5eNBKpsgW8jRsaZXR4WIIa65ZMNJmzzmIF0jz4BlBsTOUxp11CaRnXPgYaug kuqM5DdggLoRkDK8acVFz/J+uAQ/k3Ax1BotsDc89BkKQv21OsHeCcvJzxIdqXuCcCSQ q6YsfeXD4XXm0DMbViTHWoRjIBzxPdfPR9LaxI09zpoUvvAM2q9fJClVVsp1lRAI2w/l ZEwIZ/dsbtrKW7FPPtN2PqE3v1caxv5JXbR3E2pS23AC0V/vPazM3i+OZ43neTdv+bcQ Bfpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020aa7d0d1000000b00529197b9a82si6751752edo.673.2023.09.04.13.24.24; Mon, 04 Sep 2023 13:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353325AbjIDQZk (ORCPT + 99 others); Mon, 4 Sep 2023 12:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353298AbjIDQZg (ORCPT ); Mon, 4 Sep 2023 12:25:36 -0400 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 132E0CCB; Mon, 4 Sep 2023 09:25:31 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-99c4923195dso251581466b.2; Mon, 04 Sep 2023 09:25:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844729; x=1694449529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gptGKutv8UrS/zDN0Qmum7MxSe9eEjLIE1n6bMLfanE=; b=PPiJxb2qVfCCL7JplmxT7GpqZWbDxxtRVA6QNPI+6ywvM8txikQnwDWRJyP40ZS86d n20kb83lAiRu/OCx45n1nOEtaQL2cZUPSSPzyHguYVzWN35NNQnRwaQGvJc0MaD5AtK8 J89j60/uh6p93PPIq4nbp1J9Fk6koEU5MOCa0NjYwaHIEVCQMVQfxL93DSvipAIfkyYp K1Eyb3pASZDPnvoojD/O+cbAQq9arYFNpSQsPmxZd/VUtEJd15sKpvNzjfXHNvqDhNrH a5VezUoT36IVGNVgM4PfXp2lbEosv3zHlol9FgwWhvHuDYfh8GHqOduz5NGbKtiXrfQ5 UXwg== X-Gm-Message-State: AOJu0Yz/UouvmosxcTvpkd7W1i4Ozljt4hkTT2PpMJ50DDUalGrShAjr JLfFTQfLg2mje+lpt9b87ow= X-Received: by 2002:a17:907:d690:b0:9a2:2635:dab6 with SMTP id wf16-20020a170907d69000b009a22635dab6mr8211523ejc.47.1693844729572; Mon, 04 Sep 2023 09:25:29 -0700 (PDT) Received: from localhost (fwdproxy-cln-000.fbsv.net. [2a03:2880:31ff::face:b00c]) by smtp.gmail.com with ESMTPSA id se22-20020a170906ce5600b009a1dbf55665sm6365416ejb.161.2023.09.04.09.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Sep 2023 09:25:29 -0700 (PDT) From: Breno Leitao To: sdf@google.com, axboe@kernel.dk, asml.silence@gmail.com, willemdebruijn.kernel@gmail.com, martin.lau@linux.dev, krisman@suse.de Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, io-uring@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com Subject: [PATCH v4 05/10] io_uring/cmd: Pass compat mode in issue_flags Date: Mon, 4 Sep 2023 09:24:58 -0700 Message-Id: <20230904162504.1356068-6-leitao@debian.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230904162504.1356068-1-leitao@debian.org> References: <20230904162504.1356068-1-leitao@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create a new flag to track if the operation is running compat mode. This basically check the context->compat and pass it to the issue_flags, so, it could be queried later in the callbacks. Signed-off-by: Breno Leitao --- include/linux/io_uring.h | 1 + io_uring/uring_cmd.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h index 106cdc55ff3b..bc53b35966ed 100644 --- a/include/linux/io_uring.h +++ b/include/linux/io_uring.h @@ -20,6 +20,7 @@ enum io_uring_cmd_flags { IO_URING_F_SQE128 = (1 << 8), IO_URING_F_CQE32 = (1 << 9), IO_URING_F_IOPOLL = (1 << 10), + IO_URING_F_COMPAT = (1 << 11), }; struct io_uring_cmd { diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 537795fddc87..60f843a357e0 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -128,6 +128,8 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags) issue_flags |= IO_URING_F_SQE128; if (ctx->flags & IORING_SETUP_CQE32) issue_flags |= IO_URING_F_CQE32; + if (ctx->compat) + issue_flags |= IO_URING_F_COMPAT; if (ctx->flags & IORING_SETUP_IOPOLL) { if (!file->f_op->uring_cmd_iopoll) return -EOPNOTSUPP; -- 2.34.1