@@ -372,6 +372,7 @@ static inline int mca_btl_base_am_rdma_advance(mca_btl_base_module_t *btl,
372
372
mca_btl_base_rdma_context_t * context ,
373
373
bool send_descriptor )
374
374
{
375
+ int ret ;
375
376
const size_t remaining = context -> total_size - context -> sent ;
376
377
377
378
if (0 == remaining ) {
@@ -409,7 +410,12 @@ static inline int mca_btl_base_am_rdma_advance(mca_btl_base_module_t *btl,
409
410
}
410
411
411
412
if (send_descriptor ) {
412
- return btl -> btl_send (btl , endpoint , descriptor , mca_btl_base_rdma_tag (hdr -> type ));
413
+ assert (0 != (descriptor -> des_flags && MCA_BTL_DES_SEND_ALWAYS_CALLBACK ));
414
+ ret = btl -> btl_send (btl , endpoint , descriptor , mca_btl_base_rdma_tag (hdr -> type ));
415
+ if (ret == 1 ) {
416
+ ret = OPAL_SUCCESS ;
417
+ }
418
+ return ret ;
413
419
}
414
420
415
421
/* queue for later to avoid btl_send in callback */
@@ -614,7 +620,14 @@ static int mca_btl_base_am_rdma_respond(mca_btl_base_module_t *btl,
614
620
615
621
send_descriptor -> des_cbfunc = NULL ;
616
622
623
+ /* There is no callback for the response descriptor, therefore it is
624
+ * safe to treat 0 and 1 return codes the same
625
+ */
617
626
int ret = btl -> btl_send (btl , endpoint , send_descriptor , mca_btl_base_rdma_resp_tag ());
627
+ if (ret == 1 ) {
628
+ ret = OPAL_SUCCESS ;
629
+ }
630
+
618
631
if (OPAL_UNLIKELY (OPAL_SUCCESS != ret )) {
619
632
* descriptor = send_descriptor ;
620
633
}
@@ -787,11 +800,12 @@ static int mca_btl_base_am_rdma_progress(void)
787
800
mca_btl_base_rdma_context_t *context = \
788
801
(mca_btl_base_rdma_context_t *) \
789
802
descriptor->descriptor->des_context; \
803
+ assert(0 != (descriptor->descriptor->des_flags && MCA_BTL_DES_SEND_ALWAYS_CALLBACK)); \
790
804
int ret = descriptor->btl->btl_send(descriptor->btl, \
791
805
descriptor->endpoint, \
792
806
descriptor->descriptor, \
793
807
mca_btl_base_rdma_tag(context->type)); \
794
- if (OPAL_SUCCESS == ret) { \
808
+ if (OPAL_SUCCESS == ret || 1 == ret ) { \
795
809
opal_list_remove_item(&default_module.queued_initiator_descriptors, \
796
810
&descriptor->super); \
797
811
} \
0 commit comments