This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# params | |
# - device name (e.g. mlx5_0) | |
# - number of virtual functions (e.g. 10) | |
configure_dev () { | |
local num_of_vfs="$2" | |
local devid=$(echo $1 | cut -d_ -f2) | |
local max_id="0" | |
local num_vfs_path="/sys/class/infiniband/$1/device/mlx5_num_vfs" |