1
1

standardize behavior of btl_alloc, if the size is larger than the max send

size, btl_alloc returns NULL. 

This commit was SVN r9114.
Этот коммит содержится в:
Galen Shipman 2006-02-22 17:37:59 +00:00
родитель 0d098c9d57
Коммит e58b758031
5 изменённых файлов: 25 добавлений и 29 удалений

Просмотреть файл

@ -163,14 +163,12 @@ mca_btl_base_descriptor_t* mca_btl_gm_alloc(
if(size <= btl->btl_eager_limit) { if(size <= btl->btl_eager_limit) {
MCA_BTL_GM_FRAG_ALLOC_EAGER(gm_btl, frag, rc); MCA_BTL_GM_FRAG_ALLOC_EAGER(gm_btl, frag, rc);
frag->segment.seg_len = frag->segment.seg_len = size;
size <= btl->btl_eager_limit ? } else if(size <= btl->btl_max_send_size) {
size : btl->btl_eager_limit ;
} else {
MCA_BTL_GM_FRAG_ALLOC_MAX(gm_btl, frag, rc); MCA_BTL_GM_FRAG_ALLOC_MAX(gm_btl, frag, rc);
frag->segment.seg_len = frag->segment.seg_len = size;
size <= btl->btl_max_send_size ? } else {
size : btl->btl_max_send_size ; return NULL;
} }
frag->base.des_src = &frag->segment; 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){ if(size <= mca_btl_mvapi_component.eager_limit){
MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc); MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc);
if(NULL == frag) return NULL; if(NULL == frag) return NULL;
frag->segment.seg_len = frag->segment.seg_len = size;
size <= mca_btl_mvapi_component.eager_limit ? } else if (size <= mca_btl_mvapi_component.max_send_size) {
size: mca_btl_mvapi_component.eager_limit ;
} else {
MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc); MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc);
if(NULL == frag) return NULL; if(NULL == frag) return NULL;
frag->segment.seg_len = frag->segment.seg_len = size;
size <= mca_btl_mvapi_component.max_send_size ? } else {
size: mca_btl_mvapi_component.max_send_size ; return NULL;
} }
frag->segment.seg_len = size <= mvapi_btl->super.btl_eager_limit ? size : mvapi_btl->super.btl_eager_limit; 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){ if(size <= mca_btl_openib_component.eager_limit){
MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc); MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc);
frag->segment.seg_len = frag->segment.seg_len = size;
size <= mca_btl_openib_component.eager_limit ? } else if(size <= mca_btl_openib_component.max_send_size) {
size: mca_btl_openib_component.eager_limit ;
} else {
MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc); MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc);
frag->segment.seg_len = frag->segment.seg_len = size;
size <= mca_btl_openib_component.max_send_size ? } else {
size: mca_btl_openib_component.max_send_size ; return NULL;
} }
frag->segment.seg_len = size <= openib_btl->super.btl_eager_limit ? size : openib_btl->super.btl_eager_limit; 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) { if(size <= mca_btl_self.btl_eager_limit) {
MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag,rc); MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag,rc);
frag->segment.seg_len = size; frag->segment.seg_len = size;
} else { } else if (size <= btl->btl_max_send_size) {
MCA_BTL_SELF_FRAG_ALLOC_SEND(frag,rc); MCA_BTL_SELF_FRAG_ALLOC_SEND(frag,rc);
frag->segment.seg_len = frag->segment.seg_len = size;
size <= btl->btl_max_send_size ? } else {
size : btl->btl_max_send_size; return NULL;
} }
frag->base.des_flags = 0; frag->base.des_flags = 0;
return (mca_btl_base_descriptor_t*)frag; 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) { if(size <= btl->btl_eager_limit) {
MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag, rc); MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag, rc);
frag->segments[0].seg_len = size; frag->segments[0].seg_len = size;
} else { } else if (size <= btl->btl_max_send_size) {
MCA_BTL_TCP_FRAG_ALLOC_MAX(frag, rc); MCA_BTL_TCP_FRAG_ALLOC_MAX(frag, rc);
frag->segments[0].seg_len = frag->segments[0].seg_len = size;
size <= btl->btl_max_send_size ? } else {
size : btl->btl_max_send_size ; return NULL;
} }
frag->segments[0].seg_addr.pval = frag+1; frag->segments[0].seg_addr.pval = frag+1;
frag->base.des_src = frag->segments; frag->base.des_src = frag->segments;