Linux-NVME Archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Daniel Wagner <dwagner@suse.de>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>
Subject: Re: Is idenditfy ctrl cmd supposed to return a 'result' for RDMA?
Date: Fri, 12 Apr 2024 08:10:56 +0200	[thread overview]
Message-ID: <20240412061056.GA32319@lst.de> (raw)
In-Reply-To: <gzutb6z3rv377tazt3evxetc3w3uggw7gx52p3edoiubzgry6j@hcfmkjj3iodp>

On Thu, Apr 11, 2024 at 09:24:20PM +0200, Daniel Wagner wrote:
> On Thu, Apr 11, 2024 at 12:51:40PM +0200, Daniel Wagner wrote:
> > but got a bit lost in the RDMA code. So I am not sure, is this supposed to
> > happen?
> 
> After reading up in the spec, it doesn't seem so. After adding

I don't think anything requires reserved fields to be cleared, at least
I can't find anything in the spec.

> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index f5b7054a4a05..a297020f4bea 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -486,6 +486,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
> 
>         kfree(id);
>  out:
> +       req->cqe->result.u64 = 0;
>         nvmet_req_complete(req, status);
>  }
> 
> 
> the problem goes away. I've also noticed that many other commands return
> a lot of 'funky' results as well. I haven't understood why setting
> the result explicitly to 0 is necessary for RDMA yet.

that being said I'm fine with clearing the CQE, but can we find a way
to do this in common code?


      reply	other threads:[~2024-04-12  6:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 10:51 Is idenditfy ctrl cmd supposed to return a 'result' for RDMA? Daniel Wagner
2024-04-11 19:24 ` Daniel Wagner
2024-04-12  6:10   ` Christoph Hellwig [this message]

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=20240412061056.GA32319@lst.de \
    --to=hch@lst.de \
    --cc=dwagner@suse.de \
    --cc=kbusch@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).