Hi
This patch series addressed some failures when I run nvmeof-mp/srp
test and also add suport to use siw for nvme-rdma/nvmeof-mp/srp testing
from cmdline, like this:
$ use_siw=1 nvme-trtype=rdma ./check nvme
$ use_siw=1 ./check nvmeof-mp
$ use_siw-1 ./check srp
V3:
Use sed to output the scheduler from sysfs directly in patch 3
V2:
Update the ib_srpt module path in patch 1, avoid to use ls
Update the SKIP_REASON in patch 2
Introduce get_scheduler_list, fix nvmeof-mp/012 and srp/012 in patch 3
Typo fix in patch 4
Yi Zhang (5):
tests/srp/rc: update the ib_srpt module name
tests/nvmeof-mp/rc: run nvmeof-mp tests if we set multipath=N
nvmeof-mp/012, srp/012: fix the scheduler list
common/rc: _have_iproute2 fix for "ip -V" change
common/multipath-over-rdma: allow to set use_siw
common/multipath-over-rdma | 13 ++++++++++++-
common/rc | 2 +-
tests/nvmeof-mp/012 | 10 ++++++----
tests/nvmeof-mp/rc | 8 +++++---
tests/srp/012 | 10 ++++++----
tests/srp/rc | 4 ++--
6 files changed, 32 insertions(+), 15 deletions(-)
--
2.21.0
To enable it, just do bellow step before we run it:
$ echo "options nvme_core multipath=N" >/etc/modprobe.d/nvme.conf
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Yi Zhang <redacted>
---
tests/nvmeof-mp/rc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
@@ -16,9 +16,11 @@ group_requires() { # Since the nvmeof-mp tests are based on the dm-mpath driver, these # tests are incompatible with the NVME_MULTIPATH kernel configuration- # option.- if _have_kernel_option NVME_MULTIPATH; then- SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"+ # option with multipathing enabled in the nvme_core kernel module.+ if _have_kernel_option NVME_MULTIPATH && \+ _have_module_param_value nvme_core multipath Y; then+ SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config \+and multipathing has been enabled in the nvme_core kernel module" return fi
With below commit, the version will be updated base on the tag
fbef6555 replace SNAPSHOT with auto-generated version string
To reproduce it:
$ ./check srp/015
common/rc: line 98: [: ip utility, iproute2-5.9.0: integer expression expected
Signed-off-by: Yi Zhang <redacted>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix the ib_srpt module insmod failure as the module in some distros are
end with .xz, like bellow on fedora:
/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko.xz
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Yi Zhang <redacted>
---
tests/srp/rc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -465,7 +465,7 @@ configure_target_ports() { # Load LIO and configure the SRP target driver and LUNs. start_lio_srpt() {- local b d gid i ini_ids=() opts p target_ids=() vdev+ local b d gid i ini_ids=() opts p target_ids=() for gid in $(all_primary_gids); do if [ "${gid#fe8}" != "$gid" ]; then
@@ -500,7 +500,7 @@ start_lio_srpt() { if modinfo ib_srpt | grep -q '^parm:[[:blank:]]*rdma_cm_port:'; then opts+=("rdma_cm_port=${srp_rdma_cm_port}") fi- insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko" "${opts[@]}" || return $?+ insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt."* "${opts[@]}" || return $? i=0 for r in "${vdev_path[@]}"; do if [ -b "$(readlink -f "$r")" ]; then
@@ -326,6 +326,17 @@ set_scheduler() { fi }+# Get block dev scheduler list+get_scheduler_list() {+ local b=$1 p+ p=/sys/block/"$b"/queue/scheduler+ if [ -e "$p" ]; then+ sed 's/[][]//g' /sys/block/"$b"/queue/scheduler+ else+ return 1+ fi+}+ # Get a /dev/... path that points at dm device number $1. Set its I/O scheduler # to $2 and its timeout to $3. The shell script that includes this file must # define a function get_bdev_path() that translates device number $1 into a
@@ -8,7 +8,7 @@ DESCRIPTION="dm-mpath on top of multiple I/O schedulers" QUICK=1 test_io_schedulers() {- local dev m+ local dev m dm scheds # Load all I/O scheduler kernel modules for m in "/lib/modules/$(uname -r)/kernel/block/"*.ko; do
@@ -8,7 +8,7 @@ DESCRIPTION="dm-mpath on top of multiple I/O schedulers" QUICK=1 test_io_schedulers() {- local dev m+ local dev m dm scheds # Load all I/O scheduler kernel modules for m in "/lib/modules/$(uname -r)/kernel/block/"*.ko; do
With this change, we can change to use siw for nvme-rdma/nvmeof-mp/srp
testing from cmdline:
$ use_siw=1 nvme-trtype=rdma ./check nvme/
$ use_siw=1 ./check nvmeof-mp/
$ use_siw=1 ./check srp/
Signed-off-by: Yi Zhang <redacted>
---
common/multipath-over-rdma | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Bart Van Assche <bvanassche@acm.org> Date: 2020-11-26 16:31:31
On 11/26/20 12:35 AM, Yi Zhang wrote:
quoted hunk
With this change, we can change to use siw for nvme-rdma/nvmeof-mp/srp
testing from cmdline:
$ use_siw=1 nvme-trtype=rdma ./check nvme/
$ use_siw=1 ./check nvmeof-mp/
$ use_siw=1 ./check srp/
Signed-off-by: Yi Zhang <redacted>
---
common/multipath-over-rdma | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Thu, Nov 26, 2020 at 04:35:27PM +0800, Yi Zhang wrote:
Hi
This patch series addressed some failures when I run nvmeof-mp/srp
test and also add suport to use siw for nvme-rdma/nvmeof-mp/srp testing
from cmdline, like this:
$ use_siw=1 nvme-trtype=rdma ./check nvme
$ use_siw=1 ./check nvmeof-mp
$ use_siw-1 ./check srp
V3:
Use sed to output the scheduler from sysfs directly in patch 3
V2:
Update the ib_srpt module path in patch 1, avoid to use ls
Update the SKIP_REASON in patch 2
Introduce get_scheduler_list, fix nvmeof-mp/012 and srp/012 in patch 3
Typo fix in patch 4
Yi Zhang (5):
tests/srp/rc: update the ib_srpt module name
tests/nvmeof-mp/rc: run nvmeof-mp tests if we set multipath=N
nvmeof-mp/012, srp/012: fix the scheduler list
common/rc: _have_iproute2 fix for "ip -V" change
common/multipath-over-rdma: allow to set use_siw
common/multipath-over-rdma | 13 ++++++++++++-
common/rc | 2 +-
tests/nvmeof-mp/012 | 10 ++++++----
tests/nvmeof-mp/rc | 8 +++++---
tests/srp/012 | 10 ++++++----
tests/srp/rc | 4 ++--
6 files changed, 32 insertions(+), 15 deletions(-)