Skip to content

Commit

Permalink
octeontx2-af: Enhance mailbox trace entry
Browse files Browse the repository at this point in the history
Added mailbox id to name translation on trace entry for
better tracing output.

Before the change:
otx2_msg_process: [0002:01:00.0] msg:(0x03) error:0

After the change:
otx2_msg_process: [0002:01:00.0] msg:(DETACH_RESOURCES) error:0

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jerin Jacob authored and David S. Miller committed Jul 23, 2021
1 parent 356ae88 commit 3bdba2c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <linux/tracepoint.h>
#include <linux/pci.h>

#include "mbox.h"

TRACE_EVENT(otx2_msg_alloc,
TP_PROTO(const struct pci_dev *pdev, u16 id, u64 size),
TP_ARGS(pdev, id, size),
Expand All @@ -25,8 +27,8 @@ TRACE_EVENT(otx2_msg_alloc,
__entry->id = id;
__entry->size = size;
),
TP_printk("[%s] msg:(0x%x) size:%lld\n", __get_str(dev),
__entry->id, __entry->size)
TP_printk("[%s] msg:(%s) size:%lld\n", __get_str(dev),
otx2_mbox_id2name(__entry->id), __entry->size)
);

TRACE_EVENT(otx2_msg_send,
Expand Down Expand Up @@ -88,8 +90,8 @@ TRACE_EVENT(otx2_msg_process,
__entry->id = id;
__entry->err = err;
),
TP_printk("[%s] msg:(0x%x) error:%d\n", __get_str(dev),
__entry->id, __entry->err)
TP_printk("[%s] msg:(%s) error:%d\n", __get_str(dev),
otx2_mbox_id2name(__entry->id), __entry->err)
);

#endif /* __RVU_TRACE_H */
Expand Down

0 comments on commit 3bdba2c

Please sign in to comment.