test/nvmf: leave modules alone if already loaded

There's no benefit of reloading the NIC drivers (unless the drivers
themselves are buggy), so save some time by skipping the rmmod of
drivers we are about to load.

Change-Id: I05c3fd06042a2e06333d0cac123d24e6cce65b23
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-07-08 16:20:36 -07:00 committed by Benjamin Walker
parent 176856c92b
commit b6af6bc6c1

View File

@ -48,21 +48,6 @@ function detect_mellanox_nics()
break;
done
# Uninstall/install driver to make a clean test environment
if lsmod | grep -q $mlx_ib_driver; then
rmmod $mlx_ib_driver
fi
if [ -n "$mlx_en_driver" ]; then
if lsmod | grep -q $mlx_en_driver; then
rmmod $mlx_en_driver
fi
fi
if lsmod | grep -q $mlx_core_driver; then
rmmod $mlx_core_driver
fi
modprobe $mlx_core_driver
modprobe $mlx_ib_driver
if [ -n "$mlx_en_driver" ]; then