From c09b139e610f9ad0681568d921892eb2fb88f244 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Mon, 22 Mar 2021 14:00:48 +0100 Subject: [PATCH] test/nvmf: Use rxe_cfg to get rxe-enabled net devices Signed-off-by: Michal Berger Change-Id: Iafc067f880525f25363db1adf9a94a9fc9215455 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6994 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/rxe_cfg_small.sh | 3 +++ test/nvmf/common.sh | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/rxe_cfg_small.sh b/scripts/rxe_cfg_small.sh index 4cfd7872b3..82c4e6b180 100755 --- a/scripts/rxe_cfg_small.sh +++ b/scripts/rxe_cfg_small.sh @@ -308,6 +308,9 @@ case "${1:-status}" in ) status | grep -E "${match:-.}" ;; + rxe-net) + printf '%s\n' "${rxe_to_net[@]}" + ;; *) printf 'Invalid argument (%s)\n' "$1" ;; diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 29499418e4..5b0de57af1 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -178,13 +178,7 @@ function get_available_rdma_ips() { } function get_rdma_if_list() { - for nic_type in /sys/class/infiniband/*; do - [[ -e "$nic_type" ]] || break - for nic_name in /sys/class/infiniband/"$(basename ${nic_type})"/device/net/*; do - [[ -e "$nic_name" ]] || break - basename "$nic_name" - done - done + rxe_cfg rxe-net } function get_ip_address() {