Commit 3bdba2c7 authored by Jerin Jacob's avatar Jerin Jacob Committed by David S. Miller

octeontx2-af: Enhance mailbox trace entry

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: default avatarJerin Jacob <jerinj@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 356ae88f
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <linux/pci.h> #include <linux/pci.h>
#include "mbox.h"
TRACE_EVENT(otx2_msg_alloc, TRACE_EVENT(otx2_msg_alloc,
TP_PROTO(const struct pci_dev *pdev, u16 id, u64 size), TP_PROTO(const struct pci_dev *pdev, u16 id, u64 size),
TP_ARGS(pdev, id, size), TP_ARGS(pdev, id, size),
...@@ -25,8 +27,8 @@ TRACE_EVENT(otx2_msg_alloc, ...@@ -25,8 +27,8 @@ TRACE_EVENT(otx2_msg_alloc,
__entry->id = id; __entry->id = id;
__entry->size = size; __entry->size = size;
), ),
TP_printk("[%s] msg:(0x%x) size:%lld\n", __get_str(dev), TP_printk("[%s] msg:(%s) size:%lld\n", __get_str(dev),
__entry->id, __entry->size) otx2_mbox_id2name(__entry->id), __entry->size)
); );
TRACE_EVENT(otx2_msg_send, TRACE_EVENT(otx2_msg_send,
...@@ -88,8 +90,8 @@ TRACE_EVENT(otx2_msg_process, ...@@ -88,8 +90,8 @@ TRACE_EVENT(otx2_msg_process,
__entry->id = id; __entry->id = id;
__entry->err = err; __entry->err = err;
), ),
TP_printk("[%s] msg:(0x%x) error:%d\n", __get_str(dev), TP_printk("[%s] msg:(%s) error:%d\n", __get_str(dev),
__entry->id, __entry->err) otx2_mbox_id2name(__entry->id), __entry->err)
); );
#endif /* __RVU_TRACE_H */ #endif /* __RVU_TRACE_H */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment