lkml.org 
[lkml]   [2024]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/5] nvmet: return DHCHAP status codes from nvmet_setup_auth()
On Fri, Apr 05, 2024 at 12:02:51PM +0200, Daniel Wagner wrote:
> > > if (!host) {
> > > pr_debug("host %s not found\n", ctrl->hostnqn);
> > > - ret = -EPERM;
> > > + ret = NVME_AUTH_DHCHAP_FAILURE_FAILED;
> > > goto out_unlock;
> >
> > This is now returning returning random on the wire fields that aren't
> > even the NVMe status codes from a function otherwise returning Linux
> > errno values. I can't see how this works or is maintainable long term.
>
> This is the target side and we generate the on wire return code here.

True.

> Are you sure I should map this to errno codes and the back to NVME
> status codes? Sure, this is possible but don't really think it makes
> sense.

No, but we should not overload the return value. Pass in the req
or sq, or add a new paramter for the auth fail reason.

\
 
 \ /
  Last update: 2024-05-27 16:26    [W:0.172 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site