[RFC PATCH] nvmet: set sq_id to zero in NVMe-oF CQE

Keith Busch kbusch at kernel.org
Mon Sep 22 10:17:27 PDT 2025


On Sun, Sep 21, 2025 at 05:06:01PM +0000, Engel, Amit wrote:
> @@ -741,7 +741,8 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
>  
>  	if (!req->sq->sqhd_disabled)
>  		nvmet_update_sq_head(req);
> -	req->cqe->sq_id = cpu_to_le16(req->sq->qid);
> +	/* sq_id is reserved for NVMe-oF */
> +	req->cqe->sq_id = 0;

What's the point of doing this per-io? No one ever sets the sq_id to a
non-zero value, and it looks like everyone has the memory cleared when
it's allocated. Is this actually fixing anything?



More information about the Linux-nvme mailing list