@@ -362,7 +362,7 @@ bool mca_btl_sctp_proc_accept(mca_btl_sctp_proc_t* btl_proc, struct sockaddr_in*
362
362
*
363
363
* TODO - change this to use a hash for constant time performance
364
364
*/
365
- int mca_btl_sctp_proc_check (uint32_t id , struct mca_btl_sctp_proc_table_node * table ) {
365
+ int mca_btl_sctp_proc_check (sctp_assoc_t id , struct mca_btl_sctp_proc_table_node * table ) {
366
366
#if MCA_BTL_SCTP_DONT_USE_HASH
367
367
int i ;
368
368
for (i = 0 ; i < MCA_BTL_SCTP_PROC_TABLE_SIZE ; i ++ ) {
@@ -376,6 +376,7 @@ int mca_btl_sctp_proc_check(uint32_t id, struct mca_btl_sctp_proc_table_node *ta
376
376
return INVALID_ENTRY ;
377
377
#else
378
378
mca_btl_sctp_proc_t * val ;
379
+ /* TODO fix if sctp_assoc_t is 64 bit (once we change to hash) */
379
380
int rc = opal_hash_table_get_value_uint32 (& mca_btl_sctp_component .sctp_assocID_hash , id , & val );
380
381
if (OPAL_SUCCESS == rc ) {
381
382
return VALID_ENTRY ;
@@ -394,7 +395,7 @@ int mca_btl_sctp_proc_check(uint32_t id, struct mca_btl_sctp_proc_table_node *ta
394
395
* TODO change this to a hash table that can expand to eliminate
395
396
* MCA_BTL_SCTP_PROC_TABLE_SIZE limitation
396
397
*/
397
- void mca_btl_sctp_proc_add (uint32_t id , struct mca_btl_sctp_proc_t * proc , struct mca_btl_sctp_proc_table_node * table ) {
398
+ void mca_btl_sctp_proc_add (sctp_assoc_t id , struct mca_btl_sctp_proc_t * proc , struct mca_btl_sctp_proc_table_node * table ) {
398
399
#if MCA_BTL_SCTP_DONT_USE_HASH
399
400
int i ;
400
401
for (i = 0 ; i < MCA_BTL_SCTP_PROC_TABLE_SIZE ; i ++ ) {
@@ -406,6 +407,7 @@ void mca_btl_sctp_proc_add(uint32_t id, struct mca_btl_sctp_proc_t *proc, struct
406
407
}
407
408
}
408
409
#else
410
+ /* TODO fix if sctp_assoc_t is 64 bit (once we change to hash) */
409
411
int rc = opal_hash_table_set_value_uint32 (& mca_btl_sctp_component .sctp_assocID_hash , id , proc );
410
412
/* TODO handle return code */
411
413
#endif
@@ -417,7 +419,7 @@ void mca_btl_sctp_proc_add(uint32_t id, struct mca_btl_sctp_proc_t *proc, struct
417
419
* ------------------------------------------
418
420
* Returns pointer to a proc that is indexed by the association id.
419
421
*/
420
- mca_btl_sctp_proc_t * mca_btl_sctp_proc_get (uint32_t id , struct mca_btl_sctp_proc_table_node * table ) {
422
+ mca_btl_sctp_proc_t * mca_btl_sctp_proc_get (sctp_assoc_t id , struct mca_btl_sctp_proc_table_node * table ) {
421
423
#if MCA_BTL_SCTP_DONT_USE_HASH
422
424
int i ;
423
425
for (i = 0 ; i < MCA_BTL_SCTP_PROC_TABLE_SIZE ; i ++ ){
@@ -428,6 +430,7 @@ mca_btl_sctp_proc_t *mca_btl_sctp_proc_get(uint32_t id, struct mca_btl_sctp_proc
428
430
return NULL ;
429
431
#else
430
432
mca_btl_sctp_proc_t * val ;
433
+ /* TODO fix if sctp_assoc_t is 64 bit (once we change to hash) */
431
434
int rc = opal_hash_table_get_value_uint32 (& mca_btl_sctp_component .sctp_assocID_hash , id , & val );
432
435
if (OPAL_SUCCESS == rc ) {
433
436
return val ;
0 commit comments