Re: [PATCH v7 7/7] nvme: support rdma transport type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 9/4/20 7:53 AM, Sagi Grimberg wrote:
Signed-off-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
---
  tests/nvme/rc | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 8df00e7d15d0..4c5b2e8edf0d 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -5,6 +5,7 @@
  # Test specific to NVMe devices
. common/rc
+. common/multipath-over-rdma
def_traddr="127.0.0.1"
  def_adrfam="ipv4"
@@ -25,6 +26,12 @@ _nvme_requires() {
  		_have_modules nvmet nvme-core nvme-tcp nvmet-tcp
  		_have_configfs
  		;;
+	rdma)
+		_have_modules nvmet nvme-core nvme-rdma nvmet-rdma
+		_have_configfs
+		_have_program rdma
+		_have_modules rdma_rxe || _have_modules siw
+		;;
  	*)
  		SKIP_REASON="unsupported nvme_trtype=${nvme_trtype}"
  		return 1
@@ -115,6 +122,9 @@ _cleanup_nvmet() {
  		modprobe -r nvmet-"${nvme_trtype}" 2>/dev/null
  	fi
  	modprobe -r nvmet 2>/dev/null
+	if [[ "${nvme_trtype}" == "rdma" ]]; then
+		stop_soft_rdma
+	fi
  }
_setup_nvmet() {
@@ -124,6 +134,16 @@ _setup_nvmet() {
  		modprobe nvmet-"${nvme_trtype}"
  	fi
  	modprobe nvme-"${nvme_trtype}"
+	if [[ "${nvme_trtype}" == "rdma" ]]; then
+		start_soft_rdma
+		for i in $(rdma_network_interfaces)
+		do
+			ipv4_addr=$(get_ipv4_addr "$i")
+			if [ -n "${ipv4_addr}" ]; then
+				def_traddr=${ipv4_addr}
Do we need add break here if ipv4_addr has value?

+			fi
+		done
+	fi
  }
_nvme_disconnect_ctrl() {




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux