test/nvmf: Fix check_ip_is_soft_roce
This function was always reporting true. Instead of grepping for the nic name in the output, look for whether there is an rxe device assigned to that nic. Change-Id: Ic69868cfb0802a46c36b2fb83d01bca11ed9c181 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/431690 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
4a91adb802
commit
2d153b29db
@ -189,10 +189,10 @@ function check_ip_is_soft_roce()
|
||||
IP=$1
|
||||
if hash rxe_cfg; then
|
||||
dev=$(ip -4 -o addr show | grep $IP | cut -d" " -f2)
|
||||
if rxe_cfg | grep $dev; then
|
||||
return 0
|
||||
else
|
||||
if [ -z $(rxe_cfg | grep $dev | awk '{print $4}') ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user