test/nvmf: add logic to include soft-roce nics in NVMF tests
This will allow us to virtualize all of our tests. Change-Id: Ic9697c1622e516d0021c8af37c0cd4c0f65d430a Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/370992 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
e8b1c452bd
commit
80c91e4e46
@ -29,6 +29,17 @@ function load_ib_rdma_modules()
|
||||
modprobe rdma_ucm
|
||||
}
|
||||
|
||||
|
||||
function detect_soft_roce_nics()
|
||||
{
|
||||
if hash rxe_cfg; then
|
||||
interface="$(ifconfig | grep "RUNNING" -m 1 | awk '{print $1}' | sed s/://)"
|
||||
rxe_cfg add $interface
|
||||
rxe_cfg start
|
||||
export SOFT_ROCE=true
|
||||
fi
|
||||
}
|
||||
|
||||
function detect_mellanox_nics()
|
||||
{
|
||||
if ! hash lspci; then
|
||||
@ -69,12 +80,18 @@ function detect_mellanox_nics()
|
||||
|
||||
function detect_rdma_nics()
|
||||
{
|
||||
# could be add other nics, so wrap it
|
||||
detect_mellanox_nics
|
||||
detect_soft_roce_nics
|
||||
}
|
||||
|
||||
function allocate_nic_ips()
|
||||
{
|
||||
# If a Soft-RoCE nic was allocated, it already has an ip address atached to it
|
||||
# and we use it in preference to any other RDMA nics attached to the device.
|
||||
if [ $SOFT_ROCE == true ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
let count=$NVMF_IP_LEAST_ADDR
|
||||
for nic_type in `ls /sys/class/infiniband`; do
|
||||
for nic_name in `ls /sys/class/infiniband/${nic_type}/device/net`; do
|
||||
|
Loading…
Reference in New Issue
Block a user