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:
parent
c9ffc114b2
commit
11973cfc63
|
@ -86,6 +86,7 @@ readonly USER_NUM_OF_VFS=`get_mlnx_param num_of_vfs`
|
||||||
readonly ISER=`get_mlnx_param iser`
|
readonly ISER=`get_mlnx_param iser`
|
||||||
readonly MAX_VFS=62
|
readonly MAX_VFS=62
|
||||||
readonly MIN_VFS=1
|
readonly MIN_VFS=1
|
||||||
|
readonly CX='ConnectX3'
|
||||||
readonly VXLAN_OFFLOADING=`get_mlnx_param vxlan_offloading`
|
readonly VXLAN_OFFLOADING=`get_mlnx_param vxlan_offloading`
|
||||||
readonly ROLES=`get_param roles`
|
readonly ROLES=`get_param roles`
|
||||||
readonly ROLE=`get_param role`
|
readonly ROLE=`get_param role`
|
||||||
|
|
|
@ -152,7 +152,7 @@ function burn_vfs_in_fw () {
|
||||||
# required for mlxconfig to discover mlnx devices
|
# required for mlxconfig to discover mlnx devices
|
||||||
service openibd start &>/dev/null
|
service openibd start &>/dev/null
|
||||||
service mst 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
|
for dev in $devices; do
|
||||||
logger_print debug "device=$dev"
|
logger_print debug "device=$dev"
|
||||||
mlxconfig -d $dev q | grep SRIOV | awk '{print $2}' | grep $SRIOV_ENABLED_FLAG &>/dev/null
|
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
|
fi
|
||||||
if [[ ! "$total_vfs" == "$current_num_of_vfs" ]] 2>/dev/null; then
|
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 "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
|
mlxconfig -y -d $dev s SRIOV_EN=1 NUM_OF_VFS=$total_vfs 2>&1 >/dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
logger_print error "Failed changing number of VFs in FW for HCA ${dev}"
|
logger_print error "Failed changing number of VFs in FW for HCA ${dev}"
|
||||||
|
|
|
@ -5,7 +5,7 @@ name: mellanox-plugin
|
||||||
title: Mellanox Openstack features
|
title: Mellanox Openstack features
|
||||||
|
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: 2.0.34
|
version: 2.0.35
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
description: Enable features over Mellanox hardware
|
description: Enable features over Mellanox hardware
|
||||||
|
|
Loading…
Reference in New Issue