All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] nvme: add tracing of zns commands
Date: Fri, 29 Jan 2021 03:48:32 +0000	[thread overview]
Message-ID: <CH2PR04MB6522315BC122D9F1CFE645C1E7B99@CH2PR04MB6522.namprd04.prod.outlook.com> (raw)
In-Reply-To: 46eeed2fcf2530d02fe5727a0a91a6e4675f6edd.1611683161.git.johannes.thumshirn@wdc.com

On 2021/01/27 7:14, Johannes Thumshirn wrote:
> When support for the NVMe ZNS commands was merged, tracing of these has
> been omitted.
> 
> Add nvme_cmd_zone_mgmt_send, nvme_cmd_zone_mgmt_recv as well as
> nvme_cmd_zone_append to the nvme driver's tracing facility.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  drivers/nvme/host/trace.c | 34 ++++++++++++++++++++++++++++++++++
>  include/linux/nvme.h      |  6 +++++-
>  2 files changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
> index 5c3cb6928f3c..9f9b6108de7d 100644
> --- a/drivers/nvme/host/trace.c
> +++ b/drivers/nvme/host/trace.c
> @@ -131,6 +131,35 @@ static const char *nvme_trace_dsm(struct trace_seq *p, u8 *cdw10)
>  	return ret;
>  }
>  
> +static const char *nvme_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 *nvme_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);
> +	u8 zra = cdw10[12];
> +	u8 zrasf = cdw10[13];
> +	u8 pr = cdw10[14];
> +
> +	trace_seq_printf(p, "slba=%llu, numd=%u, zra=%u, zrasf=%u, pr=%u",
> +			 slba, numd, zra, zrasf, pr);
> +	trace_seq_putc(p, 0);
> +
> +	return ret;
> +}
> +
>  static const char *nvme_trace_common(struct trace_seq *p, u8 *cdw10)
>  {
>  	const char *ret = trace_seq_buffer_ptr(p);
> @@ -171,9 +200,14 @@ const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
>  	case nvme_cmd_read:
>  	case nvme_cmd_write:
>  	case nvme_cmd_write_zeroes:
> +	case nvme_cmd_zone_append:
>  		return nvme_trace_read_write(p, cdw10);
>  	case nvme_cmd_dsm:
>  		return nvme_trace_dsm(p, cdw10);
> +	case nvme_cmd_zone_mgmt_send:
> +		return nvme_trace_zone_mgmt_send(p, cdw10);
> +	case nvme_cmd_zone_mgmt_recv:
> +		return nvme_trace_zone_mgmt_recv(p, cdw10);
>  	default:
>  		return nvme_trace_common(p, cdw10);
>  	}
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index bfed36e342cc..325dcdd221de 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -697,7 +697,11 @@ enum nvme_opcode {
>  		nvme_opcode_name(nvme_cmd_resv_register),	\
>  		nvme_opcode_name(nvme_cmd_resv_report),		\
>  		nvme_opcode_name(nvme_cmd_resv_acquire),	\
> -		nvme_opcode_name(nvme_cmd_resv_release))
> +		nvme_opcode_name(nvme_cmd_resv_release),	\
> +		nvme_opcode_name(nvme_cmd_zone_mgmt_send),	\
> +		nvme_opcode_name(nvme_cmd_zone_mgmt_recv),	\
> +		nvme_opcode_name(nvme_cmd_zone_append))
> +
>  
>  
>  /*
> 

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

-- 
Damien Le Moal
Western Digital Research

WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] nvme: add tracing of zns commands
Date: Fri, 29 Jan 2021 03:48:32 +0000	[thread overview]
Message-ID: <CH2PR04MB6522315BC122D9F1CFE645C1E7B99@CH2PR04MB6522.namprd04.prod.outlook.com> (raw)
In-Reply-To: 46eeed2fcf2530d02fe5727a0a91a6e4675f6edd.1611683161.git.johannes.thumshirn@wdc.com

On 2021/01/27 7:14, Johannes Thumshirn wrote:
> When support for the NVMe ZNS commands was merged, tracing of these has
> been omitted.
> 
> Add nvme_cmd_zone_mgmt_send, nvme_cmd_zone_mgmt_recv as well as
> nvme_cmd_zone_append to the nvme driver's tracing facility.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  drivers/nvme/host/trace.c | 34 ++++++++++++++++++++++++++++++++++
>  include/linux/nvme.h      |  6 +++++-
>  2 files changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
> index 5c3cb6928f3c..9f9b6108de7d 100644
> --- a/drivers/nvme/host/trace.c
> +++ b/drivers/nvme/host/trace.c
> @@ -131,6 +131,35 @@ static const char *nvme_trace_dsm(struct trace_seq *p, u8 *cdw10)
>  	return ret;
>  }
>  
> +static const char *nvme_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 *nvme_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);
> +	u8 zra = cdw10[12];
> +	u8 zrasf = cdw10[13];
> +	u8 pr = cdw10[14];
> +
> +	trace_seq_printf(p, "slba=%llu, numd=%u, zra=%u, zrasf=%u, pr=%u",
> +			 slba, numd, zra, zrasf, pr);
> +	trace_seq_putc(p, 0);
> +
> +	return ret;
> +}
> +
>  static const char *nvme_trace_common(struct trace_seq *p, u8 *cdw10)
>  {
>  	const char *ret = trace_seq_buffer_ptr(p);
> @@ -171,9 +200,14 @@ const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
>  	case nvme_cmd_read:
>  	case nvme_cmd_write:
>  	case nvme_cmd_write_zeroes:
> +	case nvme_cmd_zone_append:
>  		return nvme_trace_read_write(p, cdw10);
>  	case nvme_cmd_dsm:
>  		return nvme_trace_dsm(p, cdw10);
> +	case nvme_cmd_zone_mgmt_send:
> +		return nvme_trace_zone_mgmt_send(p, cdw10);
> +	case nvme_cmd_zone_mgmt_recv:
> +		return nvme_trace_zone_mgmt_recv(p, cdw10);
>  	default:
>  		return nvme_trace_common(p, cdw10);
>  	}
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index bfed36e342cc..325dcdd221de 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -697,7 +697,11 @@ enum nvme_opcode {
>  		nvme_opcode_name(nvme_cmd_resv_register),	\
>  		nvme_opcode_name(nvme_cmd_resv_report),		\
>  		nvme_opcode_name(nvme_cmd_resv_acquire),	\
> -		nvme_opcode_name(nvme_cmd_resv_release))
> +		nvme_opcode_name(nvme_cmd_resv_release),	\
> +		nvme_opcode_name(nvme_cmd_zone_mgmt_send),	\
> +		nvme_opcode_name(nvme_cmd_zone_mgmt_recv),	\
> +		nvme_opcode_name(nvme_cmd_zone_append))
> +
>  
>  
>  /*
> 

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

-- 
Damien Le Moal
Western Digital Research

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2021-01-29  3:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 17:50 [PATCH] nvme: add tracing of zns commands Johannes Thumshirn
2021-01-26 17:50 ` Johannes Thumshirn
2021-01-27 17:46 ` Christoph Hellwig
2021-01-27 17:46   ` Christoph Hellwig
2021-01-29  3:48 ` Damien Le Moal [this message]
2021-01-29  3:48   ` Damien Le Moal

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=CH2PR04MB6522315BC122D9F1CFE645C1E7B99@CH2PR04MB6522.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.