diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 99f3c65d3..bd063bea0 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -133,7 +133,9 @@ static void * send_loop(void *ctx) struct sample *smps[node->out.vectorize]; /* Initialize memory */ - ret = pool_init(&sendd.pool, MAX(8192, 2*LOG2_CEIL(node->out.vectorize)), SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage)); + unsigned pool_cnt = (strcmp(node_type_name(node->_vt), "infiniband") == 0 ? 8192 : LOG2_CEIL(node->out.vectorize)); + + ret = pool_init(&sendd.pool, pool_cnt, SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage)); if (ret < 0) error("Failed to allocate memory for receive pool."); @@ -201,7 +203,9 @@ static void * recv_loop(void *ctx) struct sample *smps[node->in.vectorize]; /* Initialize memory */ - ret = pool_init(&recvv.pool, MAX(8192, 2*LOG2_CEIL(node->in.vectorize)), SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage)); + unsigned pool_cnt = (strcmp(node_type_name(node->_vt), "infiniband") == 0 ? 8192 : LOG2_CEIL(node->in.vectorize)); + + ret = pool_init(&recvv.pool, pool_cnt, SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage)); if (ret < 0) error("Failed to allocate memory for receive pool.");