Handle Configuring only ConnectX3 card

Added a specification to the devices to be configured in this
plugin release to be ConnectX3

Change-Id: I276ed5ca6d8c8e0a33ed7492caef520436d4d785
This commit is contained in:
Rawan Herzallah 2016-03-09 09:46:31 +00:00
parent c9ffc114b2
commit 11973cfc63
3 changed files with 4 additions and 2 deletions

View File

@ -86,6 +86,7 @@ readonly USER_NUM_OF_VFS=`get_mlnx_param num_of_vfs`
readonly ISER=`get_mlnx_param iser`
readonly MAX_VFS=62
readonly MIN_VFS=1
readonly CX='ConnectX3'
readonly VXLAN_OFFLOADING=`get_mlnx_param vxlan_offloading`
readonly ROLES=`get_param roles`
readonly ROLE=`get_param role`

View File

@ -152,7 +152,7 @@ function burn_vfs_in_fw () {
# required for mlxconfig to discover mlnx devices
service openibd start &>/dev/null
service mst start &>/dev/null
devices=$(mst status | grep pciconf | awk '{print $1}')
devices=$(mst status -v | grep $CX| grep pciconf | awk '{print $2}')
for dev in $devices; do
logger_print debug "device=$dev"
mlxconfig -d $dev q | grep SRIOV | awk '{print $2}' | grep $SRIOV_ENABLED_FLAG &>/dev/null
@ -165,6 +165,7 @@ function burn_vfs_in_fw () {
fi
if [[ ! "$total_vfs" == "$current_num_of_vfs" ]] 2>/dev/null; then
logger_print debug "Current allowed number of VFs is ${current_num_of_vfs}, required number is ${total_vfs}"
logger_print debug "Trying mlxconfig -y -d ${dev} s SRIOV_EN=1 NUM_OF_VFS=${total_vfs}"
mlxconfig -y -d $dev s SRIOV_EN=1 NUM_OF_VFS=$total_vfs 2>&1 >/dev/null
if [ $? -ne 0 ]; then
logger_print error "Failed changing number of VFs in FW for HCA ${dev}"

View File

@ -5,7 +5,7 @@ name: mellanox-plugin
title: Mellanox Openstack features
# Plugin version
version: 2.0.34
version: 2.0.35
# Description
description: Enable features over Mellanox hardware