Created
April 14, 2016 19:33
-
-
Save avirambh/08909fe72a3b9cbf397da3b123a753d1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Create a file in /etc/infiniband/vfs with content of the form: | |
| ib0 3 | |
| enp5s0 12 | |
| # and after modules start in openibd: | |
| if [ -f /etc/infiniband/vfs ]; then | |
| while read -r line | |
| do | |
| arrline=($line) | |
| iface=`echo ${arrline[0]}` | |
| num_vfs=`echo ${arrline[1]}` | |
| echo $num_vfs > /sys/class/net/$iface/device/sriov_numvfs | |
| done < "/etc/infiniband/vfs" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment