test/vhost: Don't use nvmftestinit() in vhost tests

For now this function is not working very well in case it finds E810
cards (we do have some installed across CI pool) as we don't have
proper irdma driver in place.

Instead, and since it shouldn't be relevant for vhost tests, enable
soft-RoCE devices and use them (or any other rdma-capable NIC that
ip is going to be allocated on) during the vhost migration tests.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4e8cc7b8eea3ce91684d8a68d0a0e11b8d1e4b9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8750
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Michal Berger 2021-07-13 10:24:33 +02:00 committed by Tomasz Zawadzki
parent 8b19bc2383
commit 5e03beae70

View File

@ -34,7 +34,10 @@ function migration_tc2_cleanup_vhost_config() {
function migration_tc2_configure_vhost() { function migration_tc2_configure_vhost() {
timing_enter migration_tc2_configure_vhost timing_enter migration_tc2_configure_vhost
TEST_TRANSPORT=rdma TEST_MODE=iso nvmftestinit # Just in case we don't have any rdma-capable NICs on board - using hw or
# soft-RoCE during vhost tests should not matter.
detect_soft_roce_nics
allocate_nic_ips
# Those are global intentionally - they will be unset in cleanup handler # Those are global intentionally - they will be unset in cleanup handler
@ -57,7 +60,7 @@ function migration_tc2_configure_vhost() {
# Override the trap set in place via nvmfappstart() # Override the trap set in place via nvmfappstart()
trap 'migration_tc2_error_cleanup; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT trap 'migration_tc2_error_cleanup; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT
rpc_cmd framework_start_init rpc_cmd framework_start_init
rpc_cmd nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 rpc_cmd nvmf_create_transport -t rdma -u 8192
mapfile -t json < <("$rootdir/scripts/gen_nvme.sh") mapfile -t json < <("$rootdir/scripts/gen_nvme.sh")
rpc_cmd load_subsystem_config -j "'${json[*]}'" rpc_cmd load_subsystem_config -j "'${json[*]}'"
timing_exit start_nvmf_tgt timing_exit start_nvmf_tgt