From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"kbusch@kernel.org" <kbusch@kernel.org>
Subject: Re: [PATCH 3/3] nvme: parse format command's lbafu when tracing
Date: Mon, 29 Jan 2024 11:01:55 +0000 [thread overview]
Message-ID: <ab356f7f-cc42-4e16-a771-d2eb15a3c449@nvidia.com> (raw)
In-Reply-To: <20240129082256.63239-4-kanie@linux.alibaba.com>
On 1/29/24 00:22, Guixin Liu wrote:
> Add the parse of format command's lbafu to calculate lbaf.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
> drivers/nvme/host/trace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
> index b383d51c1a0c..3ccb33646794 100644
> --- a/drivers/nvme/host/trace.c
> +++ b/drivers/nvme/host/trace.c
> @@ -119,7 +119,9 @@ static const char *nvme_trace_get_lba_status(struct trace_seq *p,
> static const char *nvme_trace_admin_format_nvm(struct trace_seq *p, u8 *cdw10)
> {
> const char *ret = trace_seq_buffer_ptr(p);
> - u8 lbaf = cdw10[0] & 0xF;
> + u8 lbafl = cdw10[0] & 0xF;
> + u8 lbafu = (cdw10[1] >> 4) & 0x3;
> + u8 lbaf = (lbafu << 4) | lbafl;
> u8 mset = (cdw10[0] >> 4) & 0x1;
> u8 pi = (cdw10[0] >> 5) & 0x7;
> u8 pil = cdw10[1] & 0x1;
as I don't see the newly added variables used in printing a trace do we
really need
the calculation or a meaningful comment is would work ?
-ck
next prev parent reply other threads:[~2024-01-29 11:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 8:22 [PATCH 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-29 8:22 ` [PATCH 1/3] nvme: add tracing of reservation commands Guixin Liu
2024-01-29 8:22 ` [PATCH 2/3] nvme: parse dsm command detailly when tracing Guixin Liu
2024-01-29 11:09 ` Chaitanya Kulkarni
2024-01-30 3:51 ` Guixin Liu
2024-01-30 8:05 ` Chaitanya Kulkarni
2024-01-30 8:35 ` Guixin Liu
2024-01-31 17:36 ` Keith Busch
2024-01-29 8:22 ` [PATCH 3/3] nvme: parse format command's lbafu " Guixin Liu
2024-01-29 11:01 ` Chaitanya Kulkarni [this message]
2024-01-30 3:37 ` 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=ab356f7f-cc42-4e16-a771-d2eb15a3c449@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--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