diff options
-rw-r--r-- | src/testbed/testbed.conf.in | 1 | ||||
-rw-r--r-- | src/testbed/testbed_api.c | 16 | ||||
-rw-r--r-- | src/testbed/testbed_api.h | 5 | ||||
-rw-r--r-- | src/testbed/testbed_api_peers.c | 2 |
4 files changed, 23 insertions, 1 deletions
diff --git a/src/testbed/testbed.conf.in b/src/testbed/testbed.conf.in index ccd9c4f792..418f11cd3a 100644 --- a/src/testbed/testbed.conf.in +++ b/src/testbed/testbed.conf.in @@ -12,3 +12,4 @@ UNIX_MATCH_GID = YES MAX_PARALLEL_OPERATIONS = 1000 MAX_PARALLEL_SERVICE_CONNECTIONS = 1000 MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 5 +MAX_PARALLEL_OVERLAY_CONNECT_OPERATIONS = 30 diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 7f9aeff0fe..e5722218a9 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c @@ -1566,6 +1566,7 @@ GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle unsigned long long max_parallel_operations; unsigned long long max_parallel_service_connections; unsigned long long max_parallel_topology_config_operations; + unsigned long long max_parallel_overlay_connect_operations; if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, "testbed", @@ -1591,6 +1592,14 @@ GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle GNUNET_break (0); return NULL; } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, "testbed", + "MAX_PARALLEL_OVERLAY_CONNECT_OPERATIONS", + &max_parallel_overlay_connect_operations)) + { + GNUNET_break (0); + return NULL; + } controller = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Controller)); controller->cc = cc; controller->cc_cls = cc_cls; @@ -1628,7 +1637,10 @@ GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle max_parallel_service_connections); controller->opq_parallel_topology_config_operations= GNUNET_TESTBED_operation_queue_create_ ((unsigned int) - max_parallel_service_connections); + max_parallel_topology_config_operations); + controller->opq_parallel_overlay_connect_operations= + GNUNET_TESTBED_operation_queue_create_ ((unsigned int) + max_parallel_overlay_connect_operations); controller_hostname = GNUNET_TESTBED_host_get_hostname_ (host); if (NULL == controller_hostname) controller_hostname = "127.0.0.1"; @@ -1719,6 +1731,8 @@ GNUNET_TESTBED_controller_disconnect (struct GNUNET_TESTBED_Controller (controller->opq_parallel_service_connections); GNUNET_TESTBED_operation_queue_destroy_ (controller->opq_parallel_topology_config_operations); + GNUNET_TESTBED_operation_queue_destroy_ + (controller->opq_parallel_overlay_connect_operations); GNUNET_free (controller); } diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h index 001f402855..7b92ff51bb 100644 --- a/src/testbed/testbed_api.h +++ b/src/testbed/testbed_api.h @@ -302,6 +302,11 @@ struct GNUNET_TESTBED_Controller struct OperationQueue *opq_parallel_topology_config_operations; /** + * Operation queue for simultaneous overlay connect operations + */ + struct OperationQueue *opq_parallel_overlay_connect_operations; + + /** * The operation id counter. use current value and increment */ uint32_t operation_counter; diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c index 4902fc0f88..3c3f478eac 100644 --- a/src/testbed/testbed_api_peers.c +++ b/src/testbed/testbed_api_peers.c @@ -722,6 +722,8 @@ GNUNET_TESTBED_overlay_connect (void *op_cls, &oprelease_overlay_connect); GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations, opc->op); + GNUNET_TESTBED_operation_queue_insert_ + (opc->c->opq_parallel_overlay_connect_operations, opc->op); return opc->op; } |