btl: remove des_remote/des_remote_count from the mca_btl_base_descriptor_t
structure This structure member was originally used to specify the remote segment for an RDMA operation. Since the new btl interface no longer uses desriptors for RDMA this member no longer has a purpose. In addition to removing these members the local segment information has been renamed to des_segments/des_segment_count.
Этот коммит содержится в:
родитель
5936411a07
Коммит
ec33374339
@ -36,10 +36,8 @@ mca_btl_active_message_callback_t mca_btl_base_active_message_trigger[MCA_BTL_TA
|
||||
|
||||
static void mca_btl_base_descriptor_constructor(mca_btl_base_descriptor_t* des)
|
||||
{
|
||||
des->des_local = NULL;
|
||||
des->des_local_count = 0;
|
||||
des->des_remote = NULL;
|
||||
des->des_remote_count = 0;
|
||||
des->des_segments = NULL;
|
||||
des->des_segment_count = 0;
|
||||
des->des_cbfunc = NULL;
|
||||
des->des_cbdata = NULL;
|
||||
des->des_flags = 0;
|
||||
|
@ -335,15 +335,13 @@ typedef struct mca_btl_base_segment_t mca_btl_base_segment_t;
|
||||
* operation along w/ a callback routine that is called on
|
||||
* completion of the request.
|
||||
* Note: receive callbacks will store the incomming data segments in
|
||||
* des_local
|
||||
* des_segments
|
||||
*/
|
||||
|
||||
struct mca_btl_base_descriptor_t {
|
||||
ompi_free_list_item_t super;
|
||||
mca_btl_base_segment_t *des_local; /**< local segments */
|
||||
size_t des_local_count; /**< number of local segments */
|
||||
mca_btl_base_segment_t *des_remote; /**< remote segments */
|
||||
size_t des_remote_count; /**< number of destination segments */
|
||||
mca_btl_base_segment_t *des_segments; /**< local segments */
|
||||
size_t des_segment_count; /**< number of local segments */
|
||||
mca_btl_base_completion_fn_t des_cbfunc; /**< local callback function */
|
||||
void* des_cbdata; /**< opaque callback data */
|
||||
void* des_context; /**< more opaque callback data */
|
||||
@ -468,7 +466,7 @@ typedef int (*mca_btl_base_component_progress_fn_t)(void);
|
||||
* completion function, this implies that all data payload in the
|
||||
* mca_btl_base_descriptor_t must be copied out within this callback or
|
||||
* forfeited back to the BTL.
|
||||
* Note also that descriptor segments (des_local) must be base
|
||||
* Note also that descriptor segments (des_segments) must be base
|
||||
* segments for all callbacks.
|
||||
*
|
||||
* @param[IN] btl BTL module
|
||||
|
@ -1982,7 +1982,7 @@ int mca_btl_openib_send(
|
||||
|
||||
if(openib_frag_type(des) == MCA_BTL_OPENIB_FRAG_COALESCED) {
|
||||
to_coalesced_frag(des)->hdr->tag = tag;
|
||||
to_coalesced_frag(des)->hdr->size = des->des_local->seg_len;
|
||||
to_coalesced_frag(des)->hdr->size = des->des_segments->seg_len;
|
||||
if(ep->nbo)
|
||||
BTL_OPENIB_HEADER_COALESCED_HTON(*to_coalesced_frag(des)->hdr);
|
||||
frag = to_coalesced_frag(des)->send_frag;
|
||||
@ -2005,7 +2005,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl,
|
||||
mca_btl_base_endpoint_t* ep,
|
||||
mca_btl_base_descriptor_t* descriptor)
|
||||
{
|
||||
mca_btl_openib_segment_t *src_seg = (mca_btl_openib_segment_t *) descriptor->des_local;
|
||||
mca_btl_openib_segment_t *src_seg = (mca_btl_openib_segment_t *) descriptor->des_segments;
|
||||
mca_btl_openib_segment_t *dst_seg = (mca_btl_openib_segment_t *) descriptor->des_remote;
|
||||
struct ibv_send_wr* bad_wr;
|
||||
mca_btl_openib_out_frag_t* frag = to_out_frag(descriptor);
|
||||
@ -2083,7 +2083,7 @@ int mca_btl_openib_get(mca_btl_base_module_t* btl,
|
||||
mca_btl_base_descriptor_t* descriptor)
|
||||
{
|
||||
mca_btl_openib_segment_t *src_seg = (mca_btl_openib_segment_t *) descriptor->des_remote;
|
||||
mca_btl_openib_segment_t *dst_seg = (mca_btl_openib_segment_t *) descriptor->des_local;
|
||||
mca_btl_openib_segment_t *dst_seg = (mca_btl_openib_segment_t *) descriptor->des_segments;
|
||||
struct ibv_send_wr* bad_wr;
|
||||
mca_btl_openib_get_frag_t* frag = to_get_frag(descriptor);
|
||||
int qp = descriptor->order;
|
||||
|
@ -471,7 +471,7 @@ static void btl_openib_control(mca_btl_base_module_t* btl,
|
||||
mca_btl_openib_header_coalesced_t *clsc_hdr =
|
||||
(mca_btl_openib_header_coalesced_t*)(ctl_hdr + 1);
|
||||
mca_btl_active_message_callback_t* reg;
|
||||
size_t len = des->des_local->seg_len - sizeof(*ctl_hdr);
|
||||
size_t len = des->des_segments->seg_len - sizeof(*ctl_hdr);
|
||||
|
||||
switch (ctl_hdr->type) {
|
||||
case MCA_BTL_OPENIB_CONTROL_CREDITS:
|
||||
@ -522,8 +522,8 @@ static void btl_openib_control(mca_btl_base_module_t* btl,
|
||||
|
||||
skip = (sizeof(*clsc_hdr) + clsc_hdr->alloc_size - pad);
|
||||
|
||||
tmp_des.des_local = &tmp_seg;
|
||||
tmp_des.des_local_count = 1;
|
||||
tmp_des.des_segments = &tmp_seg;
|
||||
tmp_des.des_segment_count = 1;
|
||||
tmp_seg.seg_addr.pval = clsc_hdr + 1;
|
||||
tmp_seg.seg_len = clsc_hdr->size;
|
||||
|
||||
@ -2925,7 +2925,7 @@ static int btl_openib_handle_incoming(mca_btl_openib_module_t *openib_btl,
|
||||
|
||||
/* advance the segment address past the header and subtract from the
|
||||
* length.*/
|
||||
des->des_local->seg_len = byte_len - sizeof(mca_btl_openib_header_t);
|
||||
des->des_segments->seg_len = byte_len - sizeof(mca_btl_openib_header_t);
|
||||
|
||||
if(OPAL_LIKELY(!(is_credit_msg = is_credit_message(frag)))) {
|
||||
/* call registered callback */
|
||||
@ -2960,7 +2960,7 @@ static int btl_openib_handle_incoming(mca_btl_openib_module_t *openib_btl,
|
||||
}
|
||||
} else {
|
||||
mca_btl_openib_rdma_credits_header_t *chdr =
|
||||
(mca_btl_openib_rdma_credits_header_t *) des->des_local->seg_addr.pval;
|
||||
(mca_btl_openib_rdma_credits_header_t *) des->des_segments->seg_addr.pval;
|
||||
if(ep->nbo) {
|
||||
BTL_OPENIB_RDMA_CREDITS_HEADER_NTOH(*chdr);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
|
||||
eager_limit = mca_btl_openib_component.eager_limit +
|
||||
sizeof(mca_btl_openib_header_coalesced_t) +
|
||||
sizeof(mca_btl_openib_control_header_t);
|
||||
if(des->des_local->seg_len + frag->coalesced_length <= eager_limit &&
|
||||
if(des->des_segments->seg_len + frag->coalesced_length <= eager_limit &&
|
||||
(des->des_flags & MCA_BTL_DES_FLAGS_PRIORITY)) {
|
||||
/* High priority frag. Try to send over eager RDMA */
|
||||
if(acquire_eager_rdma_send_credit(endpoint) == OPAL_SUCCESS)
|
||||
|
@ -153,8 +153,8 @@ void mca_btl_openib_handle_endpoint_error(mca_btl_openib_module_t *openib_btl,
|
||||
if (NULL != btlname) free(btlname);
|
||||
|
||||
/* Since we believe we have done a send, read or write, then the
|
||||
* des_local fields should have valid data. */
|
||||
assert(des->des_local != NULL);
|
||||
* des_segments fields should have valid data. */
|
||||
assert(des->des_segments != NULL);
|
||||
|
||||
/* If the endpoint is not yet in the MCA_BTL_IB_CLOSED state, then
|
||||
* change the status. Since this connection was mapped out in the
|
||||
|
@ -68,8 +68,8 @@ static void out_constructor(mca_btl_openib_out_frag_t *frag)
|
||||
{
|
||||
mca_btl_openib_frag_t *base_frag = to_base_frag(frag);
|
||||
|
||||
base_frag->base.des_local = &base_frag->segment.base;
|
||||
base_frag->base.des_local_count = 1;
|
||||
base_frag->base.des_segments = &base_frag->segment.base;
|
||||
base_frag->base.des_segment_count = 1;
|
||||
|
||||
frag->sr_desc.wr_id = (uint64_t)(uintptr_t)frag;
|
||||
frag->sr_desc.sg_list = &to_com_frag(frag)->sg_entry;
|
||||
@ -83,8 +83,8 @@ static void in_constructor(mca_btl_openib_in_frag_t *frag)
|
||||
{
|
||||
mca_btl_openib_frag_t *base_frag = to_base_frag(frag);
|
||||
|
||||
base_frag->base.des_local = &base_frag->segment.base;
|
||||
base_frag->base.des_local_count = 1;
|
||||
base_frag->base.des_segments = &base_frag->segment.base;
|
||||
base_frag->base.des_segment_count = 1;
|
||||
}
|
||||
|
||||
static void send_constructor(mca_btl_openib_send_frag_t *frag)
|
||||
@ -154,8 +154,8 @@ static void coalesced_constructor(mca_btl_openib_coalesced_frag_t *frag)
|
||||
|
||||
base_frag->type = MCA_BTL_OPENIB_FRAG_COALESCED;
|
||||
|
||||
base_frag->base.des_local = &base_frag->segment.base;
|
||||
base_frag->base.des_local_count = 1;
|
||||
base_frag->base.des_segments = &base_frag->segment.base;
|
||||
base_frag->base.des_segment_count = 1;
|
||||
}
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
|
@ -183,7 +183,7 @@ mca_btl_portals4_alloc(struct mca_btl_base_module_t* btl_base,
|
||||
}
|
||||
|
||||
frag->md_h = PTL_INVALID_HANDLE;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags | MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
|
||||
@ -272,7 +272,7 @@ mca_btl_portals4_prepare_src(struct mca_btl_base_module_t* btl_base,
|
||||
}
|
||||
|
||||
frag->segments[0].base.seg_len = max_data + reserve;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
} else {
|
||||
/* no need to pack - rdma operation out of user's buffer */
|
||||
@ -302,7 +302,7 @@ mca_btl_portals4_prepare_src(struct mca_btl_base_module_t* btl_base,
|
||||
frag->segments[0].base.seg_len = max_data;
|
||||
frag->segments[0].base.seg_addr.pval = iov.iov_base;
|
||||
frag->segments[0].key = OPAL_THREAD_ADD64(&(portals4_btl->portals_rdma_key), 1);
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
/* either a put or get. figure out which later */
|
||||
OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output,
|
||||
@ -348,7 +348,7 @@ mca_btl_portals4_prepare_src(struct mca_btl_base_module_t* btl_base,
|
||||
(void *)frag, frag->me_h, me.start, me.length,
|
||||
me.match_id.phys.nid, me.match_id.phys.pid, me.match_bits));
|
||||
}
|
||||
frag->base.des_local = &frag->segments[0].base;
|
||||
frag->base.des_segments = &frag->segments[0].base;
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_flags = flags | MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
|
||||
@ -390,8 +390,8 @@ mca_btl_portals4_prepare_dst(struct mca_btl_base_module_t* btl_base,
|
||||
frag->segments[0].key = OPAL_THREAD_ADD64(&(portals4_btl->portals_rdma_key), 1);
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_local = &frag->segments[0].base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segments[0].base;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags | MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
frag->md_h = PTL_INVALID_HANDLE;
|
||||
|
@ -725,11 +725,11 @@ mca_btl_portals4_component_progress(void)
|
||||
frag = ev.user_ptr;
|
||||
tag = (unsigned char) (ev.hdr_data);
|
||||
|
||||
frag->base.des_local = seg;
|
||||
frag->base.des_segments = seg;
|
||||
seg[0].seg_addr.pval = ev.start;
|
||||
seg[0].seg_len = ev.mlength;
|
||||
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
reg = mca_btl_base_active_message_trigger + tag;
|
||||
OPAL_OUTPUT_VERBOSE((50, opal_btl_base_framework.framework_output,
|
||||
|
@ -26,8 +26,8 @@ static void
|
||||
mca_btl_portals4_frag_common_send_constructor(mca_btl_portals4_frag_t* frag)
|
||||
{
|
||||
frag->base.des_flags = 0;
|
||||
frag->base.des_local = &frag->segments[0].base;
|
||||
frag->base.des_local_count = 2;
|
||||
frag->base.des_segments = &frag->segments[0].base;
|
||||
frag->base.des_segment_count = 2;
|
||||
|
||||
frag->segments[0].base.seg_addr.pval = frag + 1;
|
||||
frag->segments[0].base.seg_len = frag->size;
|
||||
|
@ -329,11 +329,11 @@ static int mca_btl_scif_progress_recvs (mca_btl_base_endpoint_t *ep)
|
||||
* the fragment without introducing another copy here. this
|
||||
* limitation has not appeared to cause any performance
|
||||
* problems. */
|
||||
frag.base.des_local_count = 1;
|
||||
frag.base.des_segment_count = 1;
|
||||
frag.segments[0].base.seg_len = hdr->size;
|
||||
frag.segments[0].base.seg_addr.pval = (void *) (hdr + 1);
|
||||
|
||||
frag.base.des_local = &frag.segments[0].base;
|
||||
frag.base.des_segments = &frag.segments[0].base;
|
||||
|
||||
/* call the registered callback function */
|
||||
reg->cbfunc(&mca_btl_scif_module.super, hdr->tag, &frag.base, reg->cbdata);
|
||||
|
@ -29,7 +29,7 @@ int mca_btl_scif_get (struct mca_btl_base_module_t *btl,
|
||||
struct mca_btl_base_endpoint_t *endpoint,
|
||||
struct mca_btl_base_descriptor_t *des) {
|
||||
mca_btl_scif_segment_t *src = (mca_btl_scif_segment_t *) des->des_remote;
|
||||
mca_btl_scif_segment_t *dst = (mca_btl_scif_segment_t *) des->des_local;
|
||||
mca_btl_scif_segment_t *dst = (mca_btl_scif_segment_t *) des->des_segments;
|
||||
size_t len = lmin (src->base.seg_len, dst->base.seg_len);
|
||||
int rc, mark, flags = 0;
|
||||
off_t roffset, loffset;
|
||||
|
@ -163,8 +163,8 @@ mca_btl_scif_alloc(struct mca_btl_base_module_t *btl,
|
||||
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.order = order;
|
||||
frag->base.des_local = &frag->segments[0].base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segments[0].base;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
frag->segments[0].base.seg_len = size;
|
||||
|
||||
@ -241,8 +241,8 @@ static inline mca_btl_base_descriptor_t *mca_btl_scif_prepare_dma (struct mca_bt
|
||||
frag->base.order = order;
|
||||
frag->base.des_flags = flags;
|
||||
|
||||
frag->base.des_local = &frag->segments->base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segments->base;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
return &frag->base;
|
||||
}
|
||||
@ -289,7 +289,7 @@ mca_btl_scif_prepare_src_send (struct mca_btl_base_module_t *btl,
|
||||
frag->segments[0].base.seg_len = reserve;
|
||||
frag->segments[1].base.seg_addr.pval = data_ptr;
|
||||
frag->segments[1].base.seg_len = *size;
|
||||
frag->base.des_local_count = 2;
|
||||
frag->base.des_segment_count = 2;
|
||||
} else {
|
||||
/* buffered send */
|
||||
(void) MCA_BTL_SCIF_FRAG_ALLOC_EAGER(endpoint, frag);
|
||||
@ -310,10 +310,10 @@ mca_btl_scif_prepare_src_send (struct mca_btl_base_module_t *btl,
|
||||
}
|
||||
|
||||
frag->segments[0].base.seg_len = reserve + *size;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
}
|
||||
|
||||
frag->base.des_local = &frag->segments->base;
|
||||
frag->base.des_segments = &frag->segments->base;
|
||||
frag->base.order = order;
|
||||
frag->base.des_flags = flags;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
int mca_btl_scif_put (struct mca_btl_base_module_t *btl,
|
||||
struct mca_btl_base_endpoint_t *endpoint,
|
||||
struct mca_btl_base_descriptor_t *des) {
|
||||
mca_btl_scif_segment_t *src = (mca_btl_scif_segment_t *) des->des_local;
|
||||
mca_btl_scif_segment_t *src = (mca_btl_scif_segment_t *) des->des_segments;
|
||||
mca_btl_scif_segment_t *dst = (mca_btl_scif_segment_t *) des->des_remote;
|
||||
size_t len = lmin (src->base.seg_len, dst->base.seg_len);
|
||||
int rc, mark, flags = 0;
|
||||
|
@ -138,8 +138,8 @@ mca_btl_base_descriptor_t* mca_btl_self_alloc(
|
||||
|
||||
frag->segment.seg_len = size;
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.des_local = &(frag->segment);
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &(frag->segment);
|
||||
frag->base.des_segment_count = 1;
|
||||
return (mca_btl_base_descriptor_t*)frag;
|
||||
}
|
||||
|
||||
@ -154,10 +154,8 @@ int mca_btl_self_free( struct mca_btl_base_module_t* btl,
|
||||
{
|
||||
mca_btl_self_frag_t* frag = (mca_btl_self_frag_t*)des;
|
||||
|
||||
frag->base.des_local = NULL;
|
||||
frag->base.des_local_count = 0;
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_segments = NULL;
|
||||
frag->base.des_segment_count = 0;
|
||||
|
||||
if(frag->size == mca_btl_self.btl_eager_limit) {
|
||||
MCA_BTL_SELF_FRAG_RETURN_EAGER(frag);
|
||||
@ -234,8 +232,8 @@ mca_btl_self_prepare_src( struct mca_btl_base_module_t* btl,
|
||||
*size = max_data;
|
||||
}
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.des_local = &frag->segment;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment;
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
return &frag->base;
|
||||
}
|
||||
@ -255,12 +253,6 @@ int mca_btl_self_send( struct mca_btl_base_module_t* btl,
|
||||
mca_btl_active_message_callback_t* reg;
|
||||
int btl_ownership = (des->des_flags & MCA_BTL_DES_FLAGS_BTL_OWNERSHIP);
|
||||
|
||||
/**
|
||||
* We have to set the dst before the call to the function and reset them
|
||||
* after.
|
||||
*/
|
||||
des->des_remote = des->des_local;
|
||||
des->des_remote_count = des->des_local_count;
|
||||
/* upcall */
|
||||
reg = mca_btl_base_active_message_trigger + tag;
|
||||
reg->cbfunc( btl, tag, des, reg->cbdata );
|
||||
|
@ -23,8 +23,8 @@ static inline void mca_btl_self_frag_constructor(mca_btl_self_frag_t* frag)
|
||||
{
|
||||
frag->segment.seg_addr.pval = frag+1;
|
||||
frag->segment.seg_len = (uint32_t)frag->size;
|
||||
frag->base.des_local = &frag->segment;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = 0;
|
||||
}
|
||||
|
||||
|
@ -828,11 +828,9 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src(
|
||||
}
|
||||
#endif /* OPAL_BTL_SM_HAVE_KNEM || OPAL_BTL_SM_HAVE_CMA */
|
||||
|
||||
frag->base.des_local = &(frag->segment.base);
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &(frag->segment.base);
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_flags = flags;
|
||||
*size = max_data;
|
||||
return &frag->base;
|
||||
@ -1022,11 +1020,9 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_dst(
|
||||
frag->segment.base.seg_len = *size;
|
||||
opal_convertor_get_current_pointer( convertor, &ptr );
|
||||
frag->segment.base.seg_addr.lval = (uint64_t)(uintptr_t) ptr;
|
||||
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_local = (mca_btl_base_segment_t*)&frag->segment;
|
||||
frag->base.des_local_count = 1;
|
||||
|
||||
frag->base.des_segments = (mca_btl_base_segment_t*)&frag->segment;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags;
|
||||
return &frag->base;
|
||||
}
|
||||
@ -1045,7 +1041,7 @@ int mca_btl_sm_get_sync(struct mca_btl_base_module_t* btl,
|
||||
int btl_ownership;
|
||||
mca_btl_sm_frag_t* frag = (mca_btl_sm_frag_t*)des;
|
||||
mca_btl_sm_segment_t *src = (mca_btl_sm_segment_t*)des->des_remote;
|
||||
mca_btl_sm_segment_t *dst = (mca_btl_sm_segment_t*)des->des_local;
|
||||
mca_btl_sm_segment_t *dst = (mca_btl_sm_segment_t*)des->des_segments;
|
||||
#if OPAL_BTL_SM_HAVE_KNEM
|
||||
mca_btl_sm_t* sm_btl = (mca_btl_sm_t*) btl;
|
||||
if (OPAL_LIKELY(mca_btl_sm_component.use_knem)) {
|
||||
@ -1152,7 +1148,7 @@ int mca_btl_sm_get_async(struct mca_btl_base_module_t* btl,
|
||||
mca_btl_sm_t* sm_btl = (mca_btl_sm_t*) btl;
|
||||
mca_btl_sm_frag_t* frag = (mca_btl_sm_frag_t*)des;
|
||||
mca_btl_sm_segment_t *src = (mca_btl_sm_segment_t*)des->des_remote;
|
||||
mca_btl_sm_segment_t *dst = (mca_btl_sm_segment_t*)des->des_local;
|
||||
mca_btl_sm_segment_t *dst = (mca_btl_sm_segment_t*)des->des_segments;
|
||||
struct knem_cmd_inline_copy icopy;
|
||||
struct knem_cmd_param_iovec recv_iovec;
|
||||
|
||||
|
@ -1089,8 +1089,8 @@ int mca_btl_sm_component_progress(void)
|
||||
reg = mca_btl_base_active_message_trigger + hdr->tag;
|
||||
seg.seg_addr.pval = ((char *)hdr) + sizeof(mca_btl_sm_hdr_t);
|
||||
seg.seg_len = hdr->len;
|
||||
Frag.base.des_local_count = 1;
|
||||
Frag.base.des_local = &seg;
|
||||
Frag.base.des_segment_count = 1;
|
||||
Frag.base.des_segments = &seg;
|
||||
reg->cbfunc(&mca_btl_sm.super, hdr->tag, &(Frag.base),
|
||||
reg->cbdata);
|
||||
/* return the fragment */
|
||||
|
@ -31,8 +31,8 @@ static inline void mca_btl_sm_frag_common_constructor(mca_btl_sm_frag_t* frag)
|
||||
frag->hdr->my_smp_rank = mca_btl_sm_component.my_smp_rank;
|
||||
}
|
||||
frag->segment.base.seg_len = frag->size;
|
||||
frag->base.des_local = &frag->segment.base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment.base;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = 0;
|
||||
}
|
||||
|
||||
|
@ -832,8 +832,8 @@ struct mca_btl_base_descriptor_t* mca_btl_smcuda_prepare_src(
|
||||
|
||||
}
|
||||
#endif /* OPAL_CUDA_SUPPORT */
|
||||
frag->base.des_local = &(frag->segment.base);
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &(frag->segment.base);
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
@ -1045,8 +1045,8 @@ struct mca_btl_base_descriptor_t* mca_btl_smcuda_prepare_dst(
|
||||
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_local = &frag->segment.base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment.base;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags;
|
||||
return &frag->base;
|
||||
}
|
||||
@ -1059,7 +1059,7 @@ int mca_btl_smcuda_get_cuda(struct mca_btl_base_module_t* btl,
|
||||
struct mca_btl_base_descriptor_t* descriptor)
|
||||
{
|
||||
mca_btl_smcuda_segment_t *src_seg = (mca_btl_smcuda_segment_t *) descriptor->des_remote;
|
||||
mca_btl_smcuda_segment_t *dst_seg = (mca_btl_smcuda_segment_t *) descriptor->des_local;
|
||||
mca_btl_smcuda_segment_t *dst_seg = (mca_btl_smcuda_segment_t *) descriptor->des_segments;
|
||||
mca_mpool_common_cuda_reg_t rget_reg;
|
||||
mca_mpool_common_cuda_reg_t *reg_ptr = &rget_reg;
|
||||
int btl_ownership;
|
||||
|
@ -691,7 +691,7 @@ static void btl_smcuda_control(mca_btl_base_module_t* btl,
|
||||
struct mca_btl_base_endpoint_t *endpoint;
|
||||
mca_btl_smcuda_t *smcuda_btl = (mca_btl_smcuda_t *)btl;
|
||||
mca_btl_smcuda_frag_t *frag = (mca_btl_smcuda_frag_t *)des;
|
||||
mca_btl_base_segment_t* segments = des->des_local;
|
||||
mca_btl_base_segment_t* segments = des->des_segments;
|
||||
|
||||
/* Use the rank of the peer that sent the data to get to the endpoint
|
||||
* structure. This is needed for PML callback. */
|
||||
@ -1065,8 +1065,8 @@ int mca_btl_smcuda_component_progress(void)
|
||||
reg = mca_btl_base_active_message_trigger + hdr->tag;
|
||||
seg.seg_addr.pval = ((char *)hdr) + sizeof(mca_btl_smcuda_hdr_t);
|
||||
seg.seg_len = hdr->len;
|
||||
Frag.base.des_local_count = 1;
|
||||
Frag.base.des_local = &seg;
|
||||
Frag.base.des_segment_count = 1;
|
||||
Frag.base.des_segments = &seg;
|
||||
#if OPAL_CUDA_SUPPORT
|
||||
Frag.hdr = hdr; /* needed for peer rank in control messages */
|
||||
#endif /* OPAL_CUDA_SUPPORT */
|
||||
|
@ -32,8 +32,8 @@ static inline void mca_btl_smcuda_frag_common_constructor(mca_btl_smcuda_frag_t*
|
||||
frag->hdr->my_smp_rank = mca_btl_smcuda_component.my_smp_rank;
|
||||
}
|
||||
frag->segment.base.seg_len = frag->size;
|
||||
frag->base.des_local = &frag->segment.base;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment.base;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = 0;
|
||||
#if OPAL_CUDA_SUPPORT
|
||||
frag->registration = NULL;
|
||||
|
@ -170,8 +170,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_alloc(
|
||||
frag->segments[0].seg_len = size;
|
||||
frag->segments[0].seg_addr.pval = frag+1;
|
||||
|
||||
frag->base.des_local = frag->segments;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = frag->segments;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
frag->btl = (mca_btl_tcp_module_t*)btl;
|
||||
@ -238,7 +238,7 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src(
|
||||
frag->segments[0].seg_addr.pval = (frag + 1);
|
||||
frag->segments[0].seg_len = reserve;
|
||||
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segment_count = 1;
|
||||
if(opal_convertor_need_buffers(convertor)) {
|
||||
|
||||
if (max_data + reserve > frag->size) {
|
||||
@ -268,10 +268,10 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src(
|
||||
|
||||
frag->segments[1].seg_addr.pval = iov.iov_base;
|
||||
frag->segments[1].seg_len = max_data;
|
||||
frag->base.des_local_count = 2;
|
||||
frag->base.des_segment_count = 2;
|
||||
}
|
||||
|
||||
frag->base.des_local = frag->segments;
|
||||
frag->base.des_segments = frag->segments;
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_flags = flags;
|
||||
@ -320,8 +320,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_dst(
|
||||
|
||||
frag->base.des_remote = NULL;
|
||||
frag->base.des_remote_count = 0;
|
||||
frag->base.des_local = frag->segments;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = frag->segments;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.order = MCA_BTL_NO_ORDER;
|
||||
return &frag->base;
|
||||
@ -355,7 +355,7 @@ int mca_btl_tcp_send( struct mca_btl_base_module_t* btl,
|
||||
frag->iov[0].iov_base = (IOVBASE_TYPE*)&frag->hdr;
|
||||
frag->iov[0].iov_len = sizeof(frag->hdr);
|
||||
frag->hdr.size = 0;
|
||||
for( i = 0; i < (int)frag->base.des_local_count; i++) {
|
||||
for( i = 0; i < (int)frag->base.des_segment_count; i++) {
|
||||
frag->hdr.size += frag->segments[i].seg_len;
|
||||
frag->iov[i+1].iov_len = frag->segments[i].seg_len;
|
||||
frag->iov[i+1].iov_base = (IOVBASE_TYPE*)frag->segments[i].seg_addr.pval;
|
||||
@ -396,7 +396,7 @@ int mca_btl_tcp_put( mca_btl_base_module_t* btl,
|
||||
frag->iov[0].iov_len = sizeof(frag->hdr);
|
||||
frag->iov[1].iov_base = (IOVBASE_TYPE*)frag->base.des_remote;
|
||||
frag->iov[1].iov_len = frag->base.des_remote_count * sizeof(mca_btl_base_segment_t);
|
||||
for( i = 0; i < (int)frag->base.des_local_count; i++ ) {
|
||||
for( i = 0; i < (int)frag->base.des_segment_count; i++ ) {
|
||||
frag->hdr.size += frag->segments[i].seg_len;
|
||||
frag->iov[i+2].iov_len = frag->segments[i].seg_len;
|
||||
frag->iov[i+2].iov_base = (IOVBASE_TYPE*)frag->segments[i].seg_addr.pval;
|
||||
|
@ -118,8 +118,8 @@ do { \
|
||||
frag->iov_ptr = frag->iov; \
|
||||
frag->base.des_remote = NULL; \
|
||||
frag->base.des_remote_count = 0; \
|
||||
frag->base.des_local = frag->segments; \
|
||||
frag->base.des_local_count = 1; \
|
||||
frag->base.des_segments = frag->segments; \
|
||||
frag->base.des_segment_count = 1; \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
@ -270,8 +270,8 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src(
|
||||
frag->segment.seg_len = max_data + reserve;
|
||||
}
|
||||
|
||||
frag->base.des_local = &frag->segment;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = 0;
|
||||
return &frag->base;
|
||||
}
|
||||
@ -311,8 +311,8 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_dst(
|
||||
frag->segment.seg_len = *size;
|
||||
opal_convertor_get_current_pointer( convertor, (void**)&(frag->segment.seg_addr.pval) );
|
||||
|
||||
frag->base.des_local = &frag->segment;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segment;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.des_flags = 0;
|
||||
return &frag->base;
|
||||
}
|
||||
|
@ -90,16 +90,16 @@ static void mca_btl_ugni_callback_eager_get (struct mca_btl_base_module_t *btl,
|
||||
|
||||
BTL_VERBOSE(("eager get for rem_ctx %p complete", frag->hdr.eager.ctx))
|
||||
|
||||
tmp.base.des_local = segs;
|
||||
tmp.base.des_segments = segs;
|
||||
if (hdr_len) {
|
||||
tmp.base.des_local_count = 2;
|
||||
tmp.base.des_segment_count = 2;
|
||||
|
||||
segs[0].seg_addr.pval = frag->hdr.eager_ex.pml_header;
|
||||
segs[0].seg_len = hdr_len;
|
||||
segs[1].seg_addr.pval = local_address;
|
||||
segs[1].seg_len = payload_len;
|
||||
} else {
|
||||
tmp.base.des_local_count = 1;
|
||||
tmp.base.des_segment_count = 1;
|
||||
|
||||
segs[0].seg_addr.pval = local_address;
|
||||
segs[0].seg_len = payload_len;
|
||||
|
@ -236,8 +236,8 @@ mca_btl_ugni_alloc(struct mca_btl_base_module_t *btl,
|
||||
|
||||
frag->base.des_flags = flags;
|
||||
frag->base.order = order;
|
||||
frag->base.des_local = &frag->segments[1];
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segments[1];
|
||||
frag->base.des_segment_count = 1;
|
||||
|
||||
frag->segments[0].seg_addr.pval = NULL;
|
||||
frag->segments[0].seg_len = 0;
|
||||
|
@ -41,8 +41,8 @@ mca_btl_ugni_prepare_src_send_nodata (struct mca_btl_base_module_t *btl,
|
||||
frag->segments[1].seg_addr.pval = NULL;
|
||||
frag->segments[1].seg_len = 0;
|
||||
|
||||
frag->base.des_local = &frag->segments;
|
||||
frag->base.des_local_count = 1;
|
||||
frag->base.des_segments = &frag->segments;
|
||||
frag->base.des_segment_count = 1;
|
||||
frag->base.order = order;
|
||||
frag->base.des_flags = flags;
|
||||
|
||||
@ -98,8 +98,8 @@ mca_btl_ugni_prepare_src_send_inplace (struct mca_btl_base_module_t *btl,
|
||||
frag->segments[1].seg_addr.pval = data_ptr;
|
||||
frag->segments[1].seg_len = *size;
|
||||
|
||||
frag->base.des_local = &frag->segments;
|
||||
frag->base.des_local_count = 2;
|
||||
frag->base.des_segments = &frag->segments;
|
||||
frag->base.des_segment_count = 2;
|
||||
frag->base.order = order;
|
||||
frag->base.des_flags = flags;
|
||||
|
||||
@ -159,8 +159,8 @@ mca_btl_ugni_prepare_src_send_buffered (struct mca_btl_base_module_t *btl,
|
||||
frag->segments[1].seg_addr.pval = frag->base.super.ptr;
|
||||
frag->segments[1].seg_len = *size;
|
||||
|
||||
frag->base.des_local = &frag->segments;
|
||||
frag->base.des_local_count = 2;
|
||||
frag->base.des_segments = &frag->segments;
|
||||
frag->base.des_segment_count = 2;
|
||||
frag->base.order = order;
|
||||
frag->base.des_flags = flags;
|
||||
|
||||
|
@ -116,8 +116,8 @@ int mca_btl_ugni_smsg_process (mca_btl_base_endpoint_t *ep)
|
||||
BTL_VERBOSE(("received smsg fragment. hdr = {len = %u, tag = %d}", len, tag));
|
||||
|
||||
reg = mca_btl_base_active_message_trigger + tag;
|
||||
frag.base.des_local = &seg;
|
||||
frag.base.des_local_count = 1;
|
||||
frag.base.des_segments = &seg;
|
||||
frag.base.des_segment_count = 1;
|
||||
|
||||
seg.seg_addr.pval = (void *)((uintptr_t)data_ptr + sizeof (mca_btl_ugni_send_frag_hdr_t));
|
||||
seg.seg_len = len;
|
||||
|
@ -139,8 +139,8 @@ recv_seg_constructor(
|
||||
bseg->us_sg_entry[0].addr = (unsigned long) seg->rs_protocol_header;
|
||||
|
||||
/* initialize mca descriptor */
|
||||
seg->rs_desc.des_local = &seg->rs_segment;
|
||||
seg->rs_desc.des_local_count = 1;
|
||||
seg->rs_desc.des_segments = &seg->rs_segment;
|
||||
seg->rs_desc.des_segment_count = 1;
|
||||
seg->rs_desc.des_remote = NULL;
|
||||
seg->rs_desc.des_remote_count = 0;
|
||||
|
||||
@ -161,10 +161,10 @@ send_frag_constructor(opal_btl_usnic_send_frag_t *frag)
|
||||
|
||||
/* Fill in source descriptor */
|
||||
desc = &frag->sf_base.uf_base;
|
||||
desc->des_local = frag->sf_base.uf_local_seg;
|
||||
desc->des_segments = frag->sf_base.uf_local_seg;
|
||||
frag->sf_base.uf_local_seg[0].seg_len = 0;
|
||||
frag->sf_base.uf_local_seg[1].seg_len = 0;
|
||||
desc->des_local_count = 2;
|
||||
desc->des_segment_count = 2;
|
||||
desc->des_remote = frag->sf_base.uf_remote_seg;
|
||||
desc->des_remote_count = 0;
|
||||
|
||||
@ -182,7 +182,7 @@ send_frag_destructor(opal_btl_usnic_send_frag_t *frag)
|
||||
|
||||
/* make sure nobody twiddled these values after the constructor */
|
||||
desc = &frag->sf_base.uf_base;
|
||||
assert(desc->des_local == frag->sf_base.uf_local_seg);
|
||||
assert(desc->des_segments == frag->sf_base.uf_local_seg);
|
||||
assert(0 == frag->sf_base.uf_local_seg[0].seg_len);
|
||||
/* PML may change desc->des_remote to point elsewhere, cannot assert that it
|
||||
* still points to our embedded segment */
|
||||
@ -245,15 +245,15 @@ put_dest_frag_constructor(opal_btl_usnic_put_dest_frag_t *pfrag)
|
||||
pfrag->uf_type = OPAL_BTL_USNIC_FRAG_PUT_DEST;
|
||||
|
||||
/* point dest to our utility segment */
|
||||
pfrag->uf_base.des_local = pfrag->uf_remote_seg;
|
||||
pfrag->uf_base.des_local_count = 1;
|
||||
pfrag->uf_base.des_segments = pfrag->uf_remote_seg;
|
||||
pfrag->uf_base.des_segment_count = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
put_dest_frag_destructor(opal_btl_usnic_put_dest_frag_t *pfrag)
|
||||
{
|
||||
assert(pfrag->uf_base.des_local == pfrag->uf_remote_seg);
|
||||
assert(1 == pfrag->uf_base.des_local_count);
|
||||
assert(pfrag->uf_base.des_segments == pfrag->uf_remote_seg);
|
||||
assert(1 == pfrag->uf_base.des_segment_count);
|
||||
}
|
||||
|
||||
OBJ_CLASS_INSTANCE(opal_btl_usnic_segment_t,
|
||||
|
@ -297,7 +297,7 @@ typedef struct opal_btl_usnic_large_send_frag_t {
|
||||
/* Shortcut member macros. Access uf_src_seg array instead of the descriptor's
|
||||
* des_src ptr to save a deref. */
|
||||
#define lsf_des_src lsf_base.sf_base.uf_local_seg
|
||||
#define lsf_des_local_cnt lsf_base.sf_base.uf_base.des_local_count
|
||||
#define lsf_des_segments_cnt lsf_base.sf_base.uf_base.des_segment_count
|
||||
|
||||
/**
|
||||
* small send fragment
|
||||
@ -471,7 +471,7 @@ opal_btl_usnic_frag_return(
|
||||
}
|
||||
lfrag->lsf_pack_on_the_fly = false;
|
||||
|
||||
if (2 == lfrag->lsf_des_local_cnt &&
|
||||
if (2 == lfrag->lsf_des_segments_cnt &&
|
||||
NULL == lfrag->lsf_des_src[1].seg_addr.pval) {
|
||||
opal_convertor_cleanup(&lfrag->lsf_base.sf_convertor);
|
||||
}
|
||||
|
@ -71,11 +71,11 @@ static inline void compute_sf_size(opal_btl_usnic_send_frag_t *sfrag)
|
||||
|
||||
frag = &sfrag->sf_base;
|
||||
|
||||
assert(frag->uf_base.des_local_count > 0);
|
||||
assert(frag->uf_base.des_local_count <= 2);
|
||||
assert(frag->uf_base.des_segment_count > 0);
|
||||
assert(frag->uf_base.des_segment_count <= 2);
|
||||
|
||||
/* belt and suspenders: second len should be zero if only one SGE */
|
||||
assert(2 == frag->uf_base.des_local_count || 0 == frag->uf_local_seg[1].seg_len);
|
||||
assert(2 == frag->uf_base.des_segment_count || 0 == frag->uf_local_seg[1].seg_len);
|
||||
|
||||
sfrag->sf_size = 0;
|
||||
sfrag->sf_size += frag->uf_local_seg[0].seg_len;
|
||||
@ -544,7 +544,7 @@ usnic_alloc(struct mca_btl_base_module_t* btl,
|
||||
}
|
||||
|
||||
/* pointer to buffer for caller */
|
||||
frag->sf_base.uf_base.des_local[0].seg_addr.pval = lfrag->lsf_buffer;
|
||||
frag->sf_base.uf_base.des_segments[0].seg_addr.pval = lfrag->lsf_buffer;
|
||||
|
||||
MSGDEBUG1_OUT("usnic_alloc: packing frag %p on the fly", (void *)frag);
|
||||
lfrag->lsf_pack_on_the_fly = true;
|
||||
@ -562,8 +562,8 @@ usnic_alloc(struct mca_btl_base_module_t* btl,
|
||||
/* set up descriptor */
|
||||
desc = &frag->sf_base.uf_base;
|
||||
desc->des_flags = flags;
|
||||
desc->des_local[0].seg_len = size;
|
||||
desc->des_local_count = 1;
|
||||
desc->des_segments[0].seg_len = size;
|
||||
desc->des_segment_count = 1;
|
||||
|
||||
return desc;
|
||||
}
|
||||
@ -669,13 +669,13 @@ prepare_src_small(
|
||||
*size,
|
||||
size);
|
||||
payload_len = reserve + *size;
|
||||
frag->sf_base.uf_base.des_local_count = 1;
|
||||
frag->sf_base.uf_base.des_segment_count = 1;
|
||||
/* PML will copy header into beginning of segment */
|
||||
frag->sf_base.uf_local_seg[0].seg_len = payload_len;
|
||||
} else {
|
||||
opal_convertor_get_current_pointer(convertor,
|
||||
&sfrag->ssf_base.sf_base.uf_local_seg[1].seg_addr.pval);
|
||||
frag->sf_base.uf_base.des_local_count = 2;
|
||||
frag->sf_base.uf_base.des_segment_count = 2;
|
||||
frag->sf_base.uf_local_seg[0].seg_len = reserve;
|
||||
frag->sf_base.uf_local_seg[1].seg_len = *size;
|
||||
}
|
||||
@ -893,7 +893,7 @@ prepare_src_large(
|
||||
|
||||
/* The header location goes in SG[0], payload in SG[1]. If we are using a
|
||||
* convertor then SG[1].seg_len is accurate but seg_addr is NULL. */
|
||||
frag->sf_base.uf_base.des_local_count = 2;
|
||||
frag->sf_base.uf_base.des_segment_count = 2;
|
||||
|
||||
/* stash header location, PML will write here */
|
||||
frag->sf_base.uf_local_seg[0].seg_addr.pval = &lfrag->lsf_ompi_header;
|
||||
@ -1009,10 +1009,10 @@ usnic_prepare_src(
|
||||
{
|
||||
unsigned i;
|
||||
mca_btl_base_descriptor_t *desc = &frag->sf_base.uf_base;
|
||||
for (i=0; i<desc->des_local_count; ++i) {
|
||||
for (i=0; i<desc->des_segment_count; ++i) {
|
||||
opal_output(0, " %d: ptr:%p len:%d\n", i,
|
||||
(void *)desc->des_local[i].seg_addr.pval,
|
||||
desc->des_local[i].seg_len);
|
||||
(void *)desc->des_segments[i].seg_addr.pval,
|
||||
desc->des_segments[i].seg_len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1087,10 +1087,10 @@ usnic_put(
|
||||
(int)frag->sf_size);
|
||||
#if MSGDEBUG1
|
||||
{ unsigned i;
|
||||
for (i=0; i<desc->des_local_count; ++i) {
|
||||
for (i=0; i<desc->des_segment_count; ++i) {
|
||||
opal_output(0, " %d: ptr:%p len:%d%s\n", i,
|
||||
desc->des_local[i].seg_addr.pval,
|
||||
desc->des_local[i].seg_len,
|
||||
desc->des_segments[i].seg_addr.pval,
|
||||
desc->des_segments[i].seg_len,
|
||||
(i==0)?" (source)":"");
|
||||
}
|
||||
for (i=0; i<desc->des_remote_count; ++i) {
|
||||
@ -1525,10 +1525,10 @@ usnic_send(
|
||||
#if MSGDEBUG1
|
||||
{ unsigned i;
|
||||
opal_output(0, " descriptor->des_flags=0x%x\n", descriptor->des_flags);
|
||||
for (i=0; i<descriptor->des_local_count; ++i) {
|
||||
for (i=0; i<descriptor->des_segment_count; ++i) {
|
||||
opal_output(0, " %d: ptr:%p len:%d\n", i,
|
||||
descriptor->des_local[i].seg_addr.pval,
|
||||
descriptor->des_local[i].seg_len);
|
||||
descriptor->des_segments[i].seg_addr.pval,
|
||||
descriptor->des_segments[i].seg_len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1557,7 +1557,7 @@ usnic_send(
|
||||
sizeof(opal_btl_usnic_btl_header_t) +
|
||||
frag->sf_base.uf_local_seg[0].seg_len;
|
||||
|
||||
if (frag->sf_base.uf_base.des_local_count > 1) {
|
||||
if (frag->sf_base.uf_base.des_segment_count > 1) {
|
||||
|
||||
/* only briefly, we will set it back to 1 before release */
|
||||
sseg->ss_send_desc.num_sge = 2;
|
||||
@ -1580,13 +1580,13 @@ usnic_send(
|
||||
opal_btl_usnic_endpoint_send_segment(module, sseg);
|
||||
|
||||
/* make a copy of the data for retrans */
|
||||
if (frag->sf_base.uf_base.des_local_count > 1) {
|
||||
if (frag->sf_base.uf_base.des_segment_count > 1) {
|
||||
memcpy(((char *)(intptr_t)frag->sf_base.uf_local_seg[0].seg_addr.lval +
|
||||
frag->sf_base.uf_local_seg[0].seg_len),
|
||||
frag->sf_base.uf_local_seg[1].seg_addr.pval,
|
||||
frag->sf_base.uf_local_seg[1].seg_len);
|
||||
/* update 1st segment length */
|
||||
frag->sf_base.uf_base.des_local_count = 1;
|
||||
frag->sf_base.uf_base.des_segment_count = 1;
|
||||
frag->sf_base.uf_local_seg[0].seg_len +=
|
||||
frag->sf_base.uf_local_seg[1].seg_len;
|
||||
/* set up VERBS SG list */
|
||||
|
@ -284,8 +284,8 @@ void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module,
|
||||
|
||||
segment.seg_addr.pval = fip->rfi_data;
|
||||
segment.seg_len = fip->rfi_frag_size;
|
||||
desc.des_local = &segment;
|
||||
desc.des_local_count = 1;
|
||||
desc.des_segments = &segment;
|
||||
desc.des_segment_count = 1;
|
||||
|
||||
/* only up to PML if this was not a put */
|
||||
if (chunk_hdr->ch_hdr.put_addr == NULL) {
|
||||
@ -293,8 +293,8 @@ void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module,
|
||||
/* Pass this segment up to the PML */
|
||||
#if MSGDEBUG2
|
||||
opal_output(0, "large recv complete, pass up %p, %u bytes, tag=%d\n",
|
||||
desc.des_local->seg_addr.pval,
|
||||
(unsigned)desc.des_local->seg_len,
|
||||
desc.des_segments->seg_addr.pval,
|
||||
(unsigned)desc.des_segments->seg_len,
|
||||
(int)chunk_hdr->ch_hdr.tag);
|
||||
#endif
|
||||
reg = mca_btl_base_active_message_trigger +
|
||||
|
@ -131,7 +131,7 @@ opal_btl_usnic_finish_put_or_send(
|
||||
* We already packed via the convertor if necessary, so we only need to
|
||||
* handle the simple memcpy case here.
|
||||
*/
|
||||
if (frag->sf_base.uf_base.des_local_count > 1) {
|
||||
if (frag->sf_base.uf_base.des_segment_count > 1) {
|
||||
/* no convertor */
|
||||
assert(NULL != frag->sf_base.uf_local_seg[1].seg_addr.pval);
|
||||
|
||||
@ -141,7 +141,7 @@ opal_btl_usnic_finish_put_or_send(
|
||||
frag->sf_base.uf_local_seg[1].seg_len);
|
||||
|
||||
/* update 1st segment length */
|
||||
frag->sf_base.uf_base.des_local_count = 1;
|
||||
frag->sf_base.uf_base.des_segment_count = 1;
|
||||
frag->sf_base.uf_local_seg[0].seg_len +=
|
||||
frag->sf_base.uf_local_seg[1].seg_len;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ static inline bool mca_btl_vader_check_fboxes (void)
|
||||
/* the 0xff tag indicates we should skip the rest of the buffer */
|
||||
if (OPAL_LIKELY((0xfe & hdr.data.tag) != 0xfe)) {
|
||||
mca_btl_base_segment_t segment;
|
||||
mca_btl_base_descriptor_t desc = {.des_local = &segment, .des_local_count = 1};
|
||||
mca_btl_base_descriptor_t desc = {.des_segments = &segment, .des_segment_count = 1};
|
||||
const mca_btl_active_message_callback_t *reg =
|
||||
mca_btl_base_active_message_trigger + hdr.data.tag;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user