[PATCH 3/9] nvme/rc: add functions for in-band authentication

Sagi Grimberg sagi at grimberg.me
Mon Nov 22 00:52:20 PST 2021



On 11/22/21 9:55 AM, Hannes Reinecke wrote:
> Add functions to enable in-band authentication.
> 
> Signed-off-by: Hannes Reinecke <hare at suse.de>
> ---
>   tests/nvme/rc | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 54 insertions(+)
> 
> diff --git a/tests/nvme/rc b/tests/nvme/rc
> index aa223df..7d05e4a 100644
> --- a/tests/nvme/rc
> +++ b/tests/nvme/rc
> @@ -247,6 +247,17 @@ _create_nvmet_subsystem() {
>   	_create_nvmet_ns "${nvmet_subsystem}" "1" "${blkdev}" "${uuid}"
>   }
>   
> +_create_nvmet_host() {
> +	local nvmet_subsystem="$1"
> +	local nvmet_hostnqn="$2"
> +	local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
> +
> +	mkdir "${NVMET_CFS}/hosts/${nvmet_hostnqn}"
> +	echo 0 > "${cfs_path}/attr_allow_any_host"
> +	ln -s "${NVMET_CFS}/hosts/${nvmet_hostnqn}" \
> +	   "${cfs_path}/allowed_hosts/${nvmet_hostnqn}"
> +}

I'd say that perhaps we can add optional parameters for
host key,hash,dhgrp so that simple tests can just add
a host with these params set?



More information about the Linux-nvme mailing list