Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2741986pxb; Mon, 31 Jan 2022 03:22:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzatEHc1PEscSUgNsP17YruihOcW83T0AJc7IjtADk5oPo+XiZGDXDe15PgPgolo4UHpCiB X-Received: by 2002:a17:907:9619:: with SMTP id gb25mr16613785ejc.426.1643628162500; Mon, 31 Jan 2022 03:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643628162; cv=none; d=google.com; s=arc-20160816; b=ShRVVcut36+dwr0oyjY9PnYiM2sxwS+dbKz9HgphyWtwDopWrGoY/n/rJaaMmbyJM7 4NDj2ZoeC97l6rRncRaTBdTqLtC1Xt8o44qCoyQ2UsXOJebP7D5WVXc707ibW8SNExUN SU+3w2AzeuVSunO7jqojE85X7OYiHP8hL3GudvlYyfMB2d7LxU8BlaElRJh/JcGdmy3I tgK1rNjak3jgQ3kebdMv7ivhom+3sLM2ioFC2dYLV6i2mapd0x1CWbLCKtggO2lqsVWf 5pFK+h8Bd5NenhPkeKxfU283OaETdWUtjJSFt5d43kvEtGhqHQvtba+mFNyFMMHZy5t+ OcrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=n/1472KZU3nAC1w1yUJXTLLSRgqFxdu3HYz3RKoFZQk=; b=iVmJIjJk4oRu9S1rRI95mg6AWpDP1yv39mq5yLwHbrKyYIXWk6KdrtcVnVK01D1tt0 p6L5oJOKxKechUri6bBy8SwCGfzM9eKEh11T+u1/tbIXlbFI6pinzOKGUfkqG21lC8je j9YPUGN1UOSN6oGC4oDwCf6k0nilQiWRacs0tH1+y4j6fF+TpfUK4JL0+eDRwCV7Op3z hmxKsC9YN44dOFD7SSe4+DY4ofC0TNg3vgJ0vEYusUcT2r9vjoTLc9wb8KJsWBl4igwK Whn6BGZTaexiXSnEMHy458LZFKWPPMjGglR7BgmTWZzarUseW9924IxkHbtUBhwf/zjH q2Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Cdm+ypEB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uaNamDer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e27si8264526ejl.129.2022.01.31.03.22.17; Mon, 31 Jan 2022 03:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Cdm+ypEB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uaNamDer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350430AbiA1RGX (ORCPT + 99 others); Fri, 28 Jan 2022 12:06:23 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:37568 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350419AbiA1RGW (ORCPT ); Fri, 28 Jan 2022 12:06:22 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EBB6B210E6; Fri, 28 Jan 2022 17:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643389580; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n/1472KZU3nAC1w1yUJXTLLSRgqFxdu3HYz3RKoFZQk=; b=Cdm+ypEBhkbghnnsm9wFi79uCSkOrv92sXWLoT0MEDj4V3weyKo5M5uwXuqw+FTWWhZ7YP zyMUu7ExCWzUkEqEG01bHVgFS7hQ2fZZodqXiebbo6AwIB16OGARgxlD7o39huj2XGh7yR AQb8Y+Bq5k19QkYe7ia4UY8hK3ioGBc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643389580; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n/1472KZU3nAC1w1yUJXTLLSRgqFxdu3HYz3RKoFZQk=; b=uaNamDerDMGoBt4kQ2qPMjGW7y6KNn7FMsSwOweCPFPej4xYY6IBAHPNu6khTw1BoFKyGA 7LnqfQttrAdmixAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A2D4213A4A; Fri, 28 Jan 2022 17:06:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iocnJ4wi9GGffgAAMHmgww (envelope-from ); Fri, 28 Jan 2022 17:06:20 +0000 Message-ID: Date: Fri, 28 Jan 2022 18:06:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [RFC] nvme: Do not reject dynamic controller cntlid Content-Language: en-US To: Daniel Wagner , Keith Busch Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220127133648.8201-1-dwagner@suse.de> <20220127171758.GB2266713@dhcp-10-100-145-180.wdc.com> <20220128103137.zugnrh2bbhkqpaoz@carbon.lan> <20220128123638.unxd5fzoctit6lpi@carbon.lan> From: Hannes Reinecke In-Reply-To: <20220128123638.unxd5fzoctit6lpi@carbon.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/28/22 13:36, Daniel Wagner wrote: > On Fri, Jan 28, 2022 at 11:31:37AM +0100, Daniel Wagner wrote: >> On Thu, Jan 27, 2022 at 09:17:58AM -0800, Keith Busch wrote: >>>> +static inline bool nvme_ctrl_dynamic(struct nvme_ctrl *ctrl) >>>> +{ >>>> + return ctrl->cntlid == 0xffff; >>>> +} >>> >>> It's probably safe to assume 0xffff is dynamic, but spec suggests we >>> check ID_CTRL.FCATT bit 0. >> >> Okay, but this one is only defined for fabrics. I haven't found anything >> so far which is equivalent to FCATT bit 0 for memory based transport. > > Never mind. After discussing it with Hannes it turns out there is no > problem here. I didn't understand the spec correctly (it's difficult to > get an exact answer) on this topic. > Weasely wording in the spec again. It talks at great length on controller IDs for fabrics, which values are allowed and which not, and how one should do dynamic controller ids _on fabrics_, but is strangely silent for memory-based (ie PCI) transports. There, apparently, 0xFFFF _is_ a valid controller id, and the only restriction is that the controller ID must be unique. And even that is never stated directly, but must be inferred from the various command payload descriptions. Guess it's a topic for the fmds call. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer