Commit 5f544987 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji

Modify pkt/flag/function name "FLUSH_ACK" to "ACK".

Because we use the same ACK type packet/flag for the acknowledgement
of FLUSH/UNLOCK/DECR_AT_CNT packets, it is misleading if we call
the ACK packet/flag "FLUSH_ACK". This patch renames related packet,
flag and function name from "FLUSH_ACK" to "ACK".
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent c377f28d
......@@ -1890,8 +1890,8 @@ int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
MPIDI_msg_sz_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
MPIDI_msg_sz_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_FlushAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
MPIDI_msg_sz_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Ack( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
MPIDI_msg_sz_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_DecrAtCnt( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
MPIDI_msg_sz_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
......
......@@ -97,7 +97,7 @@ typedef enum {
MPIDI_CH3_PKT_LOCK_OP_ACK,
MPIDI_CH3_PKT_UNLOCK,
MPIDI_CH3_PKT_FLUSH,
MPIDI_CH3_PKT_FLUSH_ACK,
MPIDI_CH3_PKT_ACK, /* ACK packet for FLUSH, UNLOCK, DECR_AT_COUNTER */
MPIDI_CH3_PKT_DECR_AT_COUNTER,
/* RMA Packets end here */
MPIDI_CH3_PKT_FLOW_CNTL_UPDATE, /* FIXME: Unused */
......@@ -123,7 +123,7 @@ typedef enum {
MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK = 16,
MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER = 32,
MPIDI_CH3_PKT_FLAG_RMA_NOCHECK = 64,
MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK = 128,
MPIDI_CH3_PKT_FLAG_RMA_ACK = 128,
MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED = 256,
MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_QUEUED = 512,
MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_DISCARDED = 1024,
......@@ -459,7 +459,7 @@ MPIDI_CH3_PKT_DEFS
packets (PUT, GET, ACC, GACC, CAS, FOP), RMA operation \
response packets (GET_RESP, GACC_RESP, CAS_RESP, FOP_RESP), \
RMA control packets (LOCK, UNLOCK, FLUSH), and RMA control \
response packets (LOCK_ACK, LOCK_OP_ACK, FLUSH_ACK). */ \
response packets (LOCK_ACK, LOCK_OP_ACK, ACK). */ \
err_ = MPI_SUCCESS; \
switch((pkt_).type) { \
case (MPIDI_CH3_PKT_PUT): \
......@@ -485,8 +485,8 @@ MPIDI_CH3_PKT_DEFS
case (MPIDI_CH3_PKT_LOCK_OP_ACK): \
win_hdl_ = (pkt_).lock_op_ack.source_win_handle; \
break; \
case (MPIDI_CH3_PKT_FLUSH_ACK): \
win_hdl_ = (pkt_).flush_ack.source_win_handle; \
case (MPIDI_CH3_PKT_ACK): \
win_hdl_ = (pkt_).ack.source_win_handle; \
break; \
default: \
MPIU_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \
......@@ -798,12 +798,15 @@ typedef struct MPIDI_CH3_Pkt_lock_op_ack {
int target_rank;
} MPIDI_CH3_Pkt_lock_op_ack_t;
typedef struct MPIDI_CH3_Pkt_flush_ack {
/* This ACK packet is the acknowledgement
* for FLUSH, UNLOCK and DECR_AT_COUNTER
* packet */
typedef struct MPIDI_CH3_Pkt_ack {
MPIDI_CH3_Pkt_type_t type;
MPI_Win source_win_handle;
int target_rank;
MPIDI_CH3_Pkt_flags_t flags;
} MPIDI_CH3_Pkt_flush_ack_t;
} MPIDI_CH3_Pkt_ack_t;
typedef struct MPIDI_CH3_Pkt_decr_at_counter {
MPIDI_CH3_Pkt_type_t type;
......@@ -846,7 +849,7 @@ typedef union MPIDI_CH3_Pkt {
MPIDI_CH3_Pkt_lock_op_ack_t lock_op_ack;
MPIDI_CH3_Pkt_unlock_t unlock;
MPIDI_CH3_Pkt_flush_t flush;
MPIDI_CH3_Pkt_flush_ack_t flush_ack;
MPIDI_CH3_Pkt_ack_t ack;
MPIDI_CH3_Pkt_decr_at_counter_t decr_at_cnt;
MPIDI_CH3_Pkt_close_t close;
MPIDI_CH3_Pkt_cas_t cas;
......
......@@ -199,27 +199,27 @@ static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPID_Win * wi
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_Send_flush_ack_pkt
#define FUNCNAME MPIDI_CH3I_Send_ack_pkt
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_Send_flush_ack_pkt(MPIDI_VC_t * vc, MPID_Win * win_ptr,
MPI_Win source_win_handle)
static inline int MPIDI_CH3I_Send_ack_pkt(MPIDI_VC_t * vc, MPID_Win * win_ptr,
MPI_Win source_win_handle)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_flush_ack_t *flush_ack_pkt = &upkt.flush_ack;
MPIDI_CH3_Pkt_ack_t *ack_pkt = &upkt.ack;
MPID_Request *req;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_FLUSH_ACK_PKT);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_ACK_PKT);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SEND_FLUSH_ACK_PKT);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SEND_ACK_PKT);
MPIDI_Pkt_init(flush_ack_pkt, MPIDI_CH3_PKT_FLUSH_ACK);
flush_ack_pkt->source_win_handle = source_win_handle;
flush_ack_pkt->target_rank = win_ptr->comm_ptr->rank;
MPIDI_Pkt_init(ack_pkt, MPIDI_CH3_PKT_ACK);
ack_pkt->source_win_handle = source_win_handle;
ack_pkt->target_rank = win_ptr->comm_ptr->rank;
/* Because this is in a packet handler, it is already within a critical section */
/* MPIU_THREAD_CS_ENTER(CH3COMM,vc); */
mpi_errno = MPIDI_CH3_iStartMsg(vc, flush_ack_pkt, sizeof(*flush_ack_pkt), &req);
mpi_errno = MPIDI_CH3_iStartMsg(vc, ack_pkt, sizeof(*ack_pkt), &req);
/* MPIU_THREAD_CS_EXIT(CH3COMM,vc); */
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
......@@ -230,7 +230,7 @@ static inline int MPIDI_CH3I_Send_flush_ack_pkt(MPIDI_VC_t * vc, MPID_Win * win_
}
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_SEND_FLUSH_ACK_PKT);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_SEND_ACK_PKT);
return mpi_errno;
}
......@@ -788,10 +788,10 @@ static inline int acquire_local_lock(MPID_Win * win_ptr, int lock_type)
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Handle_flush_ack
#define FUNCNAME MPIDI_CH3I_RMA_Handle_ack
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_RMA_Handle_flush_ack(MPID_Win * win_ptr, int target_rank)
static inline int MPIDI_CH3I_RMA_Handle_ack(MPID_Win * win_ptr, int target_rank)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_RMA_Target_t *t;
......@@ -1013,7 +1013,7 @@ static inline int finish_op_on_target(MPID_Win * win_ptr, MPIDI_VC_t * vc,
flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) {
MPIDI_CH3_Pkt_flags_t pkt_flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
MPIU_Assert(source_win_handle != MPI_WIN_NULL);
mpi_errno = MPIDI_CH3I_Send_lock_op_ack_pkt(vc, win_ptr,
pkt_flags,
......@@ -1027,7 +1027,7 @@ static inline int finish_op_on_target(MPID_Win * win_ptr, MPIDI_VC_t * vc,
flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) {
/* If op is piggybacked with both LOCK and FLUSH,
* we only send LOCK ACK back, do not send FLUSH ACK. */
mpi_errno = MPIDI_CH3I_Send_flush_ack_pkt(vc, win_ptr, source_win_handle);
mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, source_win_handle);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1045,7 +1045,7 @@ static inline int finish_op_on_target(MPID_Win * win_ptr, MPIDI_VC_t * vc,
flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) {
/* If op is piggybacked with both LOCK and UNLOCK,
* we only send LOCK ACK back, do not send FLUSH (UNLOCK) ACK. */
mpi_errno = MPIDI_CH3I_Send_flush_ack_pkt(vc, win_ptr, source_win_handle);
mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, source_win_handle);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......
......@@ -595,8 +595,8 @@ int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *pktArray[],
MPIDI_CH3_PktHandler_Unlock;
pktArray[MPIDI_CH3_PKT_FLUSH] =
MPIDI_CH3_PktHandler_Flush;
pktArray[MPIDI_CH3_PKT_FLUSH_ACK] =
MPIDI_CH3_PktHandler_FlushAck;
pktArray[MPIDI_CH3_PKT_ACK] =
MPIDI_CH3_PktHandler_Ack;
pktArray[MPIDI_CH3_PKT_DECR_AT_COUNTER] =
MPIDI_CH3_PktHandler_DecrAtCnt;
pktArray[MPIDI_CH3_PKT_CAS_IMMED] =
......
......@@ -293,7 +293,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
/* check if data is contiguous and get true lb */
MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
......@@ -481,7 +481,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) fop_resp_pkt;
iov[0].MPID_IOV_LEN = sizeof(*fop_resp_pkt);
......@@ -845,7 +845,7 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
sreq->dev.segment_ptr = MPID_Segment_alloc();
MPIU_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
......@@ -1153,7 +1153,7 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
get_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
/* length of target data */
......@@ -1328,7 +1328,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
......@@ -1434,7 +1434,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_accum_resp_pkt;
......@@ -1510,7 +1510,7 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
if (fop_pkt->type == MPIDI_CH3_PKT_FOP) {
resp_req = MPID_Request_create();
......@@ -1665,7 +1665,7 @@ static inline int perform_cas_in_lock_queue(MPID_Win * win_ptr,
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
/* Copy old value into the response packet */
MPID_Datatype_get_size_macro(cas_pkt->datatype, len);
......
......@@ -21,7 +21,7 @@ MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_lock);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_lock_ack);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_unlock);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_flush);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_flush_ack);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_ack);
MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_decr_at_cnt);
void MPIDI_CH3_RMA_Init_pkthandler_pvars(void)
......@@ -155,14 +155,14 @@ void MPIDI_CH3_RMA_Init_pkthandler_pvars(void)
MPIR_T_PVAR_FLAG_READONLY,
"RMA", "RMA:PKTHANDLER for Flush (in seconds)");
/* rma_rmapkt_flush_ack */
/* rma_rmapkt_ack */
MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA,
MPI_DOUBLE,
rma_rmapkt_flush_ack,
rma_rmapkt_ack,
MPI_T_VERBOSITY_MPIDEV_DETAIL,
MPI_T_BIND_NO_OBJECT,
MPIR_T_PVAR_FLAG_READONLY,
"RMA", "RMA:PKTHANDLER for Flush-Ack (in seconds)");
"RMA", "RMA:PKTHANDLER for Ack (in seconds)");
/* rma_rmapkt_decr_at_cnt */
MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA,
......@@ -431,7 +431,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
get_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
/* length of target data */
......@@ -890,7 +890,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
/* NOTE: 'copy data + ACC' needs to be atomic */
......@@ -1184,7 +1184,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
/* Copy old value into the response packet */
MPID_Datatype_get_size_macro(cas_pkt->datatype, len);
......@@ -1279,8 +1279,8 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
if (cas_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
if (cas_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1353,7 +1353,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
/* NOTE: 'copy data + ACC' needs to be atomic */
......@@ -1528,8 +1528,8 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
if (fop_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
if (fop_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1615,8 +1615,8 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
if (get_accum_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
if (get_accum_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1811,8 +1811,8 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) {
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1952,9 +1952,9 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
if (flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
if (flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) {
MPIU_Assert(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED);
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
}
......@@ -1970,38 +1970,38 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
}
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_PktHandler_FlushAck
#define FUNCNAME MPIDI_CH3_PktHandler_Ack
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_FlushAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_flush_ack_t *flush_ack_pkt = &pkt->flush_ack;
MPIDI_CH3_Pkt_ack_t *ack_pkt = &pkt->ack;
MPID_Win *win_ptr = NULL;
int mpi_errno = MPI_SUCCESS;
int target_rank = flush_ack_pkt->target_rank;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_FLUSHACK);
int target_rank = ack_pkt->target_rank;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_FLUSHACK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACK);
MPIU_DBG_MSG(CH3_OTHER, VERBOSE, "received shared lock ops done pkt");
MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_flush_ack);
MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_ack);
*buflen = sizeof(MPIDI_CH3_Pkt_t);
MPID_Win_get_ptr(flush_ack_pkt->source_win_handle, win_ptr);
MPID_Win_get_ptr(ack_pkt->source_win_handle, win_ptr);
/* decrement ack_counter on target */
mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
*rreqp = NULL;
MPIDI_CH3_Progress_signal_completion();
MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_flush_ack);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_FLUSHACK);
MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_ack);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACK);
fn_exit:
return MPI_SUCCESS;
fn_fail:
......@@ -2035,7 +2035,7 @@ int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)),
*rreqp = NULL;
if (decr_at_cnt_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
mpi_errno = MPIDI_CH3I_Send_flush_ack_pkt(vc, win_ptr, decr_at_cnt_pkt->source_win_handle);
mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, decr_at_cnt_pkt->source_win_handle);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -2077,7 +2077,7 @@ int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
if (!(unlock_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK)) {
mpi_errno = MPIDI_CH3I_Send_flush_ack_pkt(vc, win_ptr, unlock_pkt->source_win_handle);
mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, unlock_pkt->source_win_handle);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
......@@ -2117,7 +2117,7 @@ int MPIDI_CH3_PktHandler_Flush(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPID_Win_get_ptr(flush_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3I_Send_flush_ack_pkt(vc, win_ptr, flush_pkt->source_win_handle);
mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, flush_pkt->source_win_handle);
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
......@@ -2200,10 +2200,10 @@ int MPIDI_CH3_PktPrint_Lock(FILE * fp, MPIDI_CH3_Pkt_t * pkt)
return MPI_SUCCESS;
}
int MPIDI_CH3_PktPrint_FlushAck(FILE * fp, MPIDI_CH3_Pkt_t * pkt)
int MPIDI_CH3_PktPrint_Ack(FILE * fp, MPIDI_CH3_Pkt_t * pkt)
{
MPIU_DBG_PRINTF((" type ......... MPIDI_CH3_PKT_FLUSH_ACK\n"));
MPIU_DBG_PRINTF((" source ....... 0x%08X\n", pkt->lock_accum_unlock.source_win_handle));
MPIU_DBG_PRINTF((" type ......... MPIDI_CH3_PKT_ACK\n"));
MPIU_DBG_PRINTF((" source ....... 0x%08X\n", pkt->ack.source_win_handle));
return MPI_SUCCESS;
}
......
......@@ -138,8 +138,8 @@ void MPIDI_DBG_Print_packet(MPIDI_CH3_Pkt_t * pkt)
case MPIDI_CH3_PKT_LOCK:
MPIDI_CH3_PktPrint_Lock(stdout, pkt);
break;
case MPIDI_CH3_PKT_FLUSH_ACK:
MPIDI_CH3_PktPrint_FlushAck(stdout, pkt);
case MPIDI_CH3_PKT_ACK:
MPIDI_CH3_PktPrint_Ack(stdout, pkt);
break;
case MPIDI_CH3_PKT_LOCK_ACK:
MPIDI_CH3_PktPrint_LockAck(stdout, pkt);
......@@ -310,10 +310,9 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
case MPIDI_CH3_PKT_LOCK:
MPIU_Snprintf(pktmsg, sizeof(pktmsg), "LOCK - %d", pkt->lock.target_win_handle);
break;
case MPIDI_CH3_PKT_FLUSH_ACK:
case MPIDI_CH3_PKT_ACK:
/* There is no rma_done packet type */
MPIU_Snprintf(pktmsg, sizeof(pktmsg),
"RMA_DONE - 0x%08X", pkt->flush_ack.source_win_handle);
MPIU_Snprintf(pktmsg, sizeof(pktmsg), "RMA_DONE - 0x%08X", pkt->ack.source_win_handle);
break;
case MPIDI_CH3_PKT_LOCK_ACK:
MPIU_Snprintf(pktmsg, sizeof(pktmsg), "LOCK_ACK - 0x%08X", pkt->lock_ack.source_win_handle);
......
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