Skip to contentSkip to conversation

Add support to run against arbitrary targets

PATCH In review Aurelien Aptel 4 participants 15 messages Dec 6, 2024 – Jan 29

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v5 cover Add support to run against arbitrary targets

This series is based off Daniel's patches. It is rebased to work on current blktests. It is also available on github:

https://github.com/aaptel/blktests.git branch remote-target-v5

The last patch adds a test making explicit use of the remote target support by testing the new nvme-tcp offloading.

changes:
v5:
- remove duplicated code, truncate regression in _nvmet_target_setup()
- remove def_host_traddr, use of eval
- fix shellcheck warnings
- cleanup test nvme/055
v4:
- added nvme test 055 for nvme-tcp offload
- added 'blkdev' setting under [subsys_0] in the control script config
- added workaround for older python versions
- https://lore.kernel.org/all/[email protected]/
v3:
- added support for previous configured target
- renamed nvme_nvme_target to _require_kernel_nvme_target
- use shorter redirect operator
- https://lore.kernel.org/all/[email protected]/
v2:
- many of the preperation patches have been merged, drop them
- added a python script which implements the blktests API
- add some documentation how to use it
- changed the casing of the environment variables to upper case
- https://lore.kernel.org/all/[email protected]/
v1:
- initial version
- https://lore.kernel.org/linux-nvme/[email protected]/
Aurelien Aptel (2):
common/nvme: add digest options to __nvme_connect_subsys() nvme/055: add test for nvme-tcp zero-copy offload

Daniel Wagner (3):
nvme/rc: introduce remote target support
nvme/030: only run against kernel soft target
contrib: add remote target setup/cleanup script

 Documentation/running-tests.md |  42 ++++++
 README.md                      |   1 +
 check                          |   4 +
 common/nvme                    |  78 +++++++++-
 common/rc                      |   8 +
 contrib/nvme_target_control.py | 190 +++++++++++++++++++++++
 contrib/nvmet-subsys.jinja2    |  71 +++++++++
 tests/nvme/030                 |   1 +
 tests/nvme/055                 | 268 +++++++++++++++++++++++++++++++++
 tests/nvme/055.out             |  44 ++++++
 tests/nvme/rc                  |  30 ++++
 11 files changed, 729 insertions(+), 8 deletions(-)
 create mode 100755 contrib/nvme_target_control.py
 create mode 100644 contrib/nvmet-subsys.jinja2
 create mode 100755 tests/nvme/055
 create mode 100644 tests/nvme/055.out
Signature · 1 line
2.34.1
#1 lore raw

PATCH v5 1/5 nvme/rc: introduce remote target support

From: Daniel Wagner <[email protected]>

Most of the NVMEeoF tests are exercising the host code of the nvme subsystem. There is no real reason not to run these against an arbitrary target. We just have to skip the soft target setup and make it possible to setup a remote target.

Because all tests use now the common setup/cleanup helpers we just need to intercept this call and forward it to an external component.

As we already have various nvme variables to setup the target which we should allow to overwrite. Also introduce a NVME_TARGET_CONTROL variable which points to a script which gets executed whenever a targets needs to be created/destroyed.

---
 Documentation/running-tests.md | 33 ++++++++++++++++++
 check                          |  4 +++
 common/nvme                    | 62 +++++++++++++++++++++++++++++-----
 tests/nvme/rc                  | 14 ++++++++
 4 files changed, 105 insertions(+), 8 deletions(-)
Documentation/running-tests.md +33 -0
index 968702e..fe4f729 100644
@@ -120,6 +120,9 @@ The NVMe tests can be additionally parameterized via environment variables.
 - NVME_NUM_ITER: 1000 (default)
   The number of iterations a test should do. This parameter had an old name
   'nvme_num_iter'. The old name is still usable, but not recommended.
+- NVME_TARGET_CONTROL: When defined, the generic target setup/cleanup code will
+  be skipped and this script gets called. This makes it possible to run
+  the fabric nvme tests against a real target.
 
 ### Running nvme-rdma and SRP tests
 
@@ -167,3 +170,33 @@ if ! findmnt -t configfs /sys/kernel/config > /dev/null; then
 	mount -t configfs configfs /sys/kernel/config
 fi
 ```
+### NVME_TARGET_CONTROL
+
+When NVME_TARGET_CONTROL is set, blktests will call the script which the
+environment variable points to, to fetch the configuration values to be used for
+the runs, e.g subsysnqn or hostnqn. This allows the blktest to be run against
+external configured/setup targets.
+
+The blktests expects that the script interface implements following
+commands:
+
+config:
+  --show-blkdev-type
+  --show-trtype
+  --show-hostnqn
+  --show-hostid
+  --show-host-traddr
+  --show-traddr
+  --show-trsvid
+  --show-subsys-uuid
+  --show-subsysnqn
+
+setup:
+  --subsysnqn SUBSYSNQN
+  --subsys-uuid SUBSYS_UUID
+  --hostnqn HOSTNQN
+  --ctrlkey CTRLKEY
+  --hostkey HOSTKEY
+
+cleanup:
+  --subsysnqn SUBSYSNQN
check +4 -0
index 7f43a31..dad5e70 100755
@@ -603,6 +603,10 @@ _run_group() {
 	# shellcheck disable=SC1090
 	. "tests/${group}/rc"
 
+	if declare -fF group_setup >/dev/null; then
+		group_setup
+	fi
+
 	if declare -fF group_requires >/dev/null; then
 		group_requires
 		if [[ -v SKIP_REASONS ]]; then
common/nvme +54 -8

107 lines not on this page · raw message

tests/nvme/rc +14 -0
index d63afd1..9ad9a52 100644
@@ -113,6 +113,13 @@ _nvme_requires() {
 	return 0
 }
 
+group_setup() {
+	if [[ -n "${nvme_target_control}" ]]; then
+		NVMET_TRTYPES="$(${nvme_target_control} config --show-trtype)"
+		NVMET_BLKDEV_TYPES="$(${nvme_target_control} config --show-blkdev-type)"
+	fi
+}
+
 group_requires() {
 	_have_root
 	_NVMET_TRTYPES_is_valid
@@ -392,6 +399,13 @@ _nvmet_passthru_target_cleanup() {
 		esac
 	done
 
+	if [[ -n "${nvme_target_control}" ]]; then
+		eval "${nvme_target_control}" cleanup \
+			--subsysnqn "${subsysnqn}" \
+			> /dev/null
+		return
+	fi
+
 	_get_nvmet_ports "${subsysnqn}" ports
 
 	for port in "${ports[@]}"; do
Signature · 1 line
2.34.1
Reviewed-by on v5 1/5
#2 lore raw

Re: [PATCH blktests v5 1/5] nvme/rc: introduce remote target support

Quoted 10 lines · Aurelien Aptel

From: Daniel Wagner <[email protected]>

Most of the NVMEeoF tests are exercising the host code of the nvme subsystem. There is no real reason not to run these against an arbitrary target. We just have to skip the soft target setup and make it possible to setup a remote target.

Because all tests use now the common setup/cleanup helpers we just need to intercept this call and forward it to an external component.

Quoted 9 lines

As we already have various nvme variables to setup the target which we should allow to overwrite. Also introduce a NVME_TARGET_CONTROL variable which points to a script which gets executed whenever a targets needs to be created/destroyed.

---

Looks good.

-ck

#3 lore raw

PATCH v5 2/5 common/nvme: add digest options to __nvme_connect_subsys()

In reply to Aurelien Aptel

This commit lets tests connect nvme subsystems with data and header digest.

---
 common/nvme | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
common/nvme +16 -0
index 887da4d..d909d42 100644
@@ -271,6 +271,8 @@ _nvme_connect_subsys() {
 	local reconnect_delay=""
 	local ctrl_loss_tmo=""
 	local no_wait=false
+	local hdr_digest=false
+	local data_digest=false
 	local port
 	local i
 	local -a ARGS
@@ -329,6 +331,14 @@ _nvme_connect_subsys() {
 				no_wait=true
 				shift 1
 				;;
+			--hdr-digest)
+				hdr_digest=true
+				shift 1
+				;;
+			--data-digest)
+				data_digest=true
+				shift 1
+				;;
 			*)
 				echo "WARNING: unknown argument: $1"
 				shift
@@ -380,6 +390,12 @@ _nvme_connect_subsys() {
 	if [[ -n "${ctrl_loss_tmo}" ]]; then
 		ARGS+=(--ctrl-loss-tmo="${ctrl_loss_tmo}")
 	fi
+	if [[ ${hdr_digest} = true ]]; then
+		ARGS+=(--hdr-digest)
+	fi
+	if [[ ${data_digest} = true ]]; then
+		ARGS+=(--data-digest)
+	fi
 	ARGS+=(-o json)
 	connect=$(nvme connect "${ARGS[@]}" 2> /dev/null)
 
Signature · 1 line
2.34.1
#5 lore raw

PATCH v5 3/5 nvme/030: only run against kernel soft target

In reply to Aurelien Aptel

From: Daniel Wagner <[email protected]>

This tests is exercising the target code and not so much the host side. The problem with nvme/030 is that it depends on interface to interact with the target which is not covered by the standard. Thus we can't run it against an arbitrary target. Just skip it when we run against a arbitrary target.

---
 tests/nvme/030 | 1 +
 tests/nvme/rc  | 8 ++++++++
 2 files changed, 9 insertions(+)
tests/nvme/030 +1 -0
index 596e411..fe74849 100755
@@ -13,6 +13,7 @@ requires() {
 	_nvme_requires
 	_have_loop
 	_require_nvme_trtype_is_fabrics
+	_require_kernel_nvme_target
 }
 
 set_conditions() {
tests/nvme/rc +8 -0
index 9ad9a52..d1a4c01 100644
@@ -191,6 +191,14 @@ _require_kernel_nvme_fabrics_feature() {
 	return 0
 }
 
+_require_kernel_nvme_target() {
+	if [[ -n "${nvme_target_control}" ]]; then
+		SKIP_REASONS+=("Linux kernel soft target not available")
+		return 1;
+	fi
+	return 0
+}
+
 _test_dev_nvme_ctrl() {
 	echo "/dev/char/$(cat "${TEST_DEV_SYSFS}/device/dev")"
 }
Signature · 1 line
2.34.1
Reviewed-by on v5 3/5
#6 lore raw

Re: [PATCH blktests v5 3/5] nvme/030: only run against kernel soft target

Quoted 9 lines · Aurelien Aptel

From: Daniel Wagner<[email protected]>

This tests is exercising the target code and not so much the host side. The problem with nvme/030 is that it depends on interface to interact with the target which is not covered by the standard. Thus we can't run it against an arbitrary target. Just skip it when we run against a arbitrary target.

Looks good.

-ck

#7 lore raw

PATCH v5 4/5 contrib: add remote target setup/cleanup script

In reply to Aurelien Aptel

From: Daniel Wagner <[email protected]>

Use nvmetcli to setup/cleanup a remote soft target.

---
 contrib/nvme_target_control.py | 190 +++++++++++++++++++++++++++++++++
 contrib/nvmet-subsys.jinja2    |  71 ++++++++++++
 2 files changed, 261 insertions(+)
 create mode 100755 contrib/nvme_target_control.py
 create mode 100644 contrib/nvmet-subsys.jinja2
contrib/nvme_target_control.py new file +190 -0
new file mode 100755
index 0000000..db77fe3
@@ -0,0 +1,190 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0+
+
+# blktests calls this script to setup/teardown remote targets. blktests passes
+# all relevant information via the command line, e.g. --hostnqn.
+#
+# This script uses nvmetcli to setup the remote target (it depends on the REST
+# API feature [1]). There is not technical need for nvmetcli to use but it makes
+# it simple to setup a remote Linux box. If you want to setup someting else
+# you should to replace this part.
+#
+# There are couple of global configuration options which need to be set.
+# Add ~/.config/blktests/nvme_target_control.toml file with something like:
+#
+# [main]
+# skip_setup_cleanup=false
+# nvmetcli='/usr/bin/nvmetcli'
+# remote='http://nvmet.local:5000'
+#
+# [host]
+# blkdev_type='device'
+# trtype='tcp'
+# hostnqn='nqn.2014-08.org.nvmexpress:uuid:0f01fb42-9f7f-4856-b0b3-51e60b8de349'
+# hostid='0f01fb42-9f7f-4856-b0b3-51e60b8de349'
+# host_traddr='192.168.154.187'
+#
+# [subsys_0]
+# traddr='192.168.19.189'
+# trsvid='4420'
+# subsysnqn='blktests-subsystem-1'
+# subsys_uuid='91fdba0d-f87b-4c25-b80f-db7be1418b9e'
+#
+# This expects nvmetcli with the restapi service running on target.
+#
+# Alternatively, you can skip the the target setup/cleanup completely
+# (skip_setup_cleanup) and run against a previously configured target.
+#
+# [main]
+# skip_setup_cleanup=true
+# nvmetcli='/usr/bin/nvmetcli'
+# remote='http://nvmet.local:5000'
+#
+# [host]
+# blkdev_type='device'
+# trtype='tcp'
+# hostnqn='nqn.2014-08.org.nvmexpress:uuid:1a9e23dd-466e-45ca-9f43-a29aaf47cb21'
+# hostid='1a9e23dd-466e-45ca-9f43-a29aaf47cb21'
+# host_traddr='10.161.16.48'
+#
+# [subsys_0]
+# traddr='10.162.198.45'
+# trsvid='4420'
+# subsysnqn='nqn.1988-11.com.dell:powerstore:00:f03028e73ef7D032D81E'
+# subsys_uuid='3a5c104c-ee41-38a1-8ccf-0968003d54e7'
+# blkdev='/dev/nullb0'
+#
+# nvmetcli uses JSON configuration, thus this script creates a JSON configuration
+# using a jinja2 template. After this step we simple have to set the blktests
+# variable correctly and start blktests.
+#
+#   NVME_TARGET_CONTROL=~/blktests/contrib/nvme_target_control.py ./check nvme
+#
+# [1] https://github.com/hreinecke/nvmetcli/tree/restapi
+
+import os
+
+# workaround for python<3.11
+TOML_OPEN_MODE="rb"
+try:
+    import tomllib
+except ModuleNotFoundError:
+    import pip._vendor.tomli as tomllib
+    TOML_OPEN_MODE="r"
+
+import argparse
+import subprocess
+from jinja2 import Environment, FileSystemLoader
+
+
+XDG_CONFIG_HOME = os.environ.get("XDG_CONFIG_HOME")
+if not XDG_CONFIG_HOME:
+    XDG_CONFIG_HOME = os.environ.get('HOME') + '/.config'
+
+
+with open(f'{XDG_CONFIG_HOME}/blktests/nvme_target_control.toml', TOML_OPEN_MODE) as f:
+    config = tomllib.load(f)
+    nvmetcli = config['main']['nvmetcli']
+    remote = config['main']['remote']
+
+
+def gen_conf(conf):
+    basepath = os.path.dirname(__file__)
+    environment = Environment(loader=FileSystemLoader(basepath))
+    template = environment.get_template('nvmet-subsys.jinja2')
+    filename = f'{conf["subsysnqn"]}.json'
+    content = template.render(conf)
+    with open(filename, mode='w', encoding='utf-8') as outfile:
+        outfile.write(content)
+
+
+def target_setup(args):
+    if config['main']['skip_setup_cleanup']:
+        return
+
+    conf = {
+        'subsysnqn': args.subsysnqn,
+        'subsys_uuid': args.subsys_uuid,
+        'hostnqn': args.hostnqn,
+        'allowed_hosts': args.hostnqn,
+        'ctrlkey': args.ctrlkey,
+        'hostkey': args.hostkey,
+        'blkdev': config['subsys_0']['blkdev'],
+    }
+
+    gen_conf(conf)
+
+    subprocess.call(['python3', nvmetcli, '--remote=' + remote,
+                     'restore', args.subsysnqn + '.json'])
+
+
+def target_cleanup(args):
+    if config['main']['skip_setup_cleanup']:
+        return
+
+    subprocess.call(['python3', nvmetcli, '--remote=' + remote,
+                     'clear', args.subsysnqn + '.json'])
+
+
+def target_config(args):
+	if args.show_blkdev_type:
+		print(config['host']['blkdev_type'])
+	elif args.show_trtype:
+		print(config['host']['trtype'])
+	elif args.show_hostnqn:
+		print(config['host']['hostnqn'])
+	elif args.show_hostid:
+		print(config['host']['hostid'])
+	elif args.show_host_traddr:
+		print(config['host']['host_traddr'])
+	elif args.show_traddr:
+		print(config['subsys_0']['traddr'])
+	elif args.show_trsvid:
+		print(config['subsys_0']['trsvid'])
+	elif args.show_subsysnqn:
+		print(config['subsys_0']['subsysnqn'])
+	elif args.show_subsys_uuid:
+		print(config['subsys_0']['subsys_uuid'])
+
+
+def build_parser():
+    parser = argparse.ArgumentParser()
+    sub = parser.add_subparsers(required=True)
+
+    setup = sub.add_parser('setup')
+    setup.add_argument('--subsysnqn', required=True)
+    setup.add_argument('--subsys-uuid', required=True)
+    setup.add_argument('--hostnqn', required=True)
+    setup.add_argument('--ctrlkey', default='')
+    setup.add_argument('--hostkey', default='')
+    setup.set_defaults(func=target_setup)
+
+    cleanup = sub.add_parser('cleanup')
+    cleanup.add_argument('--subsysnqn', required=True)
+    cleanup.set_defaults(func=target_cleanup)
+
+    config = sub.add_parser('config')
+    config.add_argument('--show-blkdev-type', action='store_true')
+    config.add_argument('--show-trtype', action='store_true')
+    config.add_argument('--show-hostnqn', action='store_true')
+    config.add_argument('--show-hostid', action='store_true')
+    config.add_argument('--show-host-traddr', action='store_true')
+    config.add_argument('--show-traddr', action='store_true')
+    config.add_argument('--show-trsvid', action='store_true')
+    config.add_argument('--show-subsys-uuid', action='store_true')
+    config.add_argument('--show-subsysnqn', action='store_true')
+    config.set_defaults(func=target_config)
+
+    return parser
+
+
+def main():
+    import sys
+
+    parser = build_parser()
+    args = parser.parse_args()
+    args.func(args)
+
+
+if __name__ == '__main__':
+    main()
contrib/nvmet-subsys.jinja2 new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.34.1
#9 lore raw

PATCH v5 5/5 nvme/055: add test for nvme-tcp zero-copy offload

In reply to Aurelien Aptel

This commit adds a new test for the kernel ULP DDP (Direct Data Placement) feature with NVMe-TCP.

Configuration of DDP is per NIC and is done through a script in the kernel source. For this reason we add 2 new config vars:
- KERNELSRC: path to the running kernel sources
- NVME_IFACE: name of the network interface to configure the offload on

---
 Documentation/running-tests.md |   9 ++
 README.md                      |   1 +
 common/rc                      |   8 +
 tests/nvme/055                 | 268 +++++++++++++++++++++++++++++++++
 tests/nvme/055.out             |  44 ++++++
 tests/nvme/rc                  |   8 +
 6 files changed, 338 insertions(+)
 create mode 100755 tests/nvme/055
 create mode 100644 tests/nvme/055.out
Documentation/running-tests.md +9 -0
index fe4f729..a42fc91 100644
@@ -124,6 +124,15 @@ The NVMe tests can be additionally parameterized via environment variables.
   be skipped and this script gets called. This makes it possible to run
   the fabric nvme tests against a real target.
 
+#### NVMe-TCP zero-copy offload
+
+The NVMe-TCP ZC offload tests use a couple more variables.
+
+- KERNELSRC: Path to running kernel sources.
+  Needed for the script to configure the offload.
+- NVME_IFACE: Name of the interface the offload should be enabled on.
+  This should be the same interface the NVMe connection is made with.
+
 ### Running nvme-rdma and SRP tests
 
 These tests will use the siw (soft-iWARP) driver by default. The rdma_rxe
README.md +1 -0
index 55227d9..5073510 100644
@@ -30,6 +30,7 @@ Some tests require the following:
 - nbd-client and nbd-server (Debian) or nbd (Fedora, openSUSE, Arch Linux)
 - dmsetup (Debian) or device-mapper (Fedora, openSUSE, Arch Linux)
 - rublk (`cargo install --version=^0.1 rublk`) for ublk test
+- python3, ethtool, iproute2 for nvme-tcp zero-copy offload test
 
 Build blktests with `make`. Optionally, install it to a known location with
 `make install` (`/usr/local/blktests` by default, but this can be changed by
common/rc +8 -0
index b2e68b2..0c8b51f 100644
@@ -148,6 +148,14 @@ _have_loop() {
 	_have_driver loop && _have_program losetup
 }
 
+_have_kernel_source() {
+	if [ -z "${KERNELSRC}" ]; then
+		SKIP_REASONS+=("KERNELSRC not set")
+		return 1
+	fi
+	return 0
+}
+
 _have_blktrace() {
 	# CONFIG_BLK_DEV_IO_TRACE might still be disabled, but this is easier
 	# to check. We can fix it if someone complains.
tests/nvme/055 new file +268 -0

268 lines not on this page · raw message

tests/nvme/055.out new file +44 -0

44 lines not on this page · raw message

tests/nvme/rc +8 -0
index d1a4c01..4a43e43 100644
@@ -199,6 +199,14 @@ _require_kernel_nvme_target() {
 	return 0
 }
 
+_require_remote_nvme_target() {
+	if [ -z "${nvme_target_control}" ]; then
+		SKIP_REASONS+=("Remote target required but NVME_TARGET_CONTROL is not set")
+		return 1
+	fi
+	return 0
+}
+
 _test_dev_nvme_ctrl() {
 	echo "/dev/char/$(cat "${TEST_DEV_SYSFS}/device/dev")"
 }
Signature · 1 line
2.34.1
Reviewed-by on v5 5/5
#10 lore raw

Re: [PATCH blktests v5 5/5] nvme/055: add test for nvme-tcp zero-copy offload

Quoted 11 lines · Aurelien Aptel

This commit adds a new test for the kernel ULP DDP (Direct Data Placement) feature with NVMe-TCP.

Configuration of DDP is per NIC and is done through a script in the kernel source. For this reason we add 2 new config vars:
- KERNELSRC: path to the running kernel sources
- NVME_IFACE: name of the network interface to configure the offload on

Looks good.

-ck

#11 lore raw

Re: [PATCH blktests v5 5/5] nvme/055: add test for nvme-tcp zero-copy offload

In reply to Aurelien Aptel
Quoted 18 lines · Aurelien Aptel

+++ b/tests/nvme/055

tests/nvme/055 new file +16 -0
@@ -0,0 +1,268 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2024 Aurelien Aptel<[email protected]>
+#
+# zero-copy offload
+
+. tests/nvme/rc
+
+DESCRIPTION="enable zero copy offload and run rw traffic"
+TIMED=1
+
+iface_idx=""
+
+# these vars get updated after each call to connect_run_disconnect()
+nb_packets=0
+nb_bytes=0

tests/nvme/055 line 26

Quoted 10 lines
tests/nvme/055 new file +10 -0
+nb_offload_packets=0
+nb_offload_bytes=0
+offload_bytes_ratio=0
+offload_packets_ratio=0
+
+requires() {
+	_nvme_requires
+	_require_remote_nvme_target
+	_require_nvme_trtype tcp
+	_have_kernel_option ULP_DDP

I notice that this kernel config option is still not included in mainline, over 1 year later.

It is strange to me to merge tests for features which are yet to be accepted.

#12 lore raw

Re: [PATCH blktests v5 5/5] nvme/055: add test for nvme-tcp zero-copy offload

Quoted 33 lines · John Garry
Quoted 18 lines · Aurelien Aptel

+++ b/tests/nvme/055

tests/nvme/055 new file +16 -0
@@ -0,0 +1,268 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2024 Aurelien Aptel<[email protected]>
+#
+# zero-copy offload
+
+. tests/nvme/rc
+
+DESCRIPTION="enable zero copy offload and run rw traffic"
+TIMED=1
+
+iface_idx=""
+
+# these vars get updated after each call to connect_run_disconnect()
+nb_packets=0
+nb_bytes=0

tests/nvme/055 line 26

Quoted 10 lines
tests/nvme/055 new file +10 -0
+nb_offload_packets=0
+nb_offload_bytes=0
+offload_bytes_ratio=0
+offload_packets_ratio=0
+
+requires() {
+	_nvme_requires
+	_require_remote_nvme_target
+	_require_nvme_trtype tcp
+	_have_kernel_option ULP_DDP

I notice that this kernel config option is still not included in mainline, over 1 year later.

Quoted 2 lines

It is strange to me to merge tests for features which are yet to be accepted.

When this test case was added, I was aware of that the DDP offload feature was not yet accepted [1]. At that time, I expected that the feature would be applied soon.

This test case was the first use case of the blktests feature "NVME_TARGET_CONTROL" which allows setting up nvme targets for testing in flexible manner [2]. The test case was useful to demonstrate the value of the feature. That's why I merged the test for "features which are yet to be accepted".

Said that, assuming the DDP offload feature is not going to be mainlined, this test case has lost its value. I think it is reasonable to remove the test case at this moment. A patch post for removal will be helpful to confirm consensus.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/linux-block/[email protected]/

#13 lore raw

Re: [PATCH blktests v5 5/5] nvme/055: add test for nvme-tcp zero-copy offload

In reply to John Garry

Hi,

Quoted 5 lines · John Garry

I notice that this kernel config option is still not included in mainline, over 1 year later.

It is strange to me to merge tests for features which are yet to be accepted.

These patches were required by the kernel reviewers to be merged in the test suite before the feature can be merged in the kernel.

The last review round for the kernel feature unfortunately required some major redesigning and has not been merged since.

Thanks

#14 lore raw
In reply to Aurelien Aptel
Quoted 8 lines · Aurelien Aptel

This series is based off Daniel's patches. It is rebased to work on current blktests. It is also available on github:

https://github.com/aaptel/blktests.git branch remote-target-v5

The last patch adds a test making explicit use of the remote target support by testing the new nvme-tcp offloading.

Quoted 6 lines

changes:
v5:
- remove duplicated code, truncate regression in _nvmet_target_setup()
- remove def_host_traddr, use of eval
- fix shellcheck warnings
- cleanup test nvme/055

I applied the v5 series. Please note that I renumbered the test case from nvme/055 to nvme/056. Thanks!