diff options
| author | Suren A. Chilingaryan <csa@suren.me> | 2018-08-15 18:59:14 +0200 |
|---|---|---|
| committer | Suren A. Chilingaryan <csa@suren.me> | 2018-08-15 18:59:14 +0200 |
| commit | 088438fe6643dce4195e52452fe995c2608b0a48 (patch) | |
| tree | 8b6df730d9f7c3bd683bcfdd38c6f4433a2339c4 /ip/functions.sh | |
| parent | 4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d (diff) | |
| download | mlx-088438fe6643dce4195e52452fe995c2608b0a48.tar.gz mlx-088438fe6643dce4195e52452fe995c2608b0a48.tar.bz2 mlx-088438fe6643dce4195e52452fe995c2608b0a48.tar.xz mlx-088438fe6643dce4195e52452fe995c2608b0a48.zip | |
p2p setup
Diffstat (limited to 'ip/functions.sh')
| -rw-r--r-- | ip/functions.sh | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/ip/functions.sh b/ip/functions.sh deleted file mode 100644 index f912a6e..0000000 --- a/ip/functions.sh +++ /dev/null @@ -1,51 +0,0 @@ -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 - ./connectx_port_config -d "$pci" -c "$mode,$mode" &> /dev/null -} - -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" - portset $dev $mode - done -} - -function ipset { - int="$1" - ip="$2" - - if [ -n "$ip" ]; then - ip link set "$int" up - ip addr flush "$int" - ip addr show dev "$int" | grep "$ip" || ip addr add "$ip/24" dev "$int" - else - ip addr flush "$int" - ip link set "$int" down - fi -} |
