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

Hannes Reinecke hare at suse.de
Mon Nov 22 01:24:01 PST 2021


On 11/22/21 9:52 AM, Sagi Grimberg wrote:
> 
> 
> 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?

That's what I had initially, but then moved away from it seeing that
I'll have to have these functions anyway.

But sure, can do that ...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare at suse.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)



More information about the Linux-nvme mailing list