[PATCH v2 1/3] nvme: unify trace output of nvmet_trace_admin_get_features
Hou Pu
houpu.main at gmail.com
Mon Jul 5 04:28:16 PDT 2021
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 <houpu.main at gmail.com>
---
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
More information about the Linux-nvme
mailing list