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

Sagi Grimberg sagi at grimberg.me
Thu Mar 7 04:03:47 PST 2024



On 07/03/2024 13:19, Hannes Reinecke wrote:
> 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.

Yes, I guess I was specifically asking about the failure to setup_auth 
in the re-auth case...



More information about the Linux-nvme mailing list