diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-08-14 21:46:00 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-08-14 21:46:00 +0200 |
commit | 4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d (patch) | |
tree | 55582b12657e5546e85ed9fcb2e3f05944e037a4 /ip | |
parent | cf72481e866a12fc7138fdc1cf0836426c514498 (diff) | |
download | mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.gz mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.bz2 mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.xz mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.zip |
Fix reloading, add bonding sample
Diffstat (limited to 'ip')
-rw-r--r-- | ip/functions.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ip/functions.sh b/ip/functions.sh index 3f45f63..f912a6e 100644 --- a/ip/functions.sh +++ b/ip/functions.sh @@ -1,3 +1,23 @@ +function mlxreload { + rmmod ib_ucm + rmmod rdma_ucm + rmmod ib_uverbs + modprobe ib_uverbs disable_raw_qp_enforcement=1 + modprobe ib_ucm + modprobe rdma_ucm + modprobe mlx4_core fast_drop=1 log_num_mgm_entry_size=-1 + modprobe mlx4_en +} + +function mlxload { + reload=0 + + param=$(cat /sys/module/mlx4_core/parameters/log_num_mgm_entry_size) + [ $param -ne -1 ] && reload=1 + + [ $reload -eq 1 ] && mlxreload +} + function portset { pci=$1 mode=$2 @@ -7,6 +27,8 @@ function portset { function mlxconf { mode=$1 + mlxload + pci=$(./connectx_port_config -s | grep PCI | grep -Po "[\da-f]{4}:[\da-f]{2}:[\da-f]{2}\.[\da-f]") for dev in $pci; do echo "Configuring: $dev" |