From 30ca1a90831ccb73276d9c8940d2bdc37e4f1d5f Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 24 Jul 2019 21:03:58 -0700 Subject: [PATCH] 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: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463127 Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Ziye Yang Reviewed-by: Changpeng Liu Tested-by: SPDK CI Jenkins --- test/nvmf/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 10f6444e3..d1c45fe89 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -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