Commit 52316da7 authored by Valentin Petrov's avatar Valentin Petrov Committed by Charles J Archer
Browse files

OFI netmod: RCD protocol bug fix.



The previous version of the protocol assumed that fi_trecv utilizes
direct address for matching. This does not hold, for example, for PSM
OFI provider (it does not set claim FI_DIRECTED_RECV capability). So,
the API1 set should work w/o directed recv assumption. Hence, we have
to encapsulate rank info in the tag in the RCD protocol in order to
avoid mismatch.

Change-Id: I7868f2f033cf3cdec29f7daded8b29c275b2632f
Signed-off-by: default avatarCharles J Archer <charles.j.archer@intel.com>
parent 83b2816f
......@@ -233,7 +233,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
REQ_OFI(new_rreq)->pack_buffer_size,
gl_data.mr,
VC_OFI(vc)->direct_addr,
MPID_MSG_DATA, 0, &(REQ_OFI(new_rreq)->ofi_context)), trecv);
wc->tag | MPID_MSG_CTS | MPID_MSG_DATA, 0, &(REQ_OFI(new_rreq)->ofi_context)), trecv);
MPID_nem_ofi_create_req(&sreq, 1);
sreq->dev.OnDataAvail = NULL;
......@@ -245,7 +245,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
0,
gl_data.mr,
VC_OFI(vc)->direct_addr,
MPID_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend);
wc->tag | MPID_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend);
MPIU_Assert(gl_data.persistent_req == rreq);
rreq->dev.user_count = 0;
......
......@@ -84,7 +84,7 @@
0, \
gl_data.mr, \
VC_OFI(vc)->direct_addr, \
MPID_MSG_CTS, \
match_bits | MPID_MSG_CTS, \
0, /* Exact tag match, no ignore bits */ \
&(REQ_OFI(cts_req)->ofi_context)),trecv); \
if (gl_data.api_set == API_SET_1){ \
......@@ -123,17 +123,17 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
uint64_t tag = 0;
BEGIN_FUNC(FCNAME);
switch (wc->tag & MPID_PROTOCOL_MASK) {
case MPID_MSG_CTS:
case MPID_MSG_CTS | MPID_MSG_RTS:
vc = REQ_OFI(sreq)->vc;
FI_RC_RETRY(fi_tsend(gl_data.endpoint,
REQ_OFI(sreq)->pack_buffer,
REQ_OFI(sreq)->pack_buffer_size,
gl_data.mr,
VC_OFI(vc)->direct_addr,
MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
wc->tag | MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
MPIDI_CH3U_Request_complete(sreq);
break;
case MPID_MSG_DATA:
case MPID_MSG_CTS | MPID_MSG_RTS | MPID_MSG_DATA:
if (REQ_OFI(sreq)->pack_buffer)
MPIU_Free(REQ_OFI(sreq)->pack_buffer);
......
......@@ -19,12 +19,12 @@
#define MPID_PGID_MASK (0xFFFFFFFF00000000ULL)
#define MPID_PSOURCE_MASK (0x000000000000FFFFULL)
#define MPID_PORT_NAME_MASK (0x000000000000FFFFULL)
#define MPID_SYNC_SEND (0x0000000010000000ULL)
#define MPID_SYNC_SEND_ACK (0x0000000020000000ULL)
#define MPID_MSG_RTS (0x0000000030000000ULL)
#define MPID_MSG_CTS (0x0000000040000000ULL)
#define MPID_MSG_DATA (0x0000000050000000ULL)
#define MPID_CONN_REQ (0x0000000060000000ULL)
#define MPID_SYNC_SEND (0x0000000080000000ULL)
#define MPID_SYNC_SEND_ACK (0x0000000090000000ULL)
#define MPID_MSG_RTS (0x0000000010000000ULL)
#define MPID_MSG_CTS (0x0000000020000000ULL)
#define MPID_MSG_DATA (0x0000000040000000ULL)
#define MPID_CONN_REQ (0x00000000A0000000ULL)
#define MPID_SOURCE_SHIFT (48)
#define MPID_CTXID_SHIFT (32)
#define MPID_PGID_SHIFT (32)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment