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 6292DC433F5 for ; Wed, 6 Apr 2022 02:19:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232816AbiDFCNk (ORCPT ); Tue, 5 Apr 2022 22:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457664AbiDEQaX (ORCPT ); Tue, 5 Apr 2022 12:30:23 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C357D7C166 for ; Tue, 5 Apr 2022 09:28:25 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id 88-20020a9d0ee1000000b005d0ae4e126fso7728182otj.5 for ; Tue, 05 Apr 2022 09:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=74fq+cSNE2UwX6pLlf26dcG+/mwze9tFZ1WcAEZygc8=; b=LpAFkybGhasHbCt7KixDHViit9dUHGlwfjDSlx6pX0JwmHWsv3Gxx8/Qo/O5eZ9Hs+ jrGe48NAH0Elud+crOnB5a9pJ9RUT75IdLc5HClO4+NWQ/SzA+zh3Y9wn4lLchO8eBV/ qfE1OqIRNl2FWbgtPpHHPwNJmkK0nJYYrV20DNWtWt1uS3N0px62Rb+FBQYvrfan4PWY p7cg3kZMeazd9zW5zDrAuKskTuIkn6x6199o9AnXE4V9jN653fYqjZy84LjDW20HdNQc fUa8DJuMZMHvafLQgtZQ6M8gQ0fvrfQD+JzCH7i6NM/2+ZcKub7AGb0UH5/3oMWq7nSk XC6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=74fq+cSNE2UwX6pLlf26dcG+/mwze9tFZ1WcAEZygc8=; b=E7B/nEWFHQSL74m/JqoXHz8YLZLnVU6M1mSBYEUgc3zHdeZvhkC7Cml8tnju+Idc81 a/ga2cVlKg7c/zRk7btJ3AhkzYsCaPkBU6DzsvbAGF16C6TQGcplmKQ5pLGShTcvH54L eTi1VGg8xmT8t3r+i43xIyG564hQVYHDjGqLng8DRbtvkcvS8LTpfARSBzNLTKp+MuoI zz5fk2pob4n1GKtP3VXAcpnRR+H2EmRcWtmsYEeATu3Sxp0BOE0fMlFjkGvAJXcMP9S3 EngWjJJPcIxA4syDRhMwsI8QcIi1eJKV6aLrJ3g/36PliQdwfTY1TExQs2JxcxvR+Fvj IcKQ== X-Gm-Message-State: AOAM5339j0VZ8bYTsVwkrxO6/zXyncea8e96tQVtUI/Mwi4A3F0QGeVq vfr20zluFEWiJJ7ag7gS5LZjO6G4HXoSRsT5ufs= X-Google-Smtp-Source: ABdhPJx/xEqaSnm7xNLv/pKl+niTBDY4r88roIh4NAZzAyZwCI1PpgUtucZrmyHVtyBF5CIbZYjKV4FFaMoyQixjxiE= X-Received: by 2002:a9d:eef:0:b0:5d2:8e2f:6729 with SMTP id 102-20020a9d0eef000000b005d28e2f6729mr1556194otj.86.1649176105139; Tue, 05 Apr 2022 09:28:25 -0700 (PDT) MIME-Version: 1.0 References: <20220401110310.611869-1-joshi.k@samsung.com> <20220401110310.611869-4-joshi.k@samsung.com> <20220404071656.GC444@lst.de> <20220405060023.GD23698@lst.de> In-Reply-To: <20220405060023.GD23698@lst.de> From: Kanchan Joshi Date: Tue, 5 Apr 2022 21:57:59 +0530 Message-ID: Subject: Re: [RFC 3/5] io_uring: add infra and support for IORING_OP_URING_CMD To: Christoph Hellwig Cc: Kanchan Joshi , Jens Axboe , io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, Pavel Begunkov , Ming Lei , Luis Chamberlain , Pankaj Raghav , =?UTF-8?Q?Javier_Gonz=C3=A1lez?= , Anuj Gupta Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Tue, Apr 5, 2022 at 11:30 AM Christoph Hellwig wrote: > > On Mon, Apr 04, 2022 at 08:44:20PM +0530, Kanchan Joshi wrote: > > Another stuff that got left out from the previous series :-( > > Using this field for a bit of sanity checking at the moment. Like this in nvme: > > > > + if (ioucmd->cmd_len != sizeof(struct nvme_passthru_cmd64)) > > + return -EINVAL; > > + cptr = (struct nvme_passthru_cmd64 *)ioucmd->cmd; > > Do we actually need that sanity checking? Each command should have > a known length bound by the SQE size, right? Right, and that check can go in io_uring without needing this field (as we keep cmd_len in sqe already). Will remove this from io_uring_cmd struct.