[PATCH blktests v4 2/5] common/nvme: add digest options to __nvme_connect_subsys()
Aurelien Aptel
aaptel at nvidia.com
Tue Nov 26 12:38:53 PST 2024
This commit lets tests connect nvme subsystems with data and header
digest.
Signed-off-by: Aurelien Aptel <aaptel at nvidia.com>
Reviewed-by: Daniel Wagner <dwagner at suse.de>
---
common/nvme | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/common/nvme b/common/nvme
index f99af5a..e5e5344 100644
--- a/common/nvme
+++ b/common/nvme
@@ -272,6 +272,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
@@ -330,6 +332,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
@@ -381,6 +391,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)
--
2.34.1
More information about the Linux-nvme
mailing list