standardize behavior of btl_alloc, if the size is larger than the max send
size, btl_alloc returns NULL. This commit was SVN r9114.
Этот коммит содержится в:
родитель
0d098c9d57
Коммит
e58b758031
@ -163,14 +163,12 @@ mca_btl_base_descriptor_t* mca_btl_gm_alloc(
|
||||
|
||||
if(size <= btl->btl_eager_limit) {
|
||||
MCA_BTL_GM_FRAG_ALLOC_EAGER(gm_btl, frag, rc);
|
||||
frag->segment.seg_len =
|
||||
size <= btl->btl_eager_limit ?
|
||||
size : btl->btl_eager_limit ;
|
||||
} else {
|
||||
frag->segment.seg_len = size;
|
||||
} else if(size <= btl->btl_max_send_size) {
|
||||
MCA_BTL_GM_FRAG_ALLOC_MAX(gm_btl, frag, rc);
|
||||
frag->segment.seg_len =
|
||||
size <= btl->btl_max_send_size ?
|
||||
size : btl->btl_max_send_size ;
|
||||
frag->segment.seg_len = size;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->base.des_src = &frag->segment;
|
||||
|
@ -196,15 +196,13 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_alloc(
|
||||
if(size <= mca_btl_mvapi_component.eager_limit){
|
||||
MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc);
|
||||
if(NULL == frag) return NULL;
|
||||
frag->segment.seg_len =
|
||||
size <= mca_btl_mvapi_component.eager_limit ?
|
||||
size: mca_btl_mvapi_component.eager_limit ;
|
||||
} else {
|
||||
frag->segment.seg_len = size;
|
||||
} else if (size <= mca_btl_mvapi_component.max_send_size) {
|
||||
MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc);
|
||||
if(NULL == frag) return NULL;
|
||||
frag->segment.seg_len =
|
||||
size <= mca_btl_mvapi_component.max_send_size ?
|
||||
size: mca_btl_mvapi_component.max_send_size ;
|
||||
frag->segment.seg_len = size;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->segment.seg_len = size <= mvapi_btl->super.btl_eager_limit ? size : mvapi_btl->super.btl_eager_limit;
|
||||
|
@ -192,14 +192,12 @@ mca_btl_base_descriptor_t* mca_btl_openib_alloc(
|
||||
|
||||
if(size <= mca_btl_openib_component.eager_limit){
|
||||
MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc);
|
||||
frag->segment.seg_len =
|
||||
size <= mca_btl_openib_component.eager_limit ?
|
||||
size: mca_btl_openib_component.eager_limit ;
|
||||
} else {
|
||||
frag->segment.seg_len = size;
|
||||
} else if(size <= mca_btl_openib_component.max_send_size) {
|
||||
MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc);
|
||||
frag->segment.seg_len =
|
||||
size <= mca_btl_openib_component.max_send_size ?
|
||||
size: mca_btl_openib_component.max_send_size ;
|
||||
frag->segment.seg_len = size;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->segment.seg_len = size <= openib_btl->super.btl_eager_limit ? size : openib_btl->super.btl_eager_limit;
|
||||
|
@ -153,12 +153,13 @@ extern mca_btl_base_descriptor_t* mca_btl_self_alloc(
|
||||
if(size <= mca_btl_self.btl_eager_limit) {
|
||||
MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag,rc);
|
||||
frag->segment.seg_len = size;
|
||||
} else {
|
||||
} else if (size <= btl->btl_max_send_size) {
|
||||
MCA_BTL_SELF_FRAG_ALLOC_SEND(frag,rc);
|
||||
frag->segment.seg_len =
|
||||
size <= btl->btl_max_send_size ?
|
||||
size : btl->btl_max_send_size;
|
||||
frag->segment.seg_len = size;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->base.des_flags = 0;
|
||||
return (mca_btl_base_descriptor_t*)frag;
|
||||
}
|
||||
|
@ -176,12 +176,13 @@ mca_btl_base_descriptor_t* mca_btl_tcp_alloc(
|
||||
if(size <= btl->btl_eager_limit) {
|
||||
MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag, rc);
|
||||
frag->segments[0].seg_len = size;
|
||||
} else {
|
||||
} else if (size <= btl->btl_max_send_size) {
|
||||
MCA_BTL_TCP_FRAG_ALLOC_MAX(frag, rc);
|
||||
frag->segments[0].seg_len =
|
||||
size <= btl->btl_max_send_size ?
|
||||
size : btl->btl_max_send_size ;
|
||||
frag->segments[0].seg_len = size;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->segments[0].seg_addr.pval = frag+1;
|
||||
|
||||
frag->base.des_src = frag->segments;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user