Skip to content

Commit

Permalink
Merge pull request #5866 from iziemba/bugfix/rxm
Browse files Browse the repository at this point in the history
prov/rxm: Fix rxm_buffer_size param checking
  • Loading branch information
shefty authored Apr 23, 2020
2 parents 08e6365 + aed302e commit d9c1eb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prov/rxm/src/rxm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ static int rxm_init_info(void)
size_t param;

if (!fi_param_get_size_t(&rxm_prov, "buffer_size", &param)) {
if (param > sizeof(struct rxm_pkt)) {
rxm_eager_limit = param - sizeof(struct rxm_pkt);
} else {
if (param < sizeof(struct rxm_pkt) + sizeof(struct rxm_rndv_hdr)) {
FI_WARN(&rxm_prov, FI_LOG_CORE,
"Requested buffer size too small\n");
return -FI_EINVAL;
}

rxm_eager_limit = param - sizeof(struct rxm_pkt);
}
rxm_info.tx_attr->inject_size = rxm_eager_limit;
rxm_util_prov.info = &rxm_info;
Expand Down

0 comments on commit d9c1eb7

Please sign in to comment.