public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Daniel Wagner <dwagner@suse.de>
Cc: Christoph Hellwig <hch@lst.de>,
	James Smart <james.smart@broadcom.com>,
	Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
	Hannes Reinecke <hare@suse.de>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Hannes Reinecke <hare@kernel.org>
Subject: Re: [PATCH v4 3/5] nvmet: return DHCHAP status codes from nvmet_setup_auth()
Date: Fri, 5 Apr 2024 16:47:52 +0200	[thread overview]
Message-ID: <20240405144752.GA6352@lst.de> (raw)
In-Reply-To: <3qh6d2fensgck2rodnbhreirfwkf7lloqwvk6gyfafu4fvgxss@jxb4b4kzu224>

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.

  parent reply	other threads:[~2024-04-05 14:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 15:44 [PATCH v4 0/5] nvme-fabrics: short-circuit connect retries Daniel Wagner
2024-04-04 15:44 ` [PATCH v4 1/5] nvme: authentication error are always non-retryable Daniel Wagner
2024-04-05  6:16   ` Christoph Hellwig
2024-04-05  6:45     ` Daniel Wagner
2024-04-05  6:49       ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 2/5] nvmet: lock config semaphore when accessing DH-HMAC-CHAP key Daniel Wagner
2024-04-05  6:16   ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 3/5] nvmet: return DHCHAP status codes from nvmet_setup_auth() Daniel Wagner
2024-04-05  6:20   ` Christoph Hellwig
2024-04-05 10:02     ` Daniel Wagner
2024-04-05 13:24       ` Daniel Wagner
2024-04-05 14:47       ` Christoph Hellwig [this message]
2024-04-05 14:50         ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 4/5] nvme-tcp: short-circuit reconnect retries Daniel Wagner
2024-04-04 15:45 ` [PATCH v4 5/5] nvme-rdma: " Daniel Wagner
2024-04-04 15:50 ` [PATCH v4 0/5] nvme-fabrics: short-circuit connect retries Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240405144752.GA6352@lst.de \
    --to=hch@lst.de \
    --cc=dwagner@suse.de \
    --cc=hare@kernel.org \
    --cc=hare@suse.de \
    --cc=james.smart@broadcom.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox