Thread (4 messages) 4 messages, 1 author, 2021-07-05
STALE1826d

[PATCH v2 1/3] nvme: unify trace output of nvmet_trace_admin_get_features

From: Hou Pu <hidden>
Date: 2021-07-05 11:29:48
Subsystem: nvm express driver, nvm express target driver, the rest · Maintainers: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni, Linus Torvalds

Using ',' to separate different field like others in
nvmet_trace_admin_get_features. Also ouput uuid_index
in cdw14.

For example:
nvme get-feature -n 1 /dev/nvme0 -f 0xf

kworker/0:1H-56      [000] ....   283.696969: nvmet_req_init: nvmet1: qid=0, cmdid=21, nsid=1, flags=0x40, meta=0x0, cmd=(nvme_admin_get_features, fid=0xf, sel=0x0, cdw11=0x0, uuid_index=0x0)

Signed-off-by: Hou Pu <redacted>
---
 drivers/nvme/host/trace.c   | 4 +++-
 drivers/nvme/target/trace.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 6543015b6121..0e441bdad453 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -79,8 +79,10 @@ static const char *nvme_trace_admin_get_features(struct trace_seq *p,
 	u8 fid = cdw10[0];
 	u8 sel = cdw10[1] & 0x7;
 	u32 cdw11 = get_unaligned_le32(cdw10 + 4);
+	u8 uuid_index = cdw10[16] & 0x7f;
 
-	trace_seq_printf(p, "fid=0x%x sel=0x%x cdw11=0x%x", fid, sel, cdw11);
+	trace_seq_printf(p, "fid=0x%x, sel=0x%x, cdw11=0x%x, uuid_index=0x%x",
+			 fid, sel, cdw11, uuid_index);
 	trace_seq_putc(p, 0);
 
 	return ret;
diff --git a/drivers/nvme/target/trace.c b/drivers/nvme/target/trace.c
index 1373a3c67962..902500a57185 100644
--- a/drivers/nvme/target/trace.c
+++ b/drivers/nvme/target/trace.c
@@ -26,8 +26,10 @@ static const char *nvmet_trace_admin_get_features(struct trace_seq *p,
 	u8 fid = cdw10[0];
 	u8 sel = cdw10[1] & 0x7;
 	u32 cdw11 = get_unaligned_le32(cdw10 + 4);
+	u8 uuid_index = cdw10[16] & 0x7f;
 
-	trace_seq_printf(p, "fid=0x%x sel=0x%x cdw11=0x%x", fid, sel, cdw11);
+	trace_seq_printf(p, "fid=0x%x, sel=0x%x, cdw11=0x%x, uuid_index=0x%x",
+			 fid, sel, cdw11, uuid_index);
 	trace_seq_putc(p, 0);
 
 	return ret;
-- 
2.28.0


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help