* [PATCH] nvme-cli: add new HMB identify fields of TP 4002
@ 2017-11-28 11:56 Minwoo Im
2017-11-28 12:37 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Minwoo Im @ 2017-11-28 11:56 UTC (permalink / raw)
Add new HMB identify fields (hmminds, hmmaxd) to struct nvme_id_ctrl.
Those fields were added in TP 4002 which is "HMB Enhancements".
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
linux/nvme.h | 4 +++-
nvme-print.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/linux/nvme.h b/linux/nvme.h
index 2d5be8f..2f30616 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -217,7 +217,9 @@ struct nvme_id_ctrl {
__le16 mntmt;
__le16 mxtmt;
__le32 sanicap;
- __u8 rsvd332[180];
+ __le32 hmminds;
+ __le16 hmmaxd;
+ __u8 rsvd332[174];
__u8 sqes;
__u8 cqes;
__le16 maxcmd;
diff --git a/nvme-print.c b/nvme-print.c
index db11dd7..1808405 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -860,6 +860,8 @@ void __show_nvme_id_ctrl(struct nvme_id_ctrl *ctrl, unsigned int mode, void (*ve
printf("sanicap : %#x\n", le32_to_cpu(ctrl->sanicap));
if (human)
show_nvme_id_ctrl_sanicap(ctrl->sanicap);
+ printf("hmminds : %d\n", le32_to_cpu(ctrl->hmminds));
+ printf("hmmaxd : %d\n", le16_to_cpu(ctrl->hmmaxd));
printf("sqes : %#x\n", ctrl->sqes);
if (human)
show_nvme_id_ctrl_sqes(ctrl->sqes);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] nvme-cli: add new HMB identify fields of TP 4002
2017-11-28 11:56 [PATCH] nvme-cli: add new HMB identify fields of TP 4002 Minwoo Im
@ 2017-11-28 12:37 ` Christoph Hellwig
2017-11-28 12:58 ` Minwoo Im
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-11-28 12:37 UTC (permalink / raw)
Thanks, this looks good:
Reviewed-by: Christoph Hellwig <hch at lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] nvme-cli: add new HMB identify fields of TP 4002
2017-11-28 12:37 ` Christoph Hellwig
@ 2017-11-28 12:58 ` Minwoo Im
2017-11-28 13:04 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Minwoo Im @ 2017-11-28 12:58 UTC (permalink / raw)
Hi all,
I'm sorry for making confusions because of the numbering of reserved field.
It should be started with 338 instead of 332.
The following patch will be good to be reviewed.
Thanks,
Add new HMB identify fields (hmminds, hmmaxd) to struct nvme_id_ctrl.
Those fields were added in TP 4002 which is "HMB Enhancements".
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
linux/nvme.h | 4 +++-
nvme-print.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/linux/nvme.h b/linux/nvme.h
index 2d5be8f..48497a3 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -217,7 +217,9 @@ struct nvme_id_ctrl {
__le16 mntmt;
__le16 mxtmt;
__le32 sanicap;
- __u8 rsvd332[180];
+ __le32 hmminds;
+ __le16 hmmaxd;
+ __u8 rsvd338[174];
__u8 sqes;
__u8 cqes;
__le16 maxcmd;
diff --git a/nvme-print.c b/nvme-print.c
index db11dd7..1808405 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -860,6 +860,8 @@ void __show_nvme_id_ctrl(struct nvme_id_ctrl
*ctrl, unsigned int mode, void (*ve
printf("sanicap : %#x\n", le32_to_cpu(ctrl->sanicap));
if (human)
show_nvme_id_ctrl_sanicap(ctrl->sanicap);
+ printf("hmminds : %d\n", le32_to_cpu(ctrl->hmminds));
+ printf("hmmaxd : %d\n", le16_to_cpu(ctrl->hmmaxd));
printf("sqes : %#x\n", ctrl->sqes);
if (human)
show_nvme_id_ctrl_sqes(ctrl->sqes);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] nvme-cli: add new HMB identify fields of TP 4002
2017-11-28 12:58 ` Minwoo Im
@ 2017-11-28 13:04 ` Christoph Hellwig
2017-11-28 14:21 ` Minwoo Im
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-11-28 13:04 UTC (permalink / raw)
On Tue, Nov 28, 2017@09:58:59PM +0900, Minwoo Im wrote:
> I'm sorry for making confusions because of the numbering of reserved field.
> It should be started with 338 instead of 332.
>
> The following patch will be good to be reviewed.
To make things easier it might be a good idea to start by copying
over nvme.h from the kernel as a first commit.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] nvme-cli: add new HMB identify fields of TP 4002
2017-11-28 13:04 ` Christoph Hellwig
@ 2017-11-28 14:21 ` Minwoo Im
0 siblings, 0 replies; 5+ messages in thread
From: Minwoo Im @ 2017-11-28 14:21 UTC (permalink / raw)
On Tue, Nov 28, 2017@10:04 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Nov 28, 2017@09:58:59PM +0900, Minwoo Im wrote:
>> I'm sorry for making confusions because of the numbering of reserved field.
>> It should be started with 338 instead of 332.
>>
>> The following patch will be good to be reviewed.
>
> To make things easier it might be a good idea to start by copying
> over nvme.h from the kernel as a first commit.
Hi Christoph,
I really appreciate your suggestion for a good idea of nvme.h.
I'm going to send a patch for a sync of nvme.h with kernel's to be reviewed.
After that, I'll send this kind of patch of "HMB identify fields" again.
If I've got anything wrong or misunderstood from your review, please
feel free to let me know.
Thanks,
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-28 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 11:56 [PATCH] nvme-cli: add new HMB identify fields of TP 4002 Minwoo Im
2017-11-28 12:37 ` Christoph Hellwig
2017-11-28 12:58 ` Minwoo Im
2017-11-28 13:04 ` Christoph Hellwig
2017-11-28 14:21 ` Minwoo Im
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.