From: Bart Van Assche Date: Tue, 22 Aug 2023 16:57:07 +0000 (-0700) Subject: Change the default RDMA driver from rdma_rxe to siw X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=11ab7cc7ee32d6c3e16ac74c34c4bbdbf8f99292;p=users%2Fsagi%2Fblktests.git Change the default RDMA driver from rdma_rxe to siw Since the siw driver is more stable than the rdma_rxe driver, change the default into siw. See e.g. https://lore.kernel.org/all/c3d1a966-b9b0-d015-38ec-86270b5045fc@acm.org/. Signed-off-by: Bart Van Assche Signed-off-by: Shin'ichiro Kawasaki --- diff --git a/Documentation/running-tests.md b/Documentation/running-tests.md index 62fae60..ae80860 100644 --- a/Documentation/running-tests.md +++ b/Documentation/running-tests.md @@ -110,17 +110,19 @@ The NVMe tests can be additionally parameterized via environment variables. - nvme_num_iter: 1000 (default) The number of iterations a test should do. -### Running nvme-rdma srp tests +### Running nvme-rdma and SRP tests + +These tests will use the siw (soft-iWARP) driver by default. The rdma_rxe +(soft-RoCE) driver is also supported. -Most of these tests will use the rdma_rxe (soft-RoCE) driver by default. The siw (soft-iWARP) driver is also supported. ```sh -To use the rdma_rxe driver: +To use the siw driver: nvme_trtype=rdma ./check nvme/ ./check srp/ -To use the siw driver: -use_siw=1 nvme_trtype=rdma ./check nvme/ -use_siw=1 ./check srp/ +To use the rdma_rxe driver: +use_rxe=1 nvme_trtype=rdma ./check nvme/ +use_rxe=1 ./check srp/ ``` ### Normal user diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index f124897..ee05100 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -12,7 +12,7 @@ filesystem_type=ext4 fio_aux_path=/tmp/fio-state-files memtotal=$(sed -n 's/^MemTotal:[[:blank:]]*\([0-9]*\)[[:blank:]]*kB$/\1/p' /proc/meminfo) max_ramdisk_size=$((1<<25)) -use_siw=${use_siw:-""} +use_rxe=${use_rxe:-""} ramdisk_size=$((memtotal*(1024/16))) # in bytes if [ $ramdisk_size -gt $max_ramdisk_size ]; then ramdisk_size=$max_ramdisk_size @@ -396,7 +396,7 @@ start_soft_rdma() { local type { - if [ -n "$use_siw" ]; then + if [ -z "$use_rxe" ]; then modprobe siw || return $? type=siw else diff --git a/tests/srp/rc b/tests/srp/rc index 8370448..c77ef6c 100755 --- a/tests/srp/rc +++ b/tests/srp/rc @@ -51,7 +51,13 @@ group_requires() { _have_module ib_uverbs _have_module null_blk _have_module rdma_cm - _have_module rdma_rxe + if [ -n "$use_rxe" ]; then + _have_module rdma_rxe + else + _have_module siw + _have_kver 5 5 + _have_iproute2 190404 + fi _have_module scsi_debug _have_module target_core_iblock _have_module target_core_mod