From 5da444122ee79fe66f8a95bc112cf80d4eace8da Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 11 Jul 2016 17:20:26 -0700 Subject: [PATCH] nvmf: remove arbitrary 4 RDMA device limit Use the number of devices returned by ibv_get_device_list() instead of stopping at 4. While we're here, drop the unused MAX_SESSIONS_PER_DEVICE definition too. Change-Id: I21ca6c6c95b7f2cccc1de4d0a34b95217a522bfc Signed-off-by: Daniel Verkamp --- lib/nvmf/rdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 7fb37d806..864221567 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -56,8 +56,6 @@ #include "spdk/trace.h" #define ACCEPT_TIMEOUT (rte_get_timer_hz() >> 10) /* ~1ms */ -#define MAX_RDMA_DEVICES 4 -#define MAX_SESSIONS_PER_DEVICE 1 /* for now accept only single session per device */ /* RDMA Connection Resouce Defaults @@ -912,7 +910,7 @@ spdk_nvmf_rdma_init(void) SPDK_TRACELOG(SPDK_TRACE_RDMA, " %d RDMA verbs device(s) discovered\n", num_of_rdma_devices); /* Look through the list of devices for one we support */ - for (i = 0; dev_list[i] && num_devices_found < MAX_RDMA_DEVICES; i++, ibdev_ctx = NULL) { + for (i = 0; i < num_of_rdma_devices; i++) { SPDK_TRACELOG(SPDK_TRACE_DEBUG, " RDMA Device %d:\n", i); SPDK_TRACELOG(SPDK_TRACE_DEBUG, " Node type: %d\n", (int)dev_list[i]->node_type); SPDK_TRACELOG(SPDK_TRACE_DEBUG, " Transport type: %d\n", (int)dev_list[i]->transport_type);