Commit 2d153b29 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

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: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/431690


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 4a91adb8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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