Skip to content

Commit

Permalink
complex: Fix check for local MR mode and also pass correct access flags
Browse files Browse the repository at this point in the history
Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
(cherry picked from commit bd9dc8f)
  • Loading branch information
Arun C Ilango committed Dec 18, 2017
1 parent e944ac0 commit 749f5f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions complex/ft_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ static int ft_setup_xcontrol_bufs(struct ft_xcontrol *ctrl)
memset(ctrl->buf, 0, size);
}

if ((fabric_info->mode & FI_LOCAL_MR) && !ctrl->mr) {
ret = fi_mr_reg(domain, ctrl->buf, size, FI_RECV | FI_SEND,
if ((fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) && !ctrl->mr) {
ret = fi_mr_reg(domain, ctrl->buf, size,
ft_info_to_mr_access(fabric_info),
0, 0, 0, &ctrl->mr, NULL);
if (ret) {
FT_PRINTERR("fi_mr_reg", ret);
Expand Down Expand Up @@ -238,7 +239,7 @@ static int ft_setup_atomic_control(struct ft_atomic_control *ctrl)
memset(ctrl->orig_buf, 0, size);
}

if (fabric_info->mode & FI_LOCAL_MR) {
if (fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) {
access = FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE;
if (!ctrl->res_mr) {
ret = fi_mr_reg(domain, ctrl->res_buf, size, access,
Expand Down

0 comments on commit 749f5f2

Please sign in to comment.