Is idenditfy ctrl cmd supposed to return a 'result' for RDMA?

Christoph Hellwig hch at lst.de
Thu Apr 11 23:10:56 PDT 2024


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?



More information about the Linux-nvme mailing list