From: Ming Lin <ming.l@xxxxxxxxxxx> For now only ipv4 is supported. Signed-off-by: Ming Lin <ming.l@xxxxxxxxxxx> Acked-by: Sagi Grimberg <sagi@xxxxxxxxxxx> Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- 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; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html