All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/6] nvme: support unique discovery controller
@ 2021-09-21 15:15 Hannes Reinecke
  2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Hi all,

with TPAR8013 a discovery controller can support a unique subsystem
NQN. This patchset adds support unique discovery subsystem NQNs for
both target and host.
For host support a new connect option 'discovery' is added, as we
can't infer from the NQN whether it should be a discovery connection
or not.

As usual, comments and reviews are welcome.

Changes to v1:
- Rebase to nvme-5.15

Hannes Reinecke (6):
  nvmet: make discovery NQN configurable
  nvme: add CNTRLTYPE definitions for 'identify controller'
  nvmet: set 'CNTRLTYPE' in the identify controller data
  nvme: expose subsystem type in sysfs attribute 'subtype'
  nvme: Add connect option 'discovery'
  nvme: display correct subsystem NQN

 drivers/nvme/host/core.c          | 36 +++++++++++++++++++++++++-
 drivers/nvme/host/fabrics.c       |  6 ++++-
 drivers/nvme/host/fabrics.h       |  6 +++++
 drivers/nvme/host/fc.c            |  2 +-
 drivers/nvme/host/nvme.h          |  1 +
 drivers/nvme/host/rdma.c          |  2 +-
 drivers/nvme/host/tcp.c           |  2 +-
 drivers/nvme/target/admin-cmd.c   |  3 +++
 drivers/nvme/target/configfs.c    | 42 +++++++++++++++++++++++++++++++
 drivers/nvme/target/core.c        |  3 ++-
 drivers/nvme/target/discovery.c   |  2 ++
 drivers/nvme/target/fabrics-cmd.c |  3 ++-
 include/linux/nvme.h              | 10 +++++++-
 13 files changed, 110 insertions(+), 8 deletions(-)

-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/6] nvmet: make discovery NQN configurable
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:15   ` Chaitanya Kulkarni
  2021-09-22 13:32   ` Himanshu Madhani
  2021-09-21 15:15 ` [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller' Hannes Reinecke
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

TPAR8013 allows for unique discovery NQNs, so make the discovery
controller NQN configurable by exposing a subsys attribute
'discovery_nqn'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/target/configfs.c | 42 ++++++++++++++++++++++++++++++++++
 drivers/nvme/target/core.c     |  3 ++-
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index be5d82421e3a..d80717b9779d 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -1233,6 +1233,47 @@ static ssize_t nvmet_subsys_attr_model_store(struct config_item *item,
 }
 CONFIGFS_ATTR(nvmet_subsys_, attr_model);
 
+static ssize_t nvmet_subsys_attr_discovery_nqn_show(struct config_item *item,
+			char *page)
+{
+	struct nvmet_subsys *subsys = nvmet_disc_subsys;
+
+	return snprintf(page, PAGE_SIZE, "%s\n",
+			subsys->subsysnqn);
+}
+
+static ssize_t nvmet_subsys_attr_discovery_nqn_store(struct config_item *item,
+			const char *page, size_t count)
+{
+	struct nvmet_subsys *subsys = to_subsys(item);
+	char *subsysnqn;
+	int len;
+
+	len = strcspn(page, "\n");
+	if (!len)
+		return -EINVAL;
+
+	subsysnqn = kmemdup_nul(page, len, GFP_KERNEL);
+	if (!subsysnqn)
+		return -ENOMEM;
+
+	/*
+	 * The discovery NQN must be different from
+	 * subsystem NQN.
+	 */
+	if (!strcmp(subsysnqn, subsys->subsysnqn)) {
+		kfree(subsysnqn);
+		return -EBUSY;
+	}
+	down_write(&nvmet_config_sem);
+	kfree(nvmet_disc_subsys->subsysnqn);
+	nvmet_disc_subsys->subsysnqn = subsysnqn;
+	up_write(&nvmet_config_sem);
+
+	return count;
+}
+CONFIGFS_ATTR(nvmet_subsys_, attr_discovery_nqn);
+
 #ifdef CONFIG_BLK_DEV_INTEGRITY
 static ssize_t nvmet_subsys_attr_pi_enable_show(struct config_item *item,
 						char *page)
@@ -1262,6 +1303,7 @@ static struct configfs_attribute *nvmet_subsys_attrs[] = {
 	&nvmet_subsys_attr_attr_cntlid_min,
 	&nvmet_subsys_attr_attr_cntlid_max,
 	&nvmet_subsys_attr_attr_model,
+	&nvmet_subsys_attr_attr_discovery_nqn,
 #ifdef CONFIG_BLK_DEV_INTEGRITY
 	&nvmet_subsys_attr_attr_pi_enable,
 #endif
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index b8425fa34300..88ed746c675f 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1491,7 +1491,8 @@ static struct nvmet_subsys *nvmet_find_get_subsys(struct nvmet_port *port,
 	if (!port)
 		return NULL;
 
-	if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn)) {
+	if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn) ||
+	    !strcmp(nvmet_disc_subsys->subsysnqn, subsysnqn)) {
 		if (!kref_get_unless_zero(&nvmet_disc_subsys->ref))
 			return NULL;
 		return nvmet_disc_subsys;
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller'
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
  2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:17   ` Chaitanya Kulkarni
  2021-09-22 13:33   ` Himanshu Madhani
  2021-09-21 15:15 ` [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data Hannes Reinecke
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Update the 'identify controller' structure to define the missing
CNTRLTYPE field.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 include/linux/nvme.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index b7c4c4130b65..ed2428918bca 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -31,6 +31,12 @@ enum nvme_subsys_type {
 	NVME_NQN_NVME	= 2,		/* NVME type target subsystem */
 };
 
+enum nvme_ctrl_type {
+	NVME_CTRL_IO	= 1,		/* I/O controller */
+	NVME_CTRL_DISC	= 2,		/* Discovery controller */
+	NVME_CTRL_ADMIN	= 3,		/* Administrative controller */
+};
+
 /* Address Family codes for Discovery Log Page entry ADRFAM field */
 enum {
 	NVMF_ADDR_FAMILY_PCI	= 0,	/* PCIe */
@@ -244,7 +250,9 @@ struct nvme_id_ctrl {
 	__le32			rtd3e;
 	__le32			oaes;
 	__le32			ctratt;
-	__u8			rsvd100[28];
+	__u8			rsvd100[11];
+	__u8			cntrltype;
+	__u8			fguid[16];
 	__le16			crdt1;
 	__le16			crdt2;
 	__le16			crdt3;
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
  2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
  2021-09-21 15:15 ` [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller' Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:23   ` Chaitanya Kulkarni
  2021-09-21 15:15 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Set the correct 'CNTRLTYPE' field in the identify controller data.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/target/admin-cmd.c   | 3 +++
 drivers/nvme/target/discovery.c   | 2 ++
 drivers/nvme/target/fabrics-cmd.c | 3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index aa6d84d8848e..8546bae5244d 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -374,6 +374,9 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
 
 	id->rab = 6;
 
+	id->cntrltype = ctrl->subsys->type == NVME_NQN_DISC ?
+		NVME_CTRL_DISC : NVME_CTRL_IO;
+
 	/*
 	 * XXX: figure out how we can assign a IEEE OUI, but until then
 	 * the safest is to leave it as zeroes.
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index 7aa62bc6ae84..7b360f8d07e9 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -268,6 +268,8 @@ static void nvmet_execute_disc_identify(struct nvmet_req *req)
 	memcpy_and_pad(id->fr, sizeof(id->fr),
 		       UTS_RELEASE, strlen(UTS_RELEASE), ' ');
 
+	id->cntrltype = NVME_CTRL_DISC;
+
 	/* no limit on data transfer sizes for now */
 	id->mdts = 0;
 	id->cntlid = cpu_to_le16(ctrl->cntlid);
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 7d0454cee920..822601103f29 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -221,7 +221,8 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
 		goto out;
 	}
 
-	pr_info("creating controller %d for subsystem %s for NQN %s%s.\n",
+	pr_info("creating %s controller %d for subsystem %s for NQN %s%s.\n",
+		ctrl->subsys->type == NVME_NQN_DISC ? "discovery" : "nvm",
 		ctrl->cntlid, ctrl->subsys->subsysnqn, ctrl->hostnqn,
 		ctrl->pi_support ? " T10-PI is enabled" : "");
 	req->cqe->result.u16 = cpu_to_le16(ctrl->cntlid);
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype'
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
                   ` (2 preceding siblings ...)
  2021-09-21 15:15 ` [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:25   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  2021-09-21 15:15 ` [PATCH 5/6] nvme: Add connect option 'discovery' Hannes Reinecke
  2021-09-21 15:15 ` [PATCH 6/6] nvme: display correct subsystem NQN Hannes Reinecke
  5 siblings, 2 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

With unique discovery controller NQNs we cannot distinguish the
subsystem type by the NQN alone, but need to check the subsystem
type, too.
So expose the subsystem type in a new sysfs attribute 'subtype'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c | 27 +++++++++++++++++++++++++++
 drivers/nvme/host/nvme.h |  1 +
 2 files changed, 28 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index e486845d2c7e..1ed1b7be2812 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2598,6 +2598,24 @@ static ssize_t nvme_subsys_show_nqn(struct device *dev,
 }
 static SUBSYS_ATTR_RO(subsysnqn, S_IRUGO, nvme_subsys_show_nqn);
 
+static ssize_t nvme_subsys_show_subtype(struct device *dev,
+				    struct device_attribute *attr,
+				    char *buf)
+{
+	struct nvme_subsystem *subsys =
+		container_of(dev, struct nvme_subsystem, dev);
+
+	switch (subsys->subtype) {
+	case NVME_NQN_DISC:
+		return sysfs_emit(buf, "discovery\n");
+	case NVME_NQN_NVME:
+		return sysfs_emit(buf, "nvm\n");
+	default:
+		return sysfs_emit(buf, "reserved\n");
+	}
+}
+static SUBSYS_ATTR_RO(subtype, S_IRUGO, nvme_subsys_show_subtype);
+
 #define nvme_subsys_show_str_function(field)				\
 static ssize_t subsys_##field##_show(struct device *dev,		\
 			    struct device_attribute *attr, char *buf)	\
@@ -2618,6 +2636,7 @@ static struct attribute *nvme_subsys_attrs[] = {
 	&subsys_attr_serial.attr,
 	&subsys_attr_firmware_rev.attr,
 	&subsys_attr_subsysnqn.attr,
+	&subsys_attr_subtype.attr,
 #ifdef CONFIG_NVME_MULTIPATH
 	&subsys_attr_iopolicy.attr,
 #endif
@@ -2688,6 +2707,14 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
 	memcpy(subsys->firmware_rev, id->fr, sizeof(subsys->firmware_rev));
 	subsys->vendor_id = le16_to_cpu(id->vid);
 	subsys->cmic = id->cmic;
+
+	/* Versions prior to 1.4 don't necessarily report a valid type */
+	if (id->cntrltype == NVME_CTRL_DISC ||
+	    !strcmp(subsys->subnqn, NVME_DISC_SUBSYS_NAME))
+		subsys->subtype = NVME_NQN_DISC;
+	else
+		subsys->subtype = NVME_NQN_NVME;
+
 	subsys->awupf = le16_to_cpu(id->awupf);
 #ifdef CONFIG_NVME_MULTIPATH
 	subsys->iopolicy = NVME_IOPOLICY_NUMA;
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 9871c0c9374c..2c7a77f600f8 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -366,6 +366,7 @@ struct nvme_subsystem {
 	char			model[40];
 	char			firmware_rev[8];
 	u8			cmic;
+	enum nvme_subsys_type	subtype;
 	u16			vendor_id;
 	u16			awupf;	/* 0's based awupf value. */
 	struct ida		ns_ida;
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/6] nvme: Add connect option 'discovery'
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
                   ` (3 preceding siblings ...)
  2021-09-21 15:15 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:31   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  2021-09-21 15:15 ` [PATCH 6/6] nvme: display correct subsystem NQN Hannes Reinecke
  5 siblings, 2 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Add a connect option 'discovery' to specify that the connection
should be made to a discovery controller, not a normal I/O controller.
With discovery controllers supporting unique subsystem NQNs we
cannot easily distinguish by the subsystem NQN if this should be
a discovery connection, but we need this information to blank out
options not supported by discovery controllers.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c    | 7 +++++++
 drivers/nvme/host/fabrics.c | 6 +++++-
 drivers/nvme/host/fabrics.h | 1 +
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1ed1b7be2812..ad01e2778cb6 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2715,6 +2715,13 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
 	else
 		subsys->subtype = NVME_NQN_NVME;
 
+	if (nvme_discovery_ctrl(ctrl) && subsys->subtype != NVME_NQN_DISC) {
+		dev_err(ctrl->device,
+			"Subsystem %s is not a discovery controller",
+			subsys->subnqn);
+		kfree(subsys);
+		return -EINVAL;
+	}
 	subsys->awupf = le16_to_cpu(id->awupf);
 #ifdef CONFIG_NVME_MULTIPATH
 	subsys->iopolicy = NVME_IOPOLICY_NUMA;
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 668c6bb7a567..c5a2b71c5268 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -548,6 +548,7 @@ static const match_table_t opt_tokens = {
 	{ NVMF_OPT_NR_POLL_QUEUES,	"nr_poll_queues=%d"	},
 	{ NVMF_OPT_TOS,			"tos=%d"		},
 	{ NVMF_OPT_FAIL_FAST_TMO,	"fast_io_fail_tmo=%d"	},
+	{ NVMF_OPT_DISCOVERY,		"discovery"		},
 	{ NVMF_OPT_ERR,			NULL			}
 };
 
@@ -823,6 +824,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 			}
 			opts->tos = token;
 			break;
+		case NVMF_OPT_DISCOVERY:
+			opts->discovery_nqn = true;
+			break;
 		default:
 			pr_warn("unknown parameter or missing value '%s' in ctrl creation request\n",
 				p);
@@ -949,7 +953,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options);
 #define NVMF_ALLOWED_OPTS	(NVMF_OPT_QUEUE_SIZE | NVMF_OPT_NR_IO_QUEUES | \
 				 NVMF_OPT_KATO | NVMF_OPT_HOSTNQN | \
 				 NVMF_OPT_HOST_ID | NVMF_OPT_DUP_CONNECT |\
-				 NVMF_OPT_DISABLE_SQFLOW |\
+				 NVMF_OPT_DISABLE_SQFLOW | NVMF_OPT_DISCOVERY |\
 				 NVMF_OPT_FAIL_FAST_TMO)
 
 static struct nvme_ctrl *
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index a146cb903869..b61b666e10ec 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -67,6 +67,7 @@ enum {
 	NVMF_OPT_TOS		= 1 << 19,
 	NVMF_OPT_FAIL_FAST_TMO	= 1 << 20,
 	NVMF_OPT_HOST_IFACE	= 1 << 21,
+	NVMF_OPT_DISCOVERY	= 1 << 22,
 };
 
 /**
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/6] nvme: display correct subsystem NQN
  2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
                   ` (4 preceding siblings ...)
  2021-09-21 15:15 ` [PATCH 5/6] nvme: Add connect option 'discovery' Hannes Reinecke
@ 2021-09-21 15:15 ` Hannes Reinecke
  2021-09-22  1:32   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  5 siblings, 2 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-21 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

With discovery controllers supporting unique subsystem NQNs the
actual subsystem NQN might be different from that one passed in
via the connect args. So add a helper to display the resulting
subsystem NQN.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c    | 2 +-
 drivers/nvme/host/fabrics.h | 5 +++++
 drivers/nvme/host/fc.c      | 2 +-
 drivers/nvme/host/rdma.c    | 2 +-
 drivers/nvme/host/tcp.c     | 2 +-
 5 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ad01e2778cb6..084a2df2a58e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -221,7 +221,7 @@ int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
 static void nvme_do_delete_ctrl(struct nvme_ctrl *ctrl)
 {
 	dev_info(ctrl->device,
-		 "Removing ctrl: NQN \"%s\"\n", ctrl->opts->subsysnqn);
+		 "Removing ctrl: NQN \"%s\"\n", nvmf_ctrl_subsysnqn(ctrl));
 
 	flush_work(&ctrl->reset_work);
 	nvme_stop_ctrl(ctrl);
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index b61b666e10ec..56253a060258 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -179,6 +179,11 @@ nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl,
 	return true;
 }
 
+static inline char *nvmf_ctrl_subsysnqn(struct nvme_ctrl *ctrl)
+{
+	return ctrl->subsys ? ctrl->subsys->subnqn : ctrl->opts->subsysnqn;
+}
+
 int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val);
 int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val);
 int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val);
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index aa14ad963d91..fa8bd6c21073 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3572,7 +3572,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
 
 	dev_info(ctrl->ctrl.device,
 		"NVME-FC{%d}: new ctrl: NQN \"%s\"\n",
-		ctrl->cnum, ctrl->ctrl.opts->subsysnqn);
+		ctrl->cnum, nvmf_ctrl_subsysnqn(&ctrl->ctrl));
 
 	return &ctrl->ctrl;
 
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 042c594bc57e..d795a9868674 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -2385,7 +2385,7 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,
 		goto out_uninit_ctrl;
 
 	dev_info(ctrl->ctrl.device, "new ctrl: NQN \"%s\", addr %pISpcs\n",
-		ctrl->ctrl.opts->subsysnqn, &ctrl->addr);
+		nvmf_ctrl_subsysnqn(&ctrl->ctrl), &ctrl->addr);
 
 	mutex_lock(&nvme_rdma_ctrl_mutex);
 	list_add_tail(&ctrl->list, &nvme_rdma_ctrl_list);
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 3c1c29dd3020..78966b8ddb1e 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2582,7 +2582,7 @@ static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
 		goto out_uninit_ctrl;
 
 	dev_info(ctrl->ctrl.device, "new ctrl: NQN \"%s\", addr %pISp\n",
-		ctrl->ctrl.opts->subsysnqn, &ctrl->addr);
+		nvmf_ctrl_subsysnqn(&ctrl->ctrl), &ctrl->addr);
 
 	mutex_lock(&nvme_tcp_ctrl_mutex);
 	list_add_tail(&ctrl->list, &nvme_tcp_ctrl_list);
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/6] nvmet: make discovery NQN configurable
  2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
@ 2021-09-22  1:15   ` Chaitanya Kulkarni
  2021-09-22 13:32   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:15 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> TPAR8013 allows for unique discovery NQNs, so make the discovery
> controller NQN configurable by exposing a subsys attribute
> 'discovery_nqn'.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>

Couple of nits to avoid two extra lines and remove the unnecessary
local var, please consider following :-

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index d80717b9779d..33200dca6a7c 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -1236,10 +1236,7 @@ CONFIGFS_ATTR(nvmet_subsys_, attr_model);
  static ssize_t nvmet_subsys_attr_discovery_nqn_show(struct config_item 
*item,
                         char *page)
  {
-       struct nvmet_subsys *subsys = nvmet_disc_subsys;
-
-       return snprintf(page, PAGE_SIZE, "%s\n",
-                       subsys->subsysnqn);
+       return snprintf(page, PAGE_SIZE, "%s\n", 
nvmet_disc_subsys->subsysnqn);
  }

  static ssize_t nvmet_subsys_attr_discovery_nqn_store(struct 
config_item *item,
@@ -1258,8 +1255,7 @@ static ssize_t 
nvmet_subsys_attr_discovery_nqn_store(struct config_item *item,
                 return -ENOMEM;

         /*
-        * The discovery NQN must be different from
-        * subsystem NQN.
+        * The discovery NQN must be different from subsystem NQN.
          */
         if (!strcmp(subsysnqn, subsys->subsysnqn)) {
                 kfree(subsysnqn);


with that looks good.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller'
  2021-09-21 15:15 ` [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller' Hannes Reinecke
@ 2021-09-22  1:17   ` Chaitanya Kulkarni
  2021-09-22 13:33   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:17 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> Update the 'identify controller' structure to define the missing
> CNTRLTYPE field.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data
  2021-09-21 15:15 ` [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data Hannes Reinecke
@ 2021-09-22  1:23   ` Chaitanya Kulkarni
  2021-09-22  5:00     ` Christoph Hellwig
  2021-09-22  6:01     ` Hannes Reinecke
  0 siblings, 2 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:23 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> Set the correct 'CNTRLTYPE' field in the identify controller data.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>   drivers/nvme/target/admin-cmd.c   | 3 +++
>   drivers/nvme/target/discovery.c   | 2 ++
>   drivers/nvme/target/fabrics-cmd.c | 3 ++-
>   3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index aa6d84d8848e..8546bae5244d 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -374,6 +374,9 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
>   
>   	id->rab = 6;
>   
> +	id->cntrltype = ctrl->subsys->type == NVME_NQN_DISC ?
> +		NVME_CTRL_DISC : NVME_CTRL_IO;
> +

since this check is used on more than one place in this patch,
why not have a helper instead of opencoding that makes code easy so
search e.g.

bool nvmet_is_subsys_disc(struct nvmet_subsys *s)
{
	return subsys->type == NVME_NQN_DISC ? true : false;
}

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype'
  2021-09-21 15:15 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke
@ 2021-09-22  1:25   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:25 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> With unique discovery controller NQNs we cannot distinguish the
> subsystem type by the NQN alone, but need to check the subsystem
> type, too.
> So expose the subsystem type in a new sysfs attribute 'subtype'.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/6] nvme: Add connect option 'discovery'
  2021-09-21 15:15 ` [PATCH 5/6] nvme: Add connect option 'discovery' Hannes Reinecke
@ 2021-09-22  1:31   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:31 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> Add a connect option 'discovery' to specify that the connection
> should be made to a discovery controller, not a normal I/O controller.
> With discovery controllers supporting unique subsystem NQNs we
> cannot easily distinguish by the subsystem NQN if this should be
> a discovery connection, but we need this information to blank out
> options not supported by discovery controllers.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/6] nvme: display correct subsystem NQN
  2021-09-21 15:15 ` [PATCH 6/6] nvme: display correct subsystem NQN Hannes Reinecke
@ 2021-09-22  1:32   ` Chaitanya Kulkarni
  2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-22  1:32 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/21/21 8:15 AM, Hannes Reinecke wrote:
> With discovery controllers supporting unique subsystem NQNs the
> actual subsystem NQN might be different from that one passed in
> via the connect args. So add a helper to display the resulting
> subsystem NQN.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data
  2021-09-22  1:23   ` Chaitanya Kulkarni
@ 2021-09-22  5:00     ` Christoph Hellwig
  2021-09-22  6:01     ` Hannes Reinecke
  1 sibling, 0 replies; 21+ messages in thread
From: Christoph Hellwig @ 2021-09-22  5:00 UTC (permalink / raw)
  To: Chaitanya Kulkarni
  Cc: Hannes Reinecke, Christoph Hellwig, Sagi Grimberg, Keith Busch,
	linux-nvme

On Wed, Sep 22, 2021 at 01:23:03AM +0000, Chaitanya Kulkarni wrote:
> since this check is used on more than one place in this patch,
> why not have a helper instead of opencoding that makes code easy so
> search e.g.
> 
> bool nvmet_is_subsys_disc(struct nvmet_subsys *s)
> {
> 	return subsys->type == NVME_NQN_DISC ? true : false;

That can be just:

	return subsys->type == NVME_NQN_DISC;

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data
  2021-09-22  1:23   ` Chaitanya Kulkarni
  2021-09-22  5:00     ` Christoph Hellwig
@ 2021-09-22  6:01     ` Hannes Reinecke
  1 sibling, 0 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-09-22  6:01 UTC (permalink / raw)
  To: Chaitanya Kulkarni, Christoph Hellwig
  Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 9/22/21 3:23 AM, Chaitanya Kulkarni wrote:
> On 9/21/21 8:15 AM, Hannes Reinecke wrote:
>> Set the correct 'CNTRLTYPE' field in the identify controller data.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>    drivers/nvme/target/admin-cmd.c   | 3 +++
>>    drivers/nvme/target/discovery.c   | 2 ++
>>    drivers/nvme/target/fabrics-cmd.c | 3 ++-
>>    3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
>> index aa6d84d8848e..8546bae5244d 100644
>> --- a/drivers/nvme/target/admin-cmd.c
>> +++ b/drivers/nvme/target/admin-cmd.c
>> @@ -374,6 +374,9 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
>>    
>>    	id->rab = 6;
>>    
>> +	id->cntrltype = ctrl->subsys->type == NVME_NQN_DISC ?
>> +		NVME_CTRL_DISC : NVME_CTRL_IO;
>> +
> 
> since this check is used on more than one place in this patch,
> why not have a helper instead of opencoding that makes code easy so
> search e.g.
> 
> bool nvmet_is_subsys_disc(struct nvmet_subsys *s)
> {
> 	return subsys->type == NVME_NQN_DISC ? true : false;
> }
> 
Good point. Will be updating the patchset.

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/6] nvmet: make discovery NQN configurable
  2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
  2021-09-22  1:15   ` Chaitanya Kulkarni
@ 2021-09-22 13:32   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Himanshu Madhani @ 2021-09-22 13:32 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme



> On Sep 21, 2021, at 10:15 AM, Hannes Reinecke <hare@suse.de> wrote:
> 
> TPAR8013 allows for unique discovery NQNs, so make the discovery
> controller NQN configurable by exposing a subsys attribute
> 'discovery_nqn'.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/target/configfs.c | 42 ++++++++++++++++++++++++++++++++++
> drivers/nvme/target/core.c     |  3 ++-
> 2 files changed, 44 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
> index be5d82421e3a..d80717b9779d 100644
> --- a/drivers/nvme/target/configfs.c
> +++ b/drivers/nvme/target/configfs.c
> @@ -1233,6 +1233,47 @@ static ssize_t nvmet_subsys_attr_model_store(struct config_item *item,
> }
> CONFIGFS_ATTR(nvmet_subsys_, attr_model);
> 
> +static ssize_t nvmet_subsys_attr_discovery_nqn_show(struct config_item *item,
> +			char *page)
> +{
> +	struct nvmet_subsys *subsys = nvmet_disc_subsys;
> +
> +	return snprintf(page, PAGE_SIZE, "%s\n",
> +			subsys->subsysnqn);
> +}
> +
> +static ssize_t nvmet_subsys_attr_discovery_nqn_store(struct config_item *item,
> +			const char *page, size_t count)
> +{
> +	struct nvmet_subsys *subsys = to_subsys(item);
> +	char *subsysnqn;
> +	int len;
> +
> +	len = strcspn(page, "\n");
> +	if (!len)
> +		return -EINVAL;
> +
> +	subsysnqn = kmemdup_nul(page, len, GFP_KERNEL);
> +	if (!subsysnqn)
> +		return -ENOMEM;
> +
> +	/*
> +	 * The discovery NQN must be different from
> +	 * subsystem NQN.
> +	 */
> +	if (!strcmp(subsysnqn, subsys->subsysnqn)) {
> +		kfree(subsysnqn);
> +		return -EBUSY;
> +	}
> +	down_write(&nvmet_config_sem);
> +	kfree(nvmet_disc_subsys->subsysnqn);
> +	nvmet_disc_subsys->subsysnqn = subsysnqn;
> +	up_write(&nvmet_config_sem);
> +
> +	return count;
> +}
> +CONFIGFS_ATTR(nvmet_subsys_, attr_discovery_nqn);
> +
> #ifdef CONFIG_BLK_DEV_INTEGRITY
> static ssize_t nvmet_subsys_attr_pi_enable_show(struct config_item *item,
> 						char *page)
> @@ -1262,6 +1303,7 @@ static struct configfs_attribute *nvmet_subsys_attrs[] = {
> 	&nvmet_subsys_attr_attr_cntlid_min,
> 	&nvmet_subsys_attr_attr_cntlid_max,
> 	&nvmet_subsys_attr_attr_model,
> +	&nvmet_subsys_attr_attr_discovery_nqn,
> #ifdef CONFIG_BLK_DEV_INTEGRITY
> 	&nvmet_subsys_attr_attr_pi_enable,
> #endif
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index b8425fa34300..88ed746c675f 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -1491,7 +1491,8 @@ static struct nvmet_subsys *nvmet_find_get_subsys(struct nvmet_port *port,
> 	if (!port)
> 		return NULL;
> 
> -	if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn)) {
> +	if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn) ||
> +	    !strcmp(nvmet_disc_subsys->subsysnqn, subsysnqn)) {
> 		if (!kref_get_unless_zero(&nvmet_disc_subsys->ref))
> 			return NULL;
> 		return nvmet_disc_subsys;
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

Agree with Comments from Chaitanya. 

With those changes you can add  

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller'
  2021-09-21 15:15 ` [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller' Hannes Reinecke
  2021-09-22  1:17   ` Chaitanya Kulkarni
@ 2021-09-22 13:33   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Himanshu Madhani @ 2021-09-22 13:33 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme



> On Sep 21, 2021, at 10:15 AM, Hannes Reinecke <hare@suse.de> wrote:
> 
> Update the 'identify controller' structure to define the missing
> CNTRLTYPE field.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> include/linux/nvme.h | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index b7c4c4130b65..ed2428918bca 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -31,6 +31,12 @@ enum nvme_subsys_type {
> 	NVME_NQN_NVME	= 2,		/* NVME type target subsystem */
> };
> 
> +enum nvme_ctrl_type {
> +	NVME_CTRL_IO	= 1,		/* I/O controller */
> +	NVME_CTRL_DISC	= 2,		/* Discovery controller */
> +	NVME_CTRL_ADMIN	= 3,		/* Administrative controller */
> +};
> +
> /* Address Family codes for Discovery Log Page entry ADRFAM field */
> enum {
> 	NVMF_ADDR_FAMILY_PCI	= 0,	/* PCIe */
> @@ -244,7 +250,9 @@ struct nvme_id_ctrl {
> 	__le32			rtd3e;
> 	__le32			oaes;
> 	__le32			ctratt;
> -	__u8			rsvd100[28];
> +	__u8			rsvd100[11];
> +	__u8			cntrltype;
> +	__u8			fguid[16];
> 	__le16			crdt1;
> 	__le16			crdt2;
> 	__le16			crdt3;
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype'
  2021-09-21 15:15 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke
  2021-09-22  1:25   ` Chaitanya Kulkarni
@ 2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Himanshu Madhani @ 2021-09-22 13:34 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme



> On Sep 21, 2021, at 10:15 AM, Hannes Reinecke <hare@suse.de> wrote:
> 
> With unique discovery controller NQNs we cannot distinguish the
> subsystem type by the NQN alone, but need to check the subsystem
> type, too.
> So expose the subsystem type in a new sysfs attribute 'subtype'.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/host/core.c | 27 +++++++++++++++++++++++++++
> drivers/nvme/host/nvme.h |  1 +
> 2 files changed, 28 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index e486845d2c7e..1ed1b7be2812 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2598,6 +2598,24 @@ static ssize_t nvme_subsys_show_nqn(struct device *dev,
> }
> static SUBSYS_ATTR_RO(subsysnqn, S_IRUGO, nvme_subsys_show_nqn);
> 
> +static ssize_t nvme_subsys_show_subtype(struct device *dev,
> +				    struct device_attribute *attr,
> +				    char *buf)
> +{
> +	struct nvme_subsystem *subsys =
> +		container_of(dev, struct nvme_subsystem, dev);
> +
> +	switch (subsys->subtype) {
> +	case NVME_NQN_DISC:
> +		return sysfs_emit(buf, "discovery\n");
> +	case NVME_NQN_NVME:
> +		return sysfs_emit(buf, "nvm\n");
> +	default:
> +		return sysfs_emit(buf, "reserved\n");
> +	}
> +}
> +static SUBSYS_ATTR_RO(subtype, S_IRUGO, nvme_subsys_show_subtype);
> +
> #define nvme_subsys_show_str_function(field)				\
> static ssize_t subsys_##field##_show(struct device *dev,		\
> 			    struct device_attribute *attr, char *buf)	\
> @@ -2618,6 +2636,7 @@ static struct attribute *nvme_subsys_attrs[] = {
> 	&subsys_attr_serial.attr,
> 	&subsys_attr_firmware_rev.attr,
> 	&subsys_attr_subsysnqn.attr,
> +	&subsys_attr_subtype.attr,
> #ifdef CONFIG_NVME_MULTIPATH
> 	&subsys_attr_iopolicy.attr,
> #endif
> @@ -2688,6 +2707,14 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
> 	memcpy(subsys->firmware_rev, id->fr, sizeof(subsys->firmware_rev));
> 	subsys->vendor_id = le16_to_cpu(id->vid);
> 	subsys->cmic = id->cmic;
> +
> +	/* Versions prior to 1.4 don't necessarily report a valid type */
> +	if (id->cntrltype == NVME_CTRL_DISC ||
> +	    !strcmp(subsys->subnqn, NVME_DISC_SUBSYS_NAME))
> +		subsys->subtype = NVME_NQN_DISC;
> +	else
> +		subsys->subtype = NVME_NQN_NVME;
> +
> 	subsys->awupf = le16_to_cpu(id->awupf);
> #ifdef CONFIG_NVME_MULTIPATH
> 	subsys->iopolicy = NVME_IOPOLICY_NUMA;
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 9871c0c9374c..2c7a77f600f8 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -366,6 +366,7 @@ struct nvme_subsystem {
> 	char			model[40];
> 	char			firmware_rev[8];
> 	u8			cmic;
> +	enum nvme_subsys_type	subtype;
> 	u16			vendor_id;
> 	u16			awupf;	/* 0's based awupf value. */
> 	struct ida		ns_ida;
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/6] nvme: Add connect option 'discovery'
  2021-09-21 15:15 ` [PATCH 5/6] nvme: Add connect option 'discovery' Hannes Reinecke
  2021-09-22  1:31   ` Chaitanya Kulkarni
@ 2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Himanshu Madhani @ 2021-09-22 13:34 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme



> On Sep 21, 2021, at 10:15 AM, Hannes Reinecke <hare@suse.de> wrote:
> 
> Add a connect option 'discovery' to specify that the connection
> should be made to a discovery controller, not a normal I/O controller.
> With discovery controllers supporting unique subsystem NQNs we
> cannot easily distinguish by the subsystem NQN if this should be
> a discovery connection, but we need this information to blank out
> options not supported by discovery controllers.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/host/core.c    | 7 +++++++
> drivers/nvme/host/fabrics.c | 6 +++++-
> drivers/nvme/host/fabrics.h | 1 +
> 3 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 1ed1b7be2812..ad01e2778cb6 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2715,6 +2715,13 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
> 	else
> 		subsys->subtype = NVME_NQN_NVME;
> 
> +	if (nvme_discovery_ctrl(ctrl) && subsys->subtype != NVME_NQN_DISC) {
> +		dev_err(ctrl->device,
> +			"Subsystem %s is not a discovery controller",
> +			subsys->subnqn);
> +		kfree(subsys);
> +		return -EINVAL;
> +	}
> 	subsys->awupf = le16_to_cpu(id->awupf);
> #ifdef CONFIG_NVME_MULTIPATH
> 	subsys->iopolicy = NVME_IOPOLICY_NUMA;
> diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
> index 668c6bb7a567..c5a2b71c5268 100644
> --- a/drivers/nvme/host/fabrics.c
> +++ b/drivers/nvme/host/fabrics.c
> @@ -548,6 +548,7 @@ static const match_table_t opt_tokens = {
> 	{ NVMF_OPT_NR_POLL_QUEUES,	"nr_poll_queues=%d"	},
> 	{ NVMF_OPT_TOS,			"tos=%d"		},
> 	{ NVMF_OPT_FAIL_FAST_TMO,	"fast_io_fail_tmo=%d"	},
> +	{ NVMF_OPT_DISCOVERY,		"discovery"		},
> 	{ NVMF_OPT_ERR,			NULL			}
> };
> 
> @@ -823,6 +824,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
> 			}
> 			opts->tos = token;
> 			break;
> +		case NVMF_OPT_DISCOVERY:
> +			opts->discovery_nqn = true;
> +			break;
> 		default:
> 			pr_warn("unknown parameter or missing value '%s' in ctrl creation request\n",
> 				p);
> @@ -949,7 +953,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options);
> #define NVMF_ALLOWED_OPTS	(NVMF_OPT_QUEUE_SIZE | NVMF_OPT_NR_IO_QUEUES | \
> 				 NVMF_OPT_KATO | NVMF_OPT_HOSTNQN | \
> 				 NVMF_OPT_HOST_ID | NVMF_OPT_DUP_CONNECT |\
> -				 NVMF_OPT_DISABLE_SQFLOW |\
> +				 NVMF_OPT_DISABLE_SQFLOW | NVMF_OPT_DISCOVERY |\
> 				 NVMF_OPT_FAIL_FAST_TMO)
> 
> static struct nvme_ctrl *
> diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
> index a146cb903869..b61b666e10ec 100644
> --- a/drivers/nvme/host/fabrics.h
> +++ b/drivers/nvme/host/fabrics.h
> @@ -67,6 +67,7 @@ enum {
> 	NVMF_OPT_TOS		= 1 << 19,
> 	NVMF_OPT_FAIL_FAST_TMO	= 1 << 20,
> 	NVMF_OPT_HOST_IFACE	= 1 << 21,
> +	NVMF_OPT_DISCOVERY	= 1 << 22,
> };
> 
> /**
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/6] nvme: display correct subsystem NQN
  2021-09-21 15:15 ` [PATCH 6/6] nvme: display correct subsystem NQN Hannes Reinecke
  2021-09-22  1:32   ` Chaitanya Kulkarni
@ 2021-09-22 13:34   ` Himanshu Madhani
  1 sibling, 0 replies; 21+ messages in thread
From: Himanshu Madhani @ 2021-09-22 13:34 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme



> On Sep 21, 2021, at 10:15 AM, Hannes Reinecke <hare@suse.de> wrote:
> 
> With discovery controllers supporting unique subsystem NQNs the
> actual subsystem NQN might be different from that one passed in
> via the connect args. So add a helper to display the resulting
> subsystem NQN.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/host/core.c    | 2 +-
> drivers/nvme/host/fabrics.h | 5 +++++
> drivers/nvme/host/fc.c      | 2 +-
> drivers/nvme/host/rdma.c    | 2 +-
> drivers/nvme/host/tcp.c     | 2 +-
> 5 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index ad01e2778cb6..084a2df2a58e 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -221,7 +221,7 @@ int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
> static void nvme_do_delete_ctrl(struct nvme_ctrl *ctrl)
> {
> 	dev_info(ctrl->device,
> -		 "Removing ctrl: NQN \"%s\"\n", ctrl->opts->subsysnqn);
> +		 "Removing ctrl: NQN \"%s\"\n", nvmf_ctrl_subsysnqn(ctrl));
> 
> 	flush_work(&ctrl->reset_work);
> 	nvme_stop_ctrl(ctrl);
> diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
> index b61b666e10ec..56253a060258 100644
> --- a/drivers/nvme/host/fabrics.h
> +++ b/drivers/nvme/host/fabrics.h
> @@ -179,6 +179,11 @@ nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl,
> 	return true;
> }
> 
> +static inline char *nvmf_ctrl_subsysnqn(struct nvme_ctrl *ctrl)
> +{
> +	return ctrl->subsys ? ctrl->subsys->subnqn : ctrl->opts->subsysnqn;
> +}
> +
> int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val);
> int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val);
> int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val);
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index aa14ad963d91..fa8bd6c21073 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3572,7 +3572,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
> 
> 	dev_info(ctrl->ctrl.device,
> 		"NVME-FC{%d}: new ctrl: NQN \"%s\"\n",
> -		ctrl->cnum, ctrl->ctrl.opts->subsysnqn);
> +		ctrl->cnum, nvmf_ctrl_subsysnqn(&ctrl->ctrl));
> 
> 	return &ctrl->ctrl;
> 
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 042c594bc57e..d795a9868674 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -2385,7 +2385,7 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,
> 		goto out_uninit_ctrl;
> 
> 	dev_info(ctrl->ctrl.device, "new ctrl: NQN \"%s\", addr %pISpcs\n",
> -		ctrl->ctrl.opts->subsysnqn, &ctrl->addr);
> +		nvmf_ctrl_subsysnqn(&ctrl->ctrl), &ctrl->addr);
> 
> 	mutex_lock(&nvme_rdma_ctrl_mutex);
> 	list_add_tail(&ctrl->list, &nvme_rdma_ctrl_list);
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 3c1c29dd3020..78966b8ddb1e 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2582,7 +2582,7 @@ static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
> 		goto out_uninit_ctrl;
> 
> 	dev_info(ctrl->ctrl.device, "new ctrl: NQN \"%s\", addr %pISp\n",
> -		ctrl->ctrl.opts->subsysnqn, &ctrl->addr);
> +		nvmf_ctrl_subsysnqn(&ctrl->ctrl), &ctrl->addr);
> 
> 	mutex_lock(&nvme_tcp_ctrl_mutex);
> 	list_add_tail(&ctrl->list, &nvme_tcp_ctrl_list);
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype'
  2021-08-27 12:09 [PATCH 0/6] nvme: support unique discovery controller Hannes Reinecke
@ 2021-08-27 12:09 ` Hannes Reinecke
  0 siblings, 0 replies; 21+ messages in thread
From: Hannes Reinecke @ 2021-08-27 12:09 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

With unique discovery controller NQNs we cannot distinguish the
subsystem type by the NQN alone, but need to check the subsystem
type, too.
So expose the subsystem type in a new sysfs attribute 'subtype'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c | 27 +++++++++++++++++++++++++++
 drivers/nvme/host/nvme.h |  1 +
 2 files changed, 28 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d64b406c1a42..3dc2645396df 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2565,6 +2565,24 @@ static ssize_t nvme_subsys_show_nqn(struct device *dev,
 }
 static SUBSYS_ATTR_RO(subsysnqn, S_IRUGO, nvme_subsys_show_nqn);
 
+static ssize_t nvme_subsys_show_subtype(struct device *dev,
+				    struct device_attribute *attr,
+				    char *buf)
+{
+	struct nvme_subsystem *subsys =
+		container_of(dev, struct nvme_subsystem, dev);
+
+	switch (subsys->subtype) {
+	case NVME_NQN_DISC:
+		return sysfs_emit(buf, "discovery\n");
+	case NVME_NQN_NVME:
+		return sysfs_emit(buf, "nvm\n");
+	default:
+		return sysfs_emit(buf, "reserved\n");
+	}
+}
+static SUBSYS_ATTR_RO(subtype, S_IRUGO, nvme_subsys_show_subtype);
+
 #define nvme_subsys_show_str_function(field)				\
 static ssize_t subsys_##field##_show(struct device *dev,		\
 			    struct device_attribute *attr, char *buf)	\
@@ -2585,6 +2603,7 @@ static struct attribute *nvme_subsys_attrs[] = {
 	&subsys_attr_serial.attr,
 	&subsys_attr_firmware_rev.attr,
 	&subsys_attr_subsysnqn.attr,
+	&subsys_attr_subtype.attr,
 #ifdef CONFIG_NVME_MULTIPATH
 	&subsys_attr_iopolicy.attr,
 #endif
@@ -2655,6 +2674,14 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
 	memcpy(subsys->firmware_rev, id->fr, sizeof(subsys->firmware_rev));
 	subsys->vendor_id = le16_to_cpu(id->vid);
 	subsys->cmic = id->cmic;
+
+	/* Versions prior to 1.4 don't necessarily report a valid type */
+	if (id->cntrltype == NVME_CTRL_DISC ||
+	    !strcmp(subsys->subnqn, NVME_DISC_SUBSYS_NAME))
+		subsys->subtype = NVME_NQN_DISC;
+	else
+		subsys->subtype = NVME_NQN_NVME;
+
 	subsys->awupf = le16_to_cpu(id->awupf);
 #ifdef CONFIG_NVME_MULTIPATH
 	subsys->iopolicy = NVME_IOPOLICY_NUMA;
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 26511794629b..b107ad005c3c 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -377,6 +377,7 @@ struct nvme_subsystem {
 	char			model[40];
 	char			firmware_rev[8];
 	u8			cmic;
+	enum nvme_subsys_type	subtype;
 	u16			vendor_id;
 	u16			awupf;	/* 0's based awupf value. */
 	struct ida		ns_ida;
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-09-22 13:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 15:15 [PATCHv2 0/6] nvme: support unique discovery controller Hannes Reinecke
2021-09-21 15:15 ` [PATCH 1/6] nvmet: make discovery NQN configurable Hannes Reinecke
2021-09-22  1:15   ` Chaitanya Kulkarni
2021-09-22 13:32   ` Himanshu Madhani
2021-09-21 15:15 ` [PATCH 2/6] nvme: add CNTRLTYPE definitions for 'identify controller' Hannes Reinecke
2021-09-22  1:17   ` Chaitanya Kulkarni
2021-09-22 13:33   ` Himanshu Madhani
2021-09-21 15:15 ` [PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data Hannes Reinecke
2021-09-22  1:23   ` Chaitanya Kulkarni
2021-09-22  5:00     ` Christoph Hellwig
2021-09-22  6:01     ` Hannes Reinecke
2021-09-21 15:15 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke
2021-09-22  1:25   ` Chaitanya Kulkarni
2021-09-22 13:34   ` Himanshu Madhani
2021-09-21 15:15 ` [PATCH 5/6] nvme: Add connect option 'discovery' Hannes Reinecke
2021-09-22  1:31   ` Chaitanya Kulkarni
2021-09-22 13:34   ` Himanshu Madhani
2021-09-21 15:15 ` [PATCH 6/6] nvme: display correct subsystem NQN Hannes Reinecke
2021-09-22  1:32   ` Chaitanya Kulkarni
2021-09-22 13:34   ` Himanshu Madhani
  -- strict thread matches above, loose matches on Subject: below --
2021-08-27 12:09 [PATCH 0/6] nvme: support unique discovery controller Hannes Reinecke
2021-08-27 12:09 ` [PATCH 4/6] nvme: expose subsystem type in sysfs attribute 'subtype' Hannes Reinecke

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.