All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet-rdma: check for a valid adrfam
@ 2016-06-07 21:07 Ming Lin
  2016-06-08 12:06 ` Sagi Grimberg
  0 siblings, 1 reply; 2+ messages in thread
From: Ming Lin @ 2016-06-07 21:07 UTC (permalink / raw)


From: Ming Lin <ming.l@samsung.com>

Now only ipv4 is supported.

Signed-off-by: Ming Lin <ming.l at samsung.com>
---
 drivers/nvme/target/rdma.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index fccb01d..c184ee5 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -1313,6 +1313,15 @@ static int nvmet_rdma_add_port(struct nvmet_port *port)
 	u16 port_in;
 	int ret;
 
+	switch (port->disc_addr.adrfam) {
+	case NVMF_ADDR_FAMILY_IP4:
+		break;
+	default:
+		pr_err("address family %d not supported\n",
+				port->disc_addr.adrfam);
+		return -EINVAL;
+	}
+
 	ret = kstrtou16(port->disc_addr.trsvcid, 0, &port_in);
 	if (ret)
 		return ret;
-- 
1.9.1

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

* [PATCH] nvmet-rdma: check for a valid adrfam
  2016-06-07 21:07 [PATCH] nvmet-rdma: check for a valid adrfam Ming Lin
@ 2016-06-08 12:06 ` Sagi Grimberg
  0 siblings, 0 replies; 2+ messages in thread
From: Sagi Grimberg @ 2016-06-08 12:06 UTC (permalink / raw)


Looks good ming,

Acked-by: Sagi Grimberg <sagi at grimberg.me>

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

end of thread, other threads:[~2016-06-08 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 21:07 [PATCH] nvmet-rdma: check for a valid adrfam Ming Lin
2016-06-08 12:06 ` Sagi Grimberg

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.