Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4028246yba; Tue, 7 May 2019 10:54:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbja5ElNcgfgun/DoXEKC+y3fR3cdqMgenZYzDV6HyILVFfAfET33HZ4AONqY+hIqww7aw X-Received: by 2002:a65:4649:: with SMTP id k9mr17657467pgr.239.1557251655839; Tue, 07 May 2019 10:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557251655; cv=none; d=google.com; s=arc-20160816; b=K4yKtP0nWBZexWyGTQrWVkiNEvgWz5DfksasHEKlLlOp/5dWGDelfDZaIDXxBMWQ/s Yef2kYyfifzaunCq0eNDW3vTwdWZm5jLAhEhXZB3HCVzqtd6vvpUPeu0F/Ru7xs2JnIw loDdBJb252v8wPVNOn1OvMmVxDVE6aUVHb+KlLrWNsicu5+Qxj68V/EQ6m8gten1QOlJ clx3H0kdsH57JAmMYhCTdXrypvWhqAqsAn2vu+bowhGXYub35286rWAlaFekK2zv58Vg pT+9zsdRMM8vx86kbiR/Iea3o710zvbqogQLGDn/X6stj7DmjG/t9yuUYJ//wOIplvZz DBfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Z3J4FQ2nygmDZP1WGCYbD8Ip8fcAPef3VsGCH7ZZN7Y=; b=i1t9Naez/QwKOUk+HbCHshMaow7pu4HRWWmIQJ3tCo1FvV8iLoLx+18WylpARf6sWA q84bAIFFroB3lzSQFaBESPqcblQGr3y+IhOLQhgVRJmC+ORRmwmw4KGDIhL7gKVaPCL7 4jvQjnBKFxQmuLpZbBkUKPHNPYIFjhOuwVGxH3vRv5zUBYubxMtXQpRH5cT28GiYKNp2 DEXzsWhouUlVFb1TPGyf3M+0AvSK9fn+n+M9ybcq8X+BE+oEULmE2gNlJ5Abm5Db83Ge BVrDqyR3a7FvxyJimrtTbaMRdK5mwpgX3o8776g0fDYnSeei2jG6GLKTGbXQxDgwGbdV 3jdg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si19686240plo.243.2019.05.07.10.53.59; Tue, 07 May 2019 10:54:15 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727063AbfEGRxB (ORCPT + 99 others); Tue, 7 May 2019 13:53:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:62483 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbfEGRxB (ORCPT ); Tue, 7 May 2019 13:53:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2019 10:53:00 -0700 Received: from unknown (HELO [10.232.112.171]) ([10.232.112.171]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 07 May 2019 10:52:59 -0700 Subject: Re: [PATCH v2 4/7] nvme.h: add telemetry log page definisions To: Akinobu Mita , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Sagi Grimberg , Keith Busch , Minwoo Im , Johannes Berg , Christoph Hellwig References: <1557248314-4238-1-git-send-email-akinobu.mita@gmail.com> <1557248314-4238-5-git-send-email-akinobu.mita@gmail.com> From: "Heitke, Kenneth" Message-ID: <67f0d1ab-2edb-24ea-a4b5-62c90c1ef0fb@intel.com> Date: Tue, 7 May 2019 11:52:58 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1557248314-4238-5-git-send-email-akinobu.mita@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/7/2019 10:58 AM, Akinobu Mita wrote: > Copy telemetry log page definisions from nvme-cli. > > Cc: Johannes Berg > Cc: Keith Busch > Cc: Jens Axboe > Cc: Christoph Hellwig > Cc: Sagi Grimberg > Cc: Minwoo Im > Signed-off-by: Akinobu Mita > --- > * v2 > - New patch in this version. > > include/linux/nvme.h | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/include/linux/nvme.h b/include/linux/nvme.h > index c40720c..5217fe4 100644 > --- a/include/linux/nvme.h > +++ b/include/linux/nvme.h > @@ -396,6 +396,28 @@ enum { > NVME_NIDT_UUID = 0x03, > }; > > +/* Derived from 1.3a Figure 101: Get Log Page – Telemetry Host > + * -Initiated Log (Log Identifier 07h) > + */ Is this Host Initiated or Controller Initiated? The comment says host initiated but everything else seems to indicated controller initiated. Is controller initiated even the correct choice because the controller would have sent an AER to indicate that the host should pull the telemetry data. > +struct nvme_telemetry_log_page_hdr { > + __u8 lpi; /* Log page identifier */ > + __u8 rsvd[4]; > + __u8 iee_oui[3]; > + __le16 dalb1; /* Data area 1 last block */ > + __le16 dalb2; /* Data area 2 last block */ > + __le16 dalb3; /* Data area 3 last block */ > + __u8 rsvd1[368]; /* TODO verify */ > + __u8 ctrlavail; /* Controller initiated data avail?*/ > + __u8 ctrldgn; /* Controller initiated telemetry Data Gen # */ > + __u8 rsnident[128]; > + /* We'll have to double fetch so we can get the header, > + * parse dalb1->3 determine how much size we need for the > + * log then alloc below. Or just do a secondary non-struct > + * allocation. > + */ > + __u8 telemetry_dataarea[0]; > +}; > + > struct nvme_smart_log { > __u8 critical_warning; > __u8 temperature[2]; > @@ -832,6 +854,7 @@ enum { > NVME_LOG_FW_SLOT = 0x03, > NVME_LOG_CHANGED_NS = 0x04, > NVME_LOG_CMD_EFFECTS = 0x05, > + NVME_LOG_TELEMETRY_CTRL = 0x08, > NVME_LOG_ANA = 0x0c, > NVME_LOG_DISC = 0x70, > NVME_LOG_RESERVATION = 0x80, >