Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1366152ybf; Thu, 27 Feb 2020 09:35:20 -0800 (PST) X-Google-Smtp-Source: APXvYqy6RiM/cE9gb9SBFY3WgIB0iXeRZ3L7mqsg41YeUir4dBZh5UOjD704LzVoUKUIbO1UspVV X-Received: by 2002:a05:6830:140b:: with SMTP id v11mr22544otp.340.1582824920717; Thu, 27 Feb 2020 09:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582824920; cv=none; d=google.com; s=arc-20160816; b=fQcesny10cM2X5MQbmjE8kdQc1oLmluvrxaZ4iwU5ErSCiL6P2b70tIb9h8TdfErUM zf881Gc0y8/YS1w+nlRW+ev4cMAD483WLooq1jCDZeTIU1O14oGNKqEa4DzKszruLhX/ nR5k++z8EGugngQ22Kz5B0iRQkLnsKmydLwyBnBcQCDnrdHchgyvHjhuqiquKgXuUyeC HWgTaazYkCRaiN6HDyIkNcvrVzQ+huYVbPNxMBIxtZ2pN3S/pngweKKlu43CgleZ8MD1 eeHAJpsdNbI7RmJMSo2AQm0VuMrfyfhSPtGahLw01z1XnxdSt70UCFyspaVzHyRIFCKW 8FGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=tN1/3M4hIyUrwsQ+73nJZ9Wb4iGo0vvFxqUsILwd+ew=; b=EgABFJ4F7/0pFFcZQU/uJqP76u/DPkKi7cakb/G6Jo0qaHU9o9C/lZU+WUsd/jL4WO rHrev6ncR0qhiBJCC08QiBgW2Mzi+1lDMxKEkcFdFL9zL9r4S4IQIw/nqZgXfqHSjo/D 67cAYADYdpIXcmKzHbPCcsQN6TqPjWO8HMMqFhJC7v4xUDFDzQ8nazJ9rkuiN9vhkvIj fN/3JFT0M6bjdmT07mi7snUuNAqyCHL7dyXl3JoIN1a4Blvko4wOfWnDLo3cVk4FkfrV 8ZuOyluOtouFEkw0RT4K+JxtapPKIP17iwlGBEB4eBRIOvSvel8Ye+tkWOpVle2TaDbH ZbZQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si2113472otf.271.2020.02.27.09.35.08; Thu, 27 Feb 2020 09:35:20 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730216AbgB0Rdw (ORCPT + 99 others); Thu, 27 Feb 2020 12:33:52 -0500 Received: from ale.deltatee.com ([207.54.116.67]:56752 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729512AbgB0Rdw (ORCPT ); Thu, 27 Feb 2020 12:33:52 -0500 Received: from s0106ac1f6bb1ecac.cg.shawcable.net ([70.73.163.230] helo=[192.168.11.155]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7N2U-0003wS-Ev; Thu, 27 Feb 2020 10:33:35 -0700 To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Christoph Hellwig , Keith Busch , Jens Axboe , Chaitanya Kulkarni , Max Gurtovoy , Stephen Bates References: <20200220203652.26734-1-logang@deltatee.com> <20200220203652.26734-8-logang@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Thu, 27 Feb 2020 10:33:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 70.73.163.230 X-SA-Exim-Rcpt-To: sbates@raithlin.com, maxg@mellanox.com, Chaitanya.Kulkarni@wdc.com, axboe@fb.com, kbusch@kernel.org, hch@lst.de, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, sagi@grimberg.me X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH v11 7/9] nvmet-passthru: Add passthru code to process commands X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the Review! On 2020-02-26 4:28 p.m., Sagi Grimberg wrote: > This looks questionable... There are tons of features that doesn't > make sense here like hmb, temperature stuff, irq stuff, timestamps, > reservations etc... passing-through these will have confusing > semantics.. Maybe white-list what actually makes sense to passthru? Yes, I agree a white-list here probably makes sense. I'll try to come up with a list of features to start that whitelist, though my list might be a bit different from yours: I don't see why temperature or timestamps can't be passed through. Also note: Christoph was advocating against the whitelist for the commands, though, I agree with you that it is the most sensible approach. >> +        break; >> +    case nvme_admin_identify: >> +        switch (req->cmd->identify.cns) { >> +        case NVME_ID_CNS_CTRL: >> +            req->execute = nvmet_passthru_execute_cmd; >> +            req->p.end_req = nvmet_passthru_override_id_ctrl; >> +            return NVME_SC_SUCCESS; >> +        case NVME_ID_CNS_NS: >> +            req->execute = nvmet_passthru_execute_cmd; >> +            req->p.end_req = nvmet_passthru_override_id_ns; >> +            return NVME_SC_SUCCESS; > > Aren't you missing NVME_ID_CNS_NS_DESC_LIST? and > NVME_ID_CNS_NS_ACTIVE_LIST? Well no, seeing they can be passed through the default path.... But in the light of the comment below, yes. >> +        default: >> +            return nvmet_setup_passthru_command(req); >> +        } > > Also here, all the namespace management stuff has questionable > semantics in my mind... Yes, I agree with that. I'll make the change in the next revision. Logan