Skip to content

Commit a266d48

Browse files
committed
pml/ob1: refactor append_recv_req_to_queue() to improve readability
and fix a typo in a comment Thanks George for the patch (cherry picked from commit 8e788b5) Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 0404acd commit a266d48

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,10 +1050,6 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq,
10501050
static inline void append_recv_req_to_queue(opal_list_t *queue,
10511051
mca_pml_ob1_recv_request_t *req)
10521052
{
1053-
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE ||
1054-
req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE))
1055-
return;
1056-
10571053
opal_list_append(queue, (opal_list_item_t*)req);
10581054

10591055
/**
@@ -1204,7 +1200,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12041200
req->req_recv.req_base.req_proc = proc->ompi_proc;
12051201
frag = recv_req_match_specific_proc(req, proc);
12061202
queue = &proc->specific_receives;
1207-
/* wild cardrecv will be prepared on match */
1203+
/* wildcard recv will be prepared on match */
12081204
prepare_recv_req_converter(req);
12091205
}
12101206

@@ -1213,7 +1209,9 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12131209
&(req->req_recv.req_base), PERUSE_RECV);
12141210
/* We didn't find any matches. Record this irecv so we can match
12151211
it when the message comes in. */
1216-
append_recv_req_to_queue(queue, req);
1212+
if(OPAL_LIKELY(req->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE &&
1213+
req->req_recv.req_base.req_type != MCA_PML_REQUEST_IMPROBE))
1214+
append_recv_req_to_queue(queue, req);
12171215
req->req_match_received = false;
12181216
OB1_MATCHING_UNLOCK(&ob1_comm->matching_lock);
12191217
} else {

0 commit comments

Comments
 (0)