Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3219071ybl; Mon, 19 Aug 2019 14:26:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwpF0T6vlLN3mwScWrootk1bSIbaatLfCDHiZMgwr+V1EouVLGC/1nTF/GQ65Y/1EXSK9F X-Received: by 2002:a17:902:4ac2:: with SMTP id q2mr22339227plh.81.1566249988489; Mon, 19 Aug 2019 14:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566249988; cv=none; d=google.com; s=arc-20160816; b=QiFWVCr3NvmBUWYpT1uNfunN9Bs48dx2Q3JNLCuByj2JJ8UMFcW1/3X1TFDBqeYoNW MUbr6fDxkibpRRxCi7k8S/0Ts0yX/NmiQhmFs75FbasLBmd5QEk7PC+eC9z1hz6YD1Ll j35+PtS7ECNdQnyXEpp4ITdGn4hG3Irm4LxxEyordSwZsboLiht2kE0Gq46IvzBKST/M upKc8I7VG8RIZcpoRoKZoLOsDnR5ukLhu7/U1PUwcoytOrKLafvXyYCnYn4s2ypw6xsx k19Ma76/h/hLKh5OsJvpwlDln7hXXL1xtc3rQeqC51vvXF180U1gR+Q+Lb7g+pZGO+m2 yRLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RZRbCaerOwO/fRG1CtaKGJ4B5z1B0R7xwAe7PAIHQ1M=; b=SwIPCj1KQGkUMOzfoDvbdaeLwdBd7rP8DU4x2g0eb8gBzm6jywaKx/UkiVUUD3OSNB gaNV62fkWL8iTpjZK7g2z9N4p4B6k6YTPihJZS+F2siKoo/w/2NFeXWDSG9yJvs2iX5g dZ8avQaLiN6OkXdP4acp+5Zzos0jSRMP5htjKrL/dmCkC9UnJpApG/YEBEUhZTOLw0F+ GXeX1Gd2n6WIDDoaEkzId6iknXqsPW77fcxdrDLSZPiA52HXXX/R0WTdMJ+HDEfNXQDT EvDQHAQsBiQdLl4eQYOkOCQ4M6WrmEnLtZRv3FgFBXBQT1G8K3GMDXtfXxvhkSTq8yt6 A2QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20si10877778pfn.133.2019.08.19.14.26.13; Mon, 19 Aug 2019 14:26:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728601AbfHSVXu (ORCPT + 99 others); Mon, 19 Aug 2019 17:23:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:18400 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728463AbfHSVXt (ORCPT ); Mon, 19 Aug 2019 17:23:49 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 14:23:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,406,1559545200"; d="scan'208";a="168876419" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga007.jf.intel.com with ESMTP; 19 Aug 2019 14:23:48 -0700 Date: Mon, 19 Aug 2019 15:21:45 -0600 From: Keith Busch To: Sagi Grimberg Cc: Marta Rybczynska , Christoph Hellwig , axboe , linux-nvme , linux-kernel , Samuel Jones , Guillaume Missonnier Subject: Re: [PATCH v2] nvme: allow 64-bit results in passthru commands Message-ID: <20190819212145.GB11202@localhost.localdomain> References: <89520652.56920183.1565948841909.JavaMail.zimbra@kalray.eu> <20190816131606.GA26191@lst.de> <469829119.56970464.1566198383932.JavaMail.zimbra@kalray.eu> <20190819144922.GC6883@localhost.localdomain> <1d7819a9-9504-2dc6-fca4-fbde4f99d92c@grimberg.me> <20190819185749.GA11202@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 02:17:44PM -0700, Sagi Grimberg wrote: > > >>>> ----- On 16 Aug, 2019, at 15:16, Christoph Hellwig hch@lst.de wrote: > >>>>> Sorry for not replying to the earlier version, and thanks for doing > >>>>> this work. > >>>>> > >>>>> I wonder if instead of using our own structure we'd just use > >>>>> a full nvme SQE for the input and CQE for that output. Even if we > >>>>> reserve a few fields that means we are ready for any newly used > >>>>> field (at least until the SQE/CQE sizes are expanded..). > >>>> > >>>> We could do that, nvme_command and nvme_completion are already UAPI. > >>>> On the other hand that would mean not filling out certain fields like > >>>> command_id. Can do an approach like this. > >>> > >>> Well, we need to pass user space addresses and lengths, which isn't > >>> captured in struct nvme_command. > >> > >> Isn't simply having a 64 variant simpler? > > > > Could you provide more details on what you mean by this? > > Why would we need to pass addresses and lengths if userspace is > sending the 64 variant when it is expecting a 64 result? > > Or maybe I'm missing something... The recommendation was to have user space provide an SQE, i.e. 'struct nvme_command', as input to the driver and receive 'struct nvme_completion' in response. I am only pointing out that 'struct nvme_command' is inappropriate for user space.