Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Keith Busch <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 05/10] nvme/rc: add more arguments to _nvme_connect_subsys()
Date: Tue, 14 Jun 2022 04:23:49 +0000	[thread overview]
Message-ID: <20220614042348.jb3i7wjmbbzdfmxn@shindev> (raw)
In-Reply-To: <20220610113324.10294-6-hare@suse.de>

On Jun 10, 2022 / 13:33, Hannes Reinecke wrote:
> From: Hannes Reinecke <hare@suse.com>
> 
> Add optional arguments for setting 'hostnqn', 'hostid', 'hostkey',
> and 'ctrlkey' to _nvme_connect_subsys() to make it usable for
> testing nvme in-band authentication.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  tests/nvme/rc | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/tests/nvme/rc b/tests/nvme/rc
> index 2873037..b7bb3cd 100644
> --- a/tests/nvme/rc
> +++ b/tests/nvme/rc
> @@ -190,11 +190,27 @@ _nvme_connect_subsys() {
>  	local subsysnqn="$2"
>  	local traddr="${3:-$def_traddr}"
>  	local trsvcid="${4:-$def_trsvcid}"
> +	local hostnqn="${5:-$def_hostnqn}"
> +	local hostid="${6:-$def_hostid}"

I can not find def_hostnqn and def_hostid defined. Did they slip out from this
series?

> +	local hostkey="${7}"
> +	local ctrlkey="${8}"
>  
>  	ARGS=(-t "${trtype}" -n "${subsysnqn}")
>  	if [[ "${trtype}" != "loop" ]]; then
>  		ARGS+=(-a "${traddr}" -s "${trsvcid}")
>  	fi
> +	if [[ "${hostnqn}" != "$def_hostnqn" ]]; then
> +		ARGS+=(--hostnqn="${hostnqn}")
> +	fi
> +	if [[ "${hostid}" != "$def_hostid" ]]; then
> +		ARGS+=(--hostid="${hostid}")
> +	fi
> +	if [[ -n "${hostkey}" ]]; then
> +		ARGS+=(--dhchap-secret="${hostkey}")
> +	fi
> +	if [[ -n "${ctrlkey}" ]]; then
> +		ARGS+=(--dhchap-ctrl-secret="${ctrlkey}")
> +	fi
>  	nvme connect "${ARGS[@]}"
>  }
>  
> -- 
> 2.26.2
> 
> 

-- 
Shin'ichiro Kawasaki

  reply	other threads:[~2022-06-14  4:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 11:33 [PATCHv5 blktests 00/10] Testsuite for nvme in-band authentication Hannes Reinecke
2022-06-10 11:33 ` [PATCH 01/10] nvme/rc: do not print error message when no nvme device is found Hannes Reinecke
2022-06-10 11:33 ` [PATCH 02/10] nvme/rc: clear allowed_hosts subdirectory Hannes Reinecke
2022-06-14  4:12   ` Shinichiro Kawasaki
2022-06-20  6:53     ` Hannes Reinecke
2022-06-10 11:33 ` [PATCH 03/10] nvme/rc: clear hosts directory in _cleanup_nvmet() Hannes Reinecke
2022-06-10 11:33 ` [PATCH 04/10] nvme/rc: add functions for in-band authentication Hannes Reinecke
2022-06-10 11:33 ` [PATCH 05/10] nvme/rc: add more arguments to _nvme_connect_subsys() Hannes Reinecke
2022-06-14  4:23   ` Shinichiro Kawasaki [this message]
2022-06-20  6:55     ` Hannes Reinecke
2022-06-10 11:33 ` [PATCH 06/10] nvme/040: create authenticated connections Hannes Reinecke
2022-06-14  4:36   ` Shinichiro Kawasaki
2022-06-20  6:56     ` Hannes Reinecke
2022-06-10 11:33 ` [PATCH 07/10] nvme/041: test dhchap key types for " Hannes Reinecke
2022-06-14  4:43   ` Shinichiro Kawasaki
2022-06-20  6:56     ` Hannes Reinecke
2022-06-10 11:33 ` [PATCH 08/10] nvme/042: test hash and dh group variations " Hannes Reinecke
2022-06-10 11:33 ` [PATCH 09/10] nvme/043: test bi-directional authentication Hannes Reinecke
2022-06-10 11:33 ` [PATCH 10/10] nvme/044: test re-authentication Hannes Reinecke
2022-06-14  5:07 ` [PATCHv5 blktests 00/10] Testsuite for nvme in-band authentication Shinichiro Kawasaki
  -- strict thread matches above, loose matches on Subject: below --
2022-03-28 10:18 [PATCHv4 " Hannes Reinecke
2022-03-28 10:18 ` [PATCH 05/10] nvme/rc: add more arguments to _nvme_connect_subsys() Hannes Reinecke
2021-11-23  7:49 [PATCHv3 blktests 00/10] Testsuite for nvme in-band authentication Hannes Reinecke
2021-11-23  7:49 ` [PATCH 05/10] nvme/rc: add more arguments to _nvme_connect_subsys() Hannes Reinecke
2021-12-13 22:51   ` Chaitanya Kulkarni

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=20220614042348.jb3i7wjmbbzdfmxn@shindev \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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