* [PATCH 0/2] nvmetcli: make model and ctrl-id configurable
@ 2019-11-22 7:42 Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 1/2] nvmetcli: allow setting of the cntlid[min|max] Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 2/2] nvmetcli: allow setting of the subsystem model Chaitanya Kulkarni
0 siblings, 2 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2019-11-22 7:42 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, Chaitanya Kulkarni
Hi,
This patch series allows users to set the subsys model and ctrl-id
fields.
Chaitanya Kulkarni (2):
nvmetcli: allow setting of the cntlid[min|max]
nvmetcli: allow setting of the subsystem model
nvmetcli | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] nvmetcli: allow setting of the cntlid[min|max]
2019-11-22 7:42 [PATCH 0/2] nvmetcli: make model and ctrl-id configurable Chaitanya Kulkarni
@ 2019-11-22 7:42 ` Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 2/2] nvmetcli: allow setting of the subsystem model Chaitanya Kulkarni
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2019-11-22 7:42 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, Chaitanya Kulkarni
This patch allows users to set the subsystem's cntlid min and
cntlid max.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
nvmetcli | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/nvmetcli b/nvmetcli
index 3d8c16e..4fdac53 100755
--- a/nvmetcli
+++ b/nvmetcli
@@ -155,6 +155,8 @@ class UISubsystemNode(UINode):
ui_desc_attr = {
'allow_any_host': ('string', 'Allow access by any host if set to 1'),
'serial': ('string', 'Export serial number to hosts'),
+ 'cntlid_min': ('number', 'Set min ctrl id'),
+ 'cntlid_max': ('number', 'Set max ctrl id'),
'version': ('string', 'Export version number to hosts'),
}
@@ -172,6 +174,21 @@ class UISubsystemNode(UINode):
info.append("allow_any=" +
self.cfnode.get_attr("attr", "allow_any_host"))
info.append("serial=" + self.cfnode.get_attr("attr", "serial"))
+
+ try:
+ cntlid_min = str(self.cfnode.get_attr("attr", "cntlid_min"))
+ except Exception as e:
+ cntlid_min = "n/a"
+ if cntlid_min != "n/a":
+ info.append("cntlid_min=" + cntlid_min)
+
+ try:
+ cntlid_max = str(self.cfnode.get_attr("attr", "cntlid_max"))
+ except Exception as e:
+ cntlid_max = "n/a"
+ if cntlid_max != "n/a":
+ info.append("cntlid_max=" + cntlid_max)
+
return (", ".join(info), True)
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] nvmetcli: allow setting of the subsystem model
2019-11-22 7:42 [PATCH 0/2] nvmetcli: make model and ctrl-id configurable Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 1/2] nvmetcli: allow setting of the cntlid[min|max] Chaitanya Kulkarni
@ 2019-11-22 7:42 ` Chaitanya Kulkarni
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2019-11-22 7:42 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, Chaitanya Kulkarni
From: Mark Ruijter <MRuijter@onestopsystems.com>
This patch allows users to set the subsystem's model.
Signed-off-by: Mark Ruijter <MRuijter@onestopsystems.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
nvmetcli | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/nvmetcli b/nvmetcli
index 4fdac53..ea17f95 100755
--- a/nvmetcli
+++ b/nvmetcli
@@ -157,6 +157,7 @@ class UISubsystemNode(UINode):
'serial': ('string', 'Export serial number to hosts'),
'cntlid_min': ('number', 'Set min ctrl id'),
'cntlid_max': ('number', 'Set max ctrl id'),
+ 'model': ('string', 'Set a model description'),
'version': ('string', 'Export version number to hosts'),
}
@@ -189,6 +190,13 @@ class UISubsystemNode(UINode):
if cntlid_max != "n/a":
info.append("cntlid_max=" + cntlid_max)
+ try:
+ model = str(self.cfnode.get_attr("attr", "model"))
+ except Exception as e:
+ model = "n/a"
+ if model != "n/a":
+ info.append("model=" + model)
+
return (", ".join(info), True)
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-22 7:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 7:42 [PATCH 0/2] nvmetcli: make model and ctrl-id configurable Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 1/2] nvmetcli: allow setting of the cntlid[min|max] Chaitanya Kulkarni
2019-11-22 7:42 ` [PATCH 2/2] nvmetcli: allow setting of the subsystem model Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).