[PATCH] nvme-tcp: add additional info for nvme_tcp_timeout log

Engel, Amit Amit.Engel at Dell.com
Wed Dec 7 05:42:42 PST 2022


Hi Sagi, 

Do you mean show_opcode_name() macro which is defined as part of TRACE_EVENT?

As far as I understand, I can't use show_opcode_name() directly outside of TRACE_EVENT

Can you please share an example?

Thanks in advance,
Amit 

-----Original Message-----
From: Sagi Grimberg <sagi at grimberg.me> 
Sent: Wednesday, 7 December 2022 13:20
To: Engel, Amit <Amit.Engel at Dell.com>; linux-nvme at lists.infradead.org
Subject: Re: [PATCH] nvme-tcp: add additional info for nvme_tcp_timeout log


[EXTERNAL EMAIL] 


> From: Amit Engel <Amit.Engel at dell.com>
> 
> This provides additional details about the rq/cmd that is timed out
> 
> Signed-off-by: Amit Engel <Amit.Engel at dell.com>
> ---
>   drivers/nvme/host/tcp.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 
> 1eed0fc26b3a..f2be7c23ace5 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2277,8 +2277,9 @@ static enum blk_eh_timer_return nvme_tcp_timeout(struct request *rq)
>   	struct nvme_tcp_cmd_pdu *pdu = req->pdu;
>   
>   	dev_warn(ctrl->device,
> -		"queue %d: timeout request %#x type %d\n",
> -		nvme_tcp_queue_id(req->queue), rq->tag, pdu->hdr.type);
> +		"queue %d: timeout cid %#x opcode %#x type %d\n",

How about using show_opcode_name() instead (or in addition).


More information about the Linux-nvme mailing list