From b10bf60cacf0e4e29c20165e8dbd7a9064debc55 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 15 Jul 2016 09:23:45 -0700 Subject: [PATCH] nvmf: remove arbitrary 4-port limit Change-Id: Id37a0f044845c175b2de43a5e1fa76513843f314 Signed-off-by: Daniel Verkamp --- lib/nvmf/port.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/nvmf/port.c b/lib/nvmf/port.c index 13a4ea183..f02a74806 100644 --- a/lib/nvmf/port.c +++ b/lib/nvmf/port.c @@ -41,9 +41,6 @@ #include "spdk/trace.h" #include "spdk/nvmf_spec.h" -#define MAX_FABRIC_INTF_PER_PORT 4 -#define MAX_PORTS 4 - static TAILQ_HEAD(, spdk_nvmf_port) g_port_head = TAILQ_HEAD_INITIALIZER(g_port_head); /* Assumes caller allocated host and port strings on the heap */ @@ -88,17 +85,11 @@ spdk_nvmf_port_find_fabric_intf_by_addr(char *addr) { struct spdk_nvmf_port *port; struct spdk_nvmf_fabric_intf *fabric_intf; - int i; if (addr == NULL) goto find_error; - for (i = 1; i < MAX_PORTS; i++) { - port = spdk_nvmf_port_find_by_tag(i); - if (port == NULL) { - continue; - } - + TAILQ_FOREACH(port, &g_port_head, tailq) { TAILQ_FOREACH(fabric_intf, &port->head, tailq) { if (!strncasecmp(fabric_intf->host, addr, strlen(fabric_intf->host))) { return fabric_intf;