@@ -963,11 +963,12 @@ usnic_do_resends(
963
963
opal_btl_usnic_send_segment_t * sseg ;
964
964
opal_btl_usnic_endpoint_t * endpoint ;
965
965
struct opal_btl_usnic_channel_t * data_channel ;
966
- int ret ;
966
+ int ret , count ;
967
967
968
968
data_channel = & module -> mod_channels [USNIC_DATA_CHANNEL ];
969
969
970
- while ((get_send_credits (data_channel ) > 1 ) &&
970
+ count = mca_btl_usnic_component .max_resends_per_iteration ;
971
+ while (count > 0 && (get_send_credits (data_channel ) > 1 ) &&
971
972
!opal_list_is_empty (& module -> pending_resend_segs )) {
972
973
973
974
/*
@@ -1009,6 +1010,8 @@ usnic_do_resends(
1009
1010
BTL_ERROR (("hotel checkin failed\n" ));
1010
1011
abort (); /* should not be possible */
1011
1012
}
1013
+
1014
+ -- count ;
1012
1015
}
1013
1016
}
1014
1017
@@ -1236,7 +1239,7 @@ opal_btl_usnic_module_progress_sends(
1236
1239
1237
1240
/* Is it time to send ACK? */
1238
1241
if (endpoint -> endpoint_acktime == 0 ||
1239
- endpoint -> endpoint_acktime <= get_nsec ()) {
1242
+ endpoint -> endpoint_acktime <= get_ticks ()) {
1240
1243
if (OPAL_LIKELY (opal_btl_usnic_ack_send (module , endpoint ) == OPAL_SUCCESS )) {
1241
1244
opal_btl_usnic_remove_from_endpoints_needing_ack (endpoint );
1242
1245
} else {
@@ -2366,14 +2369,14 @@ static void init_freelists(opal_btl_usnic_module_t *module)
2366
2369
uint32_t segsize ;
2367
2370
2368
2371
segsize = (module -> local_modex .max_msg_size +
2369
- opal_cache_line_size - 1 ) &
2372
+ mca_btl_usnic_component .prefix_send_offset +
2373
+ opal_cache_line_size - 1 ) &
2370
2374
~(opal_cache_line_size - 1 );
2371
2375
2372
2376
/* Send frags freelists */
2373
2377
OBJ_CONSTRUCT (& module -> small_send_frags , opal_free_list_t );
2374
2378
rc = usnic_compat_free_list_init (& module -> small_send_frags ,
2375
- sizeof (opal_btl_usnic_small_send_frag_t ) +
2376
- mca_btl_usnic_component .prefix_send_offset ,
2379
+ sizeof (opal_btl_usnic_small_send_frag_t ),
2377
2380
opal_cache_line_size ,
2378
2381
OBJ_CLASS (opal_btl_usnic_small_send_frag_t ),
2379
2382
segsize ,
@@ -2390,8 +2393,7 @@ static void init_freelists(opal_btl_usnic_module_t *module)
2390
2393
2391
2394
OBJ_CONSTRUCT (& module -> large_send_frags , opal_free_list_t );
2392
2395
rc = usnic_compat_free_list_init (& module -> large_send_frags ,
2393
- sizeof (opal_btl_usnic_large_send_frag_t ) +
2394
- mca_btl_usnic_component .prefix_send_offset ,
2396
+ sizeof (opal_btl_usnic_large_send_frag_t ),
2395
2397
opal_cache_line_size ,
2396
2398
OBJ_CLASS (opal_btl_usnic_large_send_frag_t ),
2397
2399
0 , /* payload size */
@@ -2408,8 +2410,7 @@ static void init_freelists(opal_btl_usnic_module_t *module)
2408
2410
2409
2411
OBJ_CONSTRUCT (& module -> put_dest_frags , opal_free_list_t );
2410
2412
rc = usnic_compat_free_list_init (& module -> put_dest_frags ,
2411
- sizeof (opal_btl_usnic_put_dest_frag_t ) +
2412
- mca_btl_usnic_component .prefix_send_offset ,
2413
+ sizeof (opal_btl_usnic_put_dest_frag_t ),
2413
2414
opal_cache_line_size ,
2414
2415
OBJ_CLASS (opal_btl_usnic_put_dest_frag_t ),
2415
2416
0 , /* payload size */
@@ -2427,8 +2428,7 @@ static void init_freelists(opal_btl_usnic_module_t *module)
2427
2428
/* list of segments to use for sending */
2428
2429
OBJ_CONSTRUCT (& module -> chunk_segs , opal_free_list_t );
2429
2430
rc = usnic_compat_free_list_init (& module -> chunk_segs ,
2430
- sizeof (opal_btl_usnic_chunk_segment_t ) +
2431
- mca_btl_usnic_component .prefix_send_offset ,
2431
+ sizeof (opal_btl_usnic_chunk_segment_t ),
2432
2432
opal_cache_line_size ,
2433
2433
OBJ_CLASS (opal_btl_usnic_chunk_segment_t ),
2434
2434
segsize ,
@@ -2446,11 +2446,11 @@ static void init_freelists(opal_btl_usnic_module_t *module)
2446
2446
/* ACK segments freelist */
2447
2447
uint32_t ack_segment_len ;
2448
2448
ack_segment_len = (sizeof (opal_btl_usnic_btl_header_t ) +
2449
+ mca_btl_usnic_component .prefix_send_offset +
2449
2450
opal_cache_line_size - 1 ) & ~(opal_cache_line_size - 1 );
2450
2451
OBJ_CONSTRUCT (& module -> ack_segs , opal_free_list_t );
2451
2452
rc = usnic_compat_free_list_init (& module -> ack_segs ,
2452
- sizeof (opal_btl_usnic_ack_segment_t ) +
2453
- mca_btl_usnic_component .prefix_send_offset ,
2453
+ sizeof (opal_btl_usnic_ack_segment_t ),
2454
2454
opal_cache_line_size ,
2455
2455
OBJ_CLASS (opal_btl_usnic_ack_segment_t ),
2456
2456
ack_segment_len ,
0 commit comments