Skip to content

Commit

Permalink
Merge pull request #1046 from oalbrigt/ethmonitor-intel-omnipath-support
Browse files Browse the repository at this point in the history
ethmonitor: add intel omnipath support
  • Loading branch information
krig authored Nov 28, 2017
2 parents a43ffba + 8aeb3cd commit 3a18076
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions heartbeat/ethmonitor
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ infiniband_status()
device="${OCF_RESKEY_infiniband_device}:${OCF_RESKEY_infiniband_port}"
fi

ibstatus ${device} | grep -q ACTIVE
case "${OCF_RESKEY_infiniband_device}" in
*ib*|*mlx*) ibstatus ${device} | grep -q ACTIVE ;;
*hfi*) opainfo | grep -q Active ;;
esac
}

if_init() {
Expand Down Expand Up @@ -291,8 +294,11 @@ if_init() {
fi

if [ -n "$OCF_RESKEY_infiniband_device" ]; then
#ibstatus is required if an infiniband_device is provided
check_binary ibstatus
#ibstatus or opainfo is required if an infiniband_device is provided
case "${OCF_RESKEY_infiniband_device}" in
*ib*|*mlx*) check_binary ibstatus ;;
*hfi*) check_binary opainfo ;;
esac
fi
return $OCF_SUCCESS
}
Expand Down

0 comments on commit 3a18076

Please sign in to comment.