From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D473F1885A5 for ; Fri, 2 Jan 2026 19:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767380821; cv=none; b=hXF0qtOPtN139423GsRHX0elK4n0V9Kg2W8jR4rSB+O2qc4JzYDOdpDJ0Jfi1GMo5ErGJ3wCln7Ob58BauRlM+EOqvab2kLwWIpxa2LG1SfvTDSfNig0kI065dmd2brU+OfwfLuI+SWl7u5dPXjwFL0BABmFlPdFd8J/V+IgsKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767380821; c=relaxed/simple; bh=7nJx56J1NzxtFmDDfkbNO8K/yzsO7v24AHr/MeA72L8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F0uwXI3qAzT8a84R1nYnN9hRyVevttXXOUk1T1qPVTqdrnJQnucez85shuHI/ctinz1010a1c7xY94vCf6YyPRmtH8o64PA/PYLtz1z7/Sb69j8vkcJ108qCK0fI1EdzlzZECjjte+6qz1OC/kF2L1+fsQMb95uTguuGoNmyszM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=gYH2ejBD; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="gYH2ejBD" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-c0c24d0f4ceso7191381a12.1 for ; Fri, 02 Jan 2026 11:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1767380819; x=1767985619; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=lZkU2g9pwmc1oWeUP+RIyHBKEVsfAki23US80eINbcU=; b=gYH2ejBDe+yksOeF8sOHN6Ew8ak0MHtkq/CjTvWoincEBhORCLhjJa7H5xT3AD2b39 C4A7FlVNdK/SXJVoX6F6rEBlu71qCc3m23jM9Ijl3vMm7hTcbFzC7DWMBEO0l8yDryB3 g+wDj2q1ewkDNUQLlpqbpKG1j1JTDY4GIAv2qMD+8bKULb3IIkAIwnA17EJV5A836IaG amTVgI3v1J06oCHSMhaSvKbk+LOaBdqlkJkv0kwdSbEhU0TUwzL2JtLUbs7MQXr41mfo CBe4t5McMY3omDYPlvWoDc+bxzlMvT6s6Vyo4Nr9hxepqiVn/OJ01TgVQkUOLV8qS2F8 mGJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767380819; x=1767985619; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lZkU2g9pwmc1oWeUP+RIyHBKEVsfAki23US80eINbcU=; b=D0yCwnXGP3bDYkfn5m6tjaK9oJYvHgZpf+MiCFOX+hSmIrXtiZ2usHynJarjuPPC5m vG5Yw9lI5sAdXLc9TEzkEX3Rr0MXMhpjd0zRo6edbqzJwjHDMnDAhXBpS18U7ygmlsqa dxFJkM9ZCjP6bwVB1A0XV2WJLaKqqG9WA1Nsc4NVusMWFu2iqQCzL49teOqBtmLhd6Z0 YDwPpuKw+GYNxOgUyWtl4XZr4mYLWWFpdh3UzisBNjsy63bBRWxpVCMTaCDM6HuR5EZV YFmSOFIe6qzX2Kc+L1pNj8edTnDMi7DL1KEHIpG02N2chzrH8UUFR9ECcBMvEcauGhFz NLVw== X-Forwarded-Encrypted: i=1; AJvYcCWW3YEwD60pMXh2ACxe6Jc+U4R7qLnTcD8lCM23VSJyQR9OXDLIXfj1wI7lEae39J/pSTab6IXyoZxJSVI=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1WLrRw6Fv61Oyk20MbqUBTvfG4qAL2r0F5ZgCPJB0yj97X3f3 pV1EUkQwQgDPBGQ4dgXSviGgk0WRKkLCLHtktIt2Cdo3DeWoprhWifL4lFdY+yueGKc= X-Gm-Gg: AY/fxX49Ob2j2LBBI6KTuaM6DYKxemAw6dv2Udn9BFNXVC6/lb6zelVtBfbXygusyHF dC5fEOofbJsOGk6aNijJzrQ3rRnQSDSAomY54QppHy4dq6AwmaNfHckXuTMvIEiyCIT8YzH2vxn zOmvRiAj1/Lu089fEibW+l/9ErWWDro3pUNY7ReqyiMmGRswOzX5i1GAeZ1vNRiqTbWNCBWCw3A 4kz7GhsafUu6wScQci7XTEfzgx/filTDEcyc52mwHg1A8EZ+UwL+KZJGGb50k01IKQqpBK56GDm LeCX6TlKwPV1+uapWmguNojpTydkIZqTXA8Hnq/YsmcsLkO1H7Io1RD3bjTJfTTeBSMAusRN7JV Vz03Prngz/nRF4Epf+zOlMvpGIONGsNN6pqcJc8bdW/ei4RbZ0FT8H6ukevdEyzUEbqalat/Btm n/LCLGklzHV7odeds8u8d5nuIqE4AZyVkQA8xK+9FSrA== X-Google-Smtp-Source: AGHT+IG0JO9l2BkWn3kSOLFClKo9cRMw5aP1DvhpwcNfZqrILZIMkJaMjN6WBCxm1Mg/gTF/PX2QCw== X-Received: by 2002:a05:7301:1a12:b0:2a4:3593:ddd6 with SMTP id 5a478bee46e88-2b05ebb6038mr30508125eec.3.1767380818821; Fri, 02 Jan 2026 11:06:58 -0800 (PST) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id 5a478bee46e88-2b140c42e8bsm1644691eec.26.2026.01.02.11.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 11:06:58 -0800 (PST) Date: Fri, 2 Jan 2026 11:06:57 -0800 From: Mohamed Khalfella To: Randy Jennings Cc: Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Aaron Dailey , John Meneghini , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 06/14] nvme: Rapid Path Failure Recovery read controller identify fields Message-ID: <20260102190657.GT3864520-mkhalfella@purestorage.com> References: <20251126021250.2583630-1-mkhalfella@purestorage.com> <20251126021250.2583630-7-mkhalfella@purestorage.com> <20251231222637.GL3864520-mkhalfella@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20251231222637.GL3864520-mkhalfella@purestorage.com> On Wed 2025-12-31 14:26:39 -0800, Mohamed Khalfella wrote: > On Thu 2025-12-18 07:22:41 -0800, Randy Jennings wrote: > > On Tue, Nov 25, 2025 at 6:13 PM Mohamed Khalfella > > wrote: > > > > > > TP2028 Rapid path failure added new fileds to controller identify > > TP8028 > > Fixed. > > > > response. Read CIU (Controller Instance Uniquifier), CIRN (Controller > > > Instance Random Number), and CCRL (Cross-Controller Reset Limit) from > > > controller identify response. Expose CIU and CIRN as sysfs attributes > > > so the values can be used directrly by user if needed. > > > > > > TP4129 KATO Corrections and Clarifications defined CQT (Command Quiesce > > > Time) which is used along with KATO (Keep Alive Timeout) to set an upper > > > limite for attempting Cross-Controller Recovery. > > "limite" -> "limit" > > Fixed. > > > > > > > Signed-off-by: Mohamed Khalfella > > > --- > > > drivers/nvme/host/core.c | 5 +++++ > > > drivers/nvme/host/nvme.h | 11 +++++++++++ > > > drivers/nvme/host/sysfs.c | 23 +++++++++++++++++++++++ > > > 3 files changed, 39 insertions(+) > > > > > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > > > index fa4181d7de73..aa007a7b9606 100644 > > > --- a/drivers/nvme/host/core.c > > > +++ b/drivers/nvme/host/core.c > > > @@ -3572,12 +3572,17 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl) > > > ctrl->crdt[1] = le16_to_cpu(id->crdt2); > > > ctrl->crdt[2] = le16_to_cpu(id->crdt3); > > > > > > + ctrl->ciu = id->ciu; > > > + ctrl->cirn = le64_to_cpu(id->cirn); > > > + atomic_set(&ctrl->ccr_limit, id->ccrl); > > Seems like it would be good for the target & init to use the same > > name for these fields. I have a preference for these over > > instance_uniquifier and random because they are more concise, but > > the preference is not strong. > > The field names in the spec are concise, but they are also cryptic. > > > > > > + > > > ctrl->oacs = le16_to_cpu(id->oacs); > > > ctrl->oncs = le16_to_cpu(id->oncs); > > > ctrl->mtfa = le16_to_cpu(id->mtfa); > > > ctrl->oaes = le32_to_cpu(id->oaes); > > > ctrl->wctemp = le16_to_cpu(id->wctemp); > > > ctrl->cctemp = le16_to_cpu(id->cctemp); > > > + ctrl->cqt = le16_to_cpu(id->cqt); > > > > > > atomic_set(&ctrl->abort_limit, id->acl + 1); > > > ctrl->vwc = id->vwc; > > I cannot discern an ordering to the attributes set here. Any > > particular reason, you placed cqt away from the others you added? > > No reason. Moved ctrl->cqt initialization up with other fields. > > > > > > diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c > > > index 29430949ce2f..ae36249ad61e 100644 > > > --- a/drivers/nvme/host/sysfs.c > > > +++ b/drivers/nvme/host/sysfs.c > > > @@ -388,6 +388,27 @@ nvme_show_int_function(queue_count); > > > nvme_show_int_function(sqsize); > > > nvme_show_int_function(kato); > > > > > > +static ssize_t nvme_sysfs_uniquifier_show(struct device *dev, > > > + struct device_attribute *attr, > > > + char *buf) > > > +{ > > > + struct nvme_ctrl *ctrl = dev_get_drvdata(dev); > > > + > > > + return sysfs_emit(buf, "%02x\n", ctrl->ciu); > > > +} > > > +static DEVICE_ATTR(uniquifier, S_IRUGO, nvme_sysfs_uniquifier_show, NULL); > > > + > > > +static ssize_t nvme_sysfs_random_show(struct device *dev, > > > + struct device_attribute *attr, > > > + char *buf) > > > +{ > > > + struct nvme_ctrl *ctrl = dev_get_drvdata(dev); > > > + > > > + return sysfs_emit(buf, "%016llx\n", ctrl->cirn); > > > +} > > > +static DEVICE_ATTR(random, S_IRUGO, nvme_sysfs_random_show, NULL); > > > + > > > + > > > static ssize_t nvme_sysfs_delete(struct device *dev, > > > struct device_attribute *attr, const char *buf, > > > size_t count) > > > @@ -734,6 +755,8 @@ static struct attribute *nvme_dev_attrs[] = { > > > &dev_attr_numa_node.attr, > > > &dev_attr_queue_count.attr, > > > &dev_attr_sqsize.attr, > > > + &dev_attr_uniquifier.attr, > > > + &dev_attr_random.attr, > > > &dev_attr_hostnqn.attr, > > > &dev_attr_hostid.attr, > > > &dev_attr_ctrl_loss_tmo.attr, > > > -- > > > 2.51.2 > > > > > > > These are the names used in the target code (uniquifer & random. > > I'd rather have them match (identify structure will have spec's > > abbreviations; ctrl & debug/sysfs for target & initiator either be > > ciu/cirn or uniquifer/random. > > I think it matters for sysfs attributes. I do not know the right thing > to do. Should we use spec names like "cirn" or call it "random"? Now I am thinking about it, I think sticking to the spec's abbreviations makes more sense here. names like "random" and "uniquifier" in sysfs are not descriptive enough. I changed struct member names, sysfs, and debugfs file names to match the spec. > > > > > But this is small stuff. > > > > Reviewed-by: Randy Jennings