* [PATCH] nvme: Use command_id instead of req->tag in trace_nvme_complete_rq()
@ 2022-07-15 19:48 Bean Huo
2022-07-15 19:51 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Bean Huo @ 2022-07-15 19:48 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi, linux-nvme; +Cc: linux-kernel, beanhuo
From: Bean Huo <beanhuo@micron.com>
use command_id instead of req->tag in trace_nvme_complete_rq(),
because of commit e7006de6c238 ("nvme: code command_id with a genctr
for use authentication after release"), cmd->common.command_id is set to
((genctl & 0xf)< 12 | req->tag), no longer req->tag, which makes cid in
trace_nvme_complete_rq and trace_nvme_setup_cmd are not the same.
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
drivers/nvme/host/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
index b5f85259461a..fe8c90080731 100644
--- a/drivers/nvme/host/trace.h
+++ b/drivers/nvme/host/trace.h
@@ -98,7 +98,7 @@ TRACE_EVENT(nvme_complete_rq,
TP_fast_assign(
__entry->ctrl_id = nvme_req(req)->ctrl->instance;
__entry->qid = nvme_req_qid(req);
- __entry->cid = req->tag;
+ __entry->cid = nvme_req(req)->cmd->common.command_id;
__entry->result = le64_to_cpu(nvme_req(req)->result.u64);
__entry->retries = nvme_req(req)->retries;
__entry->flags = nvme_req(req)->flags;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: Use command_id instead of req->tag in trace_nvme_complete_rq()
2022-07-15 19:48 [PATCH] nvme: Use command_id instead of req->tag in trace_nvme_complete_rq() Bean Huo
@ 2022-07-15 19:51 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-07-15 19:51 UTC (permalink / raw)
To: Bean Huo, kbusch, axboe, hch, sagi, linux-nvme; +Cc: linux-kernel, beanhuo
On 7/15/22 1:48 PM, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
>
> use command_id instead of req->tag in trace_nvme_complete_rq(),
> because of commit e7006de6c238 ("nvme: code command_id with a genctr
> for use authentication after release"), cmd->common.command_id is set to
> ((genctl & 0xf)< 12 | req->tag), no longer req->tag, which makes cid in
> trace_nvme_complete_rq and trace_nvme_setup_cmd are not the same.
Needs a fixes tag.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-15 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 19:48 [PATCH] nvme: Use command_id instead of req->tag in trace_nvme_complete_rq() Bean Huo
2022-07-15 19:51 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox