Add byte swapping macro for failover control message per jsquyres review.
This commit was SVN r24266.
Этот коммит содержится в:
родитель
e75b86d3ab
Коммит
f22f76a6ff
@ -513,7 +513,7 @@ static void btl_openib_control(mca_btl_base_module_t* btl,
|
||||
#if OMPI_OPENIB_FAILOVER_ENABLED
|
||||
case MCA_BTL_OPENIB_CONTROL_EP_BROKEN:
|
||||
case MCA_BTL_OPENIB_CONTROL_EP_EAGER_RDMA_ERROR:
|
||||
btl_openib_handle_failover_control_messages(ctl_hdr);
|
||||
btl_openib_handle_failover_control_messages(ctl_hdr, ep);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -280,13 +280,18 @@ void mca_btl_openib_handle_btl_error(mca_btl_openib_module_t* openib_btl) {
|
||||
* we are doing.
|
||||
* @param ctl_hdr Pointer control header that was received
|
||||
*/
|
||||
void btl_openib_handle_failover_control_messages(mca_btl_openib_control_header_t *ctl_hdr)
|
||||
void btl_openib_handle_failover_control_messages(mca_btl_openib_control_header_t *ctl_hdr,
|
||||
mca_btl_openib_endpoint_t* ep)
|
||||
{
|
||||
mca_btl_openib_broken_connection_header_t *bc_hdr =
|
||||
(mca_btl_openib_broken_connection_header_t*)ctl_hdr;
|
||||
int i;
|
||||
int found = false;
|
||||
|
||||
if(ep->nbo) {
|
||||
BTL_OPENIB_BROKEN_CONNECTION_HEADER_NTOH((*bc_hdr));
|
||||
}
|
||||
|
||||
opal_output_verbose(30, mca_btl_openib_component.verbose_failover,
|
||||
"IB: Control message received from %d: lid=%d,subnet=0x%" PRIx64 "",
|
||||
bc_hdr->vpid, bc_hdr->lid, bc_hdr->subnet_id);
|
||||
@ -679,12 +684,9 @@ static void mca_btl_openib_endpoint_notify(mca_btl_base_endpoint_t* endpoint, ui
|
||||
bc_hdr->vpid = ORTE_PROC_MY_NAME->vpid;
|
||||
bc_hdr->index = index;
|
||||
|
||||
#if 0
|
||||
/* FIX ME: Need to add byte swapping macros */
|
||||
if(newep->nbo) {
|
||||
BTL_OPENIB_EAGER_RDMA_CONTROL_HEADER_HTON((*bc_hdr));
|
||||
BTL_OPENIB_BROKEN_CONNECTION_HEADER_HTON((*bc_hdr));
|
||||
}
|
||||
#endif
|
||||
rc = mca_btl_openib_endpoint_send(newep, frag);
|
||||
if (OMPI_SUCCESS == rc ||OMPI_ERR_RESOURCE_BUSY == rc) {
|
||||
return;
|
||||
|
@ -23,7 +23,8 @@ void mca_btl_openib_handle_endpoint_error(mca_btl_openib_module_t *openib_btl,
|
||||
ompi_proc_t* remote_proc,
|
||||
mca_btl_openib_endpoint_t* endpoint);
|
||||
void mca_btl_openib_handle_btl_error(mca_btl_openib_module_t* openib_btl);
|
||||
void btl_openib_handle_failover_control_messages(mca_btl_openib_control_header_t *ctl_hdr);
|
||||
void btl_openib_handle_failover_control_messages(mca_btl_openib_control_header_t *ctl_hdr,
|
||||
mca_btl_openib_endpoint_t* ep);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
@ -178,6 +178,22 @@ struct mca_btl_openib_broken_connection_header_t {
|
||||
uint32_t index; /* for eager RDMA only */
|
||||
};
|
||||
typedef struct mca_btl_openib_broken_connection_header_t mca_btl_openib_broken_connection_header_t;
|
||||
|
||||
#define BTL_OPENIB_BROKEN_CONNECTION_HEADER_HTON(h) \
|
||||
do { \
|
||||
(h).lid = htonl((h).lid); \
|
||||
(h).subnet_id = hton64((h).subnet_id); \
|
||||
(h).vpid = htonl((h).vpid); \
|
||||
(h).index = htonl((h).index); \
|
||||
} while (0)
|
||||
|
||||
#define BTL_OPENIB_BROKEN_CONNECTION_HEADER_NTOH(h) \
|
||||
do { \
|
||||
(h).lid = ntohl((h).lid); \
|
||||
(h).subnet_id = ntoh64((h).subnet_id); \
|
||||
(h).vpid = ntohl((h).vpid); \
|
||||
(h).index = ntohl((h).index); \
|
||||
} while (0)
|
||||
#endif
|
||||
enum mca_btl_openib_frag_type_t {
|
||||
MCA_BTL_OPENIB_FRAG_RECV,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user