Commit b6af6bc6 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Benjamin Walker
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 176856c9
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -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