Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp773194ybi; Tue, 16 Jul 2019 05:06:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxCpiV1mAFoNo/6WC7bXSmxWLhyPZAf3mQicAEk4DyMHaZ9kymoj4a/KBBl8IUX6o51acc X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr34009470plb.24.1563278818918; Tue, 16 Jul 2019 05:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278818; cv=none; d=google.com; s=arc-20160816; b=qhMqUcg/vAl4dWiN70deUfcb7GrRl4QDPsas97MiI7jTmed0tixge9693EiEpvFGDV K/B5ZbNIwU16KET8w0x2ejHTDULgchLLOVrKc6r8/Q7Kwm2ISfgavjGMRcdOM2LoJ6Ig 7gW9he3B1X6qzXid/uXOyRwkH4+8BDvpot8Rxdo2TdwRG12lWOx/qe21yBIY5gGzLohD mWuogfyBD479mLtHHdVpo98DIkl28V6Ypz9hXbVRYqCp6NQYOjgAfKiIka62cZYiymC3 MkaERytY6jsJvw4ckCO8VfC2dtnV+Qtll8jYp0so9HdWWPLl3erX+SFbpb93oZXgl+2K fEjw== 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=xNCMzpLPnJqugTJ8JkyNWnSJmu8lZh1ZxnEHhRr/fBA=; b=Juc5wwwl9AeLxLJ9zZs3yY/dJMM8Bb6T7RSidi9SSlwkwCrg04o6pGF+3fO0zjKTjL rxinQd0r91qgV26Dd752PPpEdvMlSmGyHFtSjX1t5/NEOxPXx+/OqGfQ8UX5Iw3uq4Te XaQiVOdxGzqsxSfQcSYcR1PkC+sETCgCAObLj2Z6/fYgNFUl7PD0YJWrTtyB54YqUnka 8gYLxbXs7vK9dYC0Nrg9VRu1Sr1me7bL1nchCnoCsf4md6WO6o82fILlpp40/aF7YCYh pwvD4YAAMtLqCHyLjNFhYel/cMJeMhJqZWIp9NpKorBcjMJ384xFQI/s7LXJmXEbZkFq iMeQ== 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 q23si19526781pfc.179.2019.07.16.05.06.43; Tue, 16 Jul 2019 05:06:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732756AbfGPMFu (ORCPT + 99 others); Tue, 16 Jul 2019 08:05:50 -0400 Received: from verein.lst.de ([213.95.11.211]:41167 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728137AbfGPMFu (ORCPT ); Tue, 16 Jul 2019 08:05:50 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B9E3E227A81; Tue, 16 Jul 2019 14:05:47 +0200 (CEST) Date: Tue, 16 Jul 2019 14:05:47 +0200 From: Christoph Hellwig To: Benjamin Herrenschmidt Cc: Christoph Hellwig , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jens Axboe , Keith Busch , Paul Pawlowski Subject: Re: [PATCH 2/3] nvme: Retrieve the required IO queue entry size from the controller Message-ID: <20190716120547.GA2388@lst.de> References: <20190716004649.17799-1-benh@kernel.crashing.org> <20190716004649.17799-2-benh@kernel.crashing.org> <20190716060430.GB29414@lst.de> <20190716093301.GA32562@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 08:58:28PM +1000, Benjamin Herrenschmidt wrote: > The main risk is if existing controllers return crap in SQES and we try > to then use that crap. The rest should essentially be NOPs. > > Maybe I should add some kind of printk to warn in case we use/detect a > non-standard size. That would help diagnosing issues. Given that the spec currently requires bits 0 to 3 of SQES to be 6 we might as well not check SQES and just hardcode it to 6 or 7 depending on the quirk. That actually was my initial idea, I just suggested using the SQES naming and indexing.