public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Aurelien Aptel <aaptel@nvidia.com>
To: aaptel@nvidia.com, linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org
Cc: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Daniel Wagner <dwagner@suse.de>, Shai Malin <smalin@nvidia.com>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH blktests v4 2/5] common/nvme: add digest options to __nvme_connect_subsys()
Date: Tue, 26 Nov 2024 22:38:53 +0200	[thread overview]
Message-ID: <20241126203857.27210-3-aaptel@nvidia.com> (raw)
In-Reply-To: <20241126203857.27210-1-aaptel@nvidia.com>

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

Signed-off-by: Aurelien Aptel <aaptel@nvidia.com>
Reviewed-by: Daniel Wagner <dwagner@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



  parent reply	other threads:[~2024-11-26 20:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 20:38 [PATCH blktests v4 0/5] Add support to run against arbitrary targets Aurelien Aptel
2024-11-26 20:38 ` [PATCH blktests v4 1/5] nvme/rc: introduce remote target support Aurelien Aptel
2024-11-29 10:01   ` Shinichiro Kawasaki
2024-12-02 10:23     ` Aurelien Aptel
2024-11-26 20:38 ` Aurelien Aptel [this message]
2024-11-26 20:38 ` [PATCH blktests v4 3/5] nvme/030: only run against kernel soft target Aurelien Aptel
2024-11-26 20:38 ` [PATCH blktests v4 4/5] contrib: add remote target setup/cleanup script Aurelien Aptel
2024-11-26 20:38 ` [PATCH blktests v4 5/5] nvme/055: add test for nvme-tcp zero-copy offload Aurelien Aptel
2024-11-29 10:20   ` Shinichiro Kawasaki
2024-12-02 10:09     ` Aurelien Aptel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241126203857.27210-3-aaptel@nvidia.com \
    --to=aaptel@nvidia.com \
    --cc=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=smalin@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox