test/nvmf: Only use Soft-RoCE when RNICs aren't available

Change-Id: I1a48d873afb7579327607182042b2474d8f191cf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Seth Howell 2018-08-06 13:27:52 -07:00 committed by Changpeng Liu
parent 25a89b2ac3
commit ab9451bcd0

View File

@ -48,6 +48,7 @@ function detect_soft_roce_nics()
function detect_mellanox_nics() function detect_mellanox_nics()
{ {
if ! hash lspci; then if ! hash lspci; then
echo "No NICs"
return 0 return 0
fi fi
@ -57,6 +58,7 @@ function detect_mellanox_nics()
mlx_en_driver="mlx4_en" mlx_en_driver="mlx4_en"
if [ -z "$nvmf_nic_bdfs" ]; then if [ -z "$nvmf_nic_bdfs" ]; then
echo "No NICs"
return 0 return 0
fi fi
@ -85,8 +87,10 @@ function detect_mellanox_nics()
function detect_rdma_nics() function detect_rdma_nics()
{ {
detect_mellanox_nics nics=$(detect_mellanox_nics)
detect_soft_roce_nics if [ "$nics" == "No NICs" ]; then
detect_soft_roce_nics
fi
} }
function allocate_nic_ips() function allocate_nic_ips()