Re: [net-next PATCH] octeontx2: Improve mailbox tracepoints for debugging

From: Jacob Keller
Date: Thu May 30 2024 - 14:24:19 EST




On 5/30/2024 4:53 AM, Subbaraya Sundeep wrote:
> The tracepoints present currently wrt mailbox do not
> provide enough information to debug mailbox activity.
> For a VF to send a message to AF, VF sends message to PF
> and PF forwards it to AF. This involves stages of
> PF receiving interrupt from VF, forwarding to AF, AF
> processing and sending response back to PF, PF sending back
> the response to VF. This patch adds pcifunc which represents
> PF and VF device to the tracepoints otx2_msg_alloc,
> otx2_msg_send, otx2_msg_process so that it is easier
> to correlate which device allocated the message, which
> device forwarded it and which device processed that message.
> Also add message id in otx2_msg_send tracepoint and new
> tracepoint otx2_msg_status to display the status at each
> stage.
>
> Below is the trace log when a VF sends a message to AF with
> this patch in place:
>
> ifconfig-523 [001] .... 146.134718: otx2_msg_alloc: [0002:05:00.1]
> msg:(NIX_RSS_FLOWKEY_CFG) size:28 pcifunc:0x1001
>
> ifconfig-523 [001] ...1 146.134719: otx2_msg_send: [0002:05:00.1]
> sent 1 msg(s) of size:32 msg:(NIX_RSS_FLOWKEY_CFG) pcifunc:0x1001
>
> <idle>-0 [000] d.h1 146.134722: otx2_msg_interrupt: [0002:05:00.0]
> mbox interrupt VF(s) to PF (0x1)
>
> kworker/u49:2-238 [002] .... 146.134723: otx2_msg_status: [0002:05:00.0]
> PF-VF down queue handler(forwarding) num_msgs:1
>
> kworker/u49:2-238 [002] ...1 146.134724: otx2_msg_send: [0002:05:00.0]
> sent 1 msg(s) of size:32 msg:(NIX_RSS_FLOWKEY_CFG) pcifunc:0x1001
>
> <idle>-0 [000] d.h1 146.134726: otx2_msg_interrupt: [0002:01:00.0]
> mbox interrupt PF(s) to AF (0x10)
>
> kworker/u49:1-184 [000] .... 146.134739: otx2_msg_process: [0002:01:00.0]
> msg:(NIX_RSS_FLOWKEY_CFG) error:0 pcifunc:0x1001
>
> kworker/u49:1-184 [000] ...1 146.134740: otx2_msg_send: [0002:01:00.0]
> sent 1 msg(s) of size:32 msg:(NIX_RSS_FLOWKEY_CFG) pcifunc:0x1001
>
> <idle>-0 [000] dNh2 146.134742: otx2_msg_interrupt: [0002:05:00.0]
> mbox interrupt DOWN reply from AF to PF (0x1)
>
> <idle>-0 [000] dNh2 146.134742: otx2_msg_status: [0002:05:00.0]
> PF-AF down work queued(interrupt) num_msgs:1
>
> kworker/u49:1-184 [000] .... 146.134743: otx2_msg_status: [0002:05:00.0]
> PF-AF down queue handler(response) num_msgs:1
>
> <idle>-0 [000] d.h1 146.135730: otx2_msg_interrupt: [0002:05:00.1]
> mbox interrupt DOWN reply from PF to VF (0x1)
>
> Signed-off-by: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>

Makes sense.

Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>