From: Guixin Liu <kanie@linux.alibaba.com>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] nvmet: add tracing of zns commands
Date: Wed, 28 Feb 2024 16:33:52 +0800 [thread overview]
Message-ID: <8a4b7d61-ef9b-4c15-9a58-224ade1020bb@linux.alibaba.com> (raw)
In-Reply-To: <b6e63b26-f5df-4ead-aad6-06f7c214373e@nvidia.com>
在 2024/2/28 13:25, Chaitanya Kulkarni 写道:
> On 2/27/24 18:31, Guixin Liu wrote:
>> Add nvme_cmd_zone_append, nvme_cmd_zone_mgmt_send and
>> nvme_cmd_zone_mgmt_recv parse to nvme target tracing.
>>
>> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
>> ---
>> drivers/nvme/target/trace.c | 34 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 34 insertions(+)
>>
>> diff --git a/drivers/nvme/target/trace.c b/drivers/nvme/target/trace.c
>> index 657bd31841b2..6604e5fe57d8 100644
>> --- a/drivers/nvme/target/trace.c
>> +++ b/drivers/nvme/target/trace.c
>> @@ -119,6 +119,35 @@ const char *nvmet_trace_parse_admin_cmd(struct trace_seq *p,
>> }
>> }
>>
>> +static const char *nvmet_trace_zone_mgmt_send(struct trace_seq *p, u8 *cdw10)
>> +{
>> + const char *ret = trace_seq_buffer_ptr(p);
>> + u64 slba = get_unaligned_le64(cdw10);
>> + u8 zsa = cdw10[12];
>> + u8 all = cdw10[13];
>> +
>> + trace_seq_printf(p, "slba=%llu, zsa=%u, all=%u", slba, zsa, all);
>> + trace_seq_putc(p, 0);
>> +
>> + return ret;
>> +}
>> +
>> +static const char *nvmet_trace_zone_mgmt_recv(struct trace_seq *p, u8 *cdw10)
>> +{
>> + const char *ret = trace_seq_buffer_ptr(p);
>> + u64 slba = get_unaligned_le64(cdw10);
>> + u32 numd = get_unaligned_le32(cdw10 + 8);
> please use consistent notation :- &cdw10[8]
It will be changed in v3.
>> + u8 zra = cdw10[12];
>> + u8 zrasf = cdw10[13];
> why not decode zrasf values 0h-9h to make it more readable ?
> printing number only will make a trip to the spec since I don't think
> everyone will remember those values all the time , more importantly
> this will also help in testing to grep for right string when using zrasf.
>
> same goes for zsa I guess above ...
Agree, I will translate zrasf and zsa to a readble string, and print them.
Best Regards,
Guixin Liu
>
next prev parent reply other threads:[~2024-02-28 8:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 2:31 [PATCH v2 0/2] nvmet: add some commands tracing Guixin Liu
2024-02-28 2:31 ` [PATCH v2 1/2] nvmet: add tracing of zns commands Guixin Liu
2024-02-28 5:25 ` Chaitanya Kulkarni
2024-02-28 8:33 ` Guixin Liu [this message]
2024-02-28 2:31 ` [PATCH v2 2/2] nvmet: add tracing of authentication commands Guixin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a4b7d61-ef9b-4c15-9a58-224ade1020bb@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox