@@ -446,6 +446,17 @@ osm_vendor_init(IN osm_vendor_t * const p_vend,
p_vend->p_log = p_log;
p_vend->timeout = timeout;
p_vend->max_retries = OSM_DEFAULT_RETRY_COUNT;
+
+ if ((max = getenv("OSM_UMAD_MAX_RETRIES")) != NULL) {
+ int tmp = strtol(max, NULL, 0);
+ if (tmp > 0)
+ p_vend->max_retries = tmp;
+ else
+ OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "Error:"
+ "OSM_UMAD_MAX_RETRIES=%d is invalid\n",
+ tmp);
+ }
+
pthread_mutex_init(&p_vend->cb_mutex, NULL);
pthread_mutex_init(&p_vend->match_tbl_mutex, NULL);
p_vend->umad_port_id = -1;
@@ -476,12 +487,13 @@ osm_vendor_init(IN osm_vendor_t * const p_vend,
p_vend->mtbl.max = tmp;
else
OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "Error:"
- "OSM_UMAD_MAX_PENDING=%d is invalid",
+ "OSM_UMAD_MAX_PENDING=%d is invalid\n",
tmp);
}
- OSM_LOG(p_vend->p_log, OSM_LOG_INFO, "%d pending umads specified\n",
- p_vend->mtbl.max);
+ OSM_LOG(p_vend->p_log, OSM_LOG_INFO,
+ "%d max retries %d max pending umads specified\n",
+ p_vend->max_retries, p_vend->mtbl.max);
p_vend->mtbl.tbl = calloc(p_vend->mtbl.max, sizeof(*(p_vend->mtbl.tbl)));
if (!p_vend->mtbl.tbl) {