Commit 30ca1a90 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

test/nvmf: fix edge condition in check_ip_is_soft_roce



When individual tests were run with --iso --transport=tcp, the
check_ip_is_soft_rocefunction incorrectly marked the loopback ip address
as soft_roce due to 'lo' matching with a notice message from the rxe_cfg
config command "module rdma_rxe is not loaded". Instead, grep
specifically to make sure that the argument we are matching against,
which is supposed to be an rxe interface name, contains rxe.

rxe interfaces are numbered sequentially as rxe0 rxe1 . . . rxen

Change-Id: Ibe8afb3e038e104173eb1e2bbf671ce9f417ffeb
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463127


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 0e6ddfd6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ 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 [ -z $(rxe_cfg | grep $dev | awk '{print $4}') ]; then
		if [ -z $(rxe_cfg | grep $dev | awk '{print $4}' | grep "rxe") ]; then
			return 1
		else
			return 0