lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a7eef2d-6977-2999-8dff-2751e020a077@suse.de>
Date:   Tue, 16 Jan 2018 12:28:05 +0100
From:   Hannes Reinecke <hare@...e.de>
To:     Johannes Thumshirn <jthumshirn@...e.de>,
        Christoph Hellwig <hch@....de>
Cc:     Sagi Grimberg <sagi@...mberg.me>,
        Keith Busch <keith.busch@...el.com>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>
Subject: Re: [PATCH 2/2] nvme: add tracepoint for nvme_complete_rq

On 01/16/2018 11:34 AM, Johannes Thumshirn wrote:
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
>  drivers/nvme/host/core.c    |  2 ++
>  include/trace/events/nvme.h | 31 +++++++++++++++++++++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 4b6a56fe6ccf..bac4559d6134 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -258,6 +258,8 @@ static inline bool nvme_req_needs_retry(struct request *req)
>  
>  void nvme_complete_rq(struct request *req)
>  {
> +	trace_nvme_complete_rq(nvme_req(req), req->tag);
> +
>  	if (unlikely(nvme_req(req)->status && nvme_req_needs_retry(req))) {
>  		if (nvme_req_needs_failover(req)) {
>  			nvme_failover_req(req);
> diff --git a/include/trace/events/nvme.h b/include/trace/events/nvme.h
> index 2e93bc7d4f84..d47bd9223241 100644
> --- a/include/trace/events/nvme.h
> +++ b/include/trace/events/nvme.h
> @@ -9,6 +9,8 @@
>  #include <linux/tracepoint.h>
>  #include <linux/trace_seq.h>
>  
> +#include "../../../drivers/nvme/host/nvme.h"
> +
>  #define nvme_opcode_name(opcode)	{ opcode, #opcode }
>  #define show_opcode_name(val)					\
>  	__print_symbolic(val,					\
> @@ -58,6 +60,35 @@ TRACE_EVENT(nvme_setup_cmd,
>  		      __parse_nvme_cmd(__entry->cmnd))
>  );
>  
> +TRACE_EVENT(nvme_complete_rq,
> +
> +	    TP_PROTO(struct nvme_request *req, int tag),
> +
> +	    TP_ARGS(req, tag),
> +
> +	    TP_STRUCT__entry(
> +		    __field(    int, cid     )
> +		    __field( __le64, result  )
> +		    __field(     u8, retries )
> +		    __field(     u8, flags   )
> +		    __field(    u16, status  )
> +	    ),
> +
> +	    TP_fast_assign(
> +		    __entry->cid     = tag;
> +		    __entry->result  = req->result.u64;
> +		    __entry->retries = req->retries;
> +		    __entry->flags   = req->flags;
> +		    __entry->status  = req->status;
> +	    ),
> +
> +	    TP_printk("command_id=%u, result=%llu, retries=%u, flags=0x%x, status=%u",
> +		      __entry->cid,
> +		      (unsigned long long)le64_to_cpu(__entry->result),
> +		      __entry->retries, __entry->flags, __entry->status)
> +
> +);
> +
>  #endif /* _TRACE_NVME_H */
>  
>  /* This part must be boutside protection */
> 
Again, 'boutside' protection ...

Other than that:

Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ