[PATCH 3/4] nvmet: return DHCHAP status codes from nvmet_setup_auth()

Hannes Reinecke hare at suse.de
Thu Mar 7 03:19:36 PST 2024


On 3/7/24 09:56, Sagi Grimberg wrote:
> 
> 
> On 01/03/2024 13:28, Hannes Reinecke wrote:
>> A failure in nvmet_setup_auth() does not mean that the NVMe
>> authentication command failed, so we should rather return a
>> protocol error with a 'failure1' response than an NVMe status.
> 
> Shouldn't nvmet reply NVME_SC_INTERNAL like in other similar
> cases?

No. NVME_SC_INTERNAL will be converted into a status code for the 
authentication _command_, indicating that the authentication
_command_ encountered an error.
But authentication _command_ is fine (ie it got send and received
okay). It's the authentication itself which failed, so we need to
return an authentication protocol failure state.

Cheers,

Hannes




More information about the Linux-nvme mailing list