0001
0002
0003
0004
0005
0006 #undef TRACE_SYSTEM
0007 #define TRACE_SYSTEM dpaa_eth
0008
0009 #if !defined(_DPAA_ETH_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
0010 #define _DPAA_ETH_TRACE_H
0011
0012 #include <linux/skbuff.h>
0013 #include <linux/netdevice.h>
0014 #include "dpaa_eth.h"
0015 #include <linux/tracepoint.h>
0016
0017 #define fd_format_name(format) { qm_fd_##format, #format }
0018 #define fd_format_list \
0019 fd_format_name(contig), \
0020 fd_format_name(sg)
0021
0022
0023
0024
0025
0026
0027
0028
0029 DECLARE_EVENT_CLASS(dpaa_eth_fd,
0030
0031 TP_PROTO(struct net_device *netdev,
0032 struct qman_fq *fq,
0033 const struct qm_fd *fd),
0034
0035
0036 TP_ARGS(netdev, fq, fd),
0037
0038
0039
0040
0041
0042 TP_STRUCT__entry(
0043 __field(u32, fqid)
0044 __field(u64, fd_addr)
0045 __field(u8, fd_format)
0046 __field(u16, fd_offset)
0047 __field(u32, fd_length)
0048 __field(u32, fd_status)
0049 __string(name, netdev->name)
0050 ),
0051
0052
0053 TP_fast_assign(
0054 __entry->fqid = fq->fqid;
0055 __entry->fd_addr = qm_fd_addr_get64(fd);
0056 __entry->fd_format = qm_fd_get_format(fd);
0057 __entry->fd_offset = qm_fd_get_offset(fd);
0058 __entry->fd_length = qm_fd_get_length(fd);
0059 __entry->fd_status = fd->status;
0060 __assign_str(name, netdev->name);
0061 ),
0062
0063
0064 TP_printk("[%s] fqid=%d, fd: addr=0x%llx, format=%s, off=%u, len=%u, status=0x%08x",
0065 __get_str(name), __entry->fqid, __entry->fd_addr,
0066 __print_symbolic(__entry->fd_format, fd_format_list),
0067 __entry->fd_offset, __entry->fd_length, __entry->fd_status)
0068 );
0069
0070
0071
0072
0073
0074
0075 DEFINE_EVENT(dpaa_eth_fd, dpaa_tx_fd,
0076
0077 TP_PROTO(struct net_device *netdev,
0078 struct qman_fq *fq,
0079 const struct qm_fd *fd),
0080
0081 TP_ARGS(netdev, fq, fd)
0082 );
0083
0084
0085 DEFINE_EVENT(dpaa_eth_fd, dpaa_rx_fd,
0086
0087 TP_PROTO(struct net_device *netdev,
0088 struct qman_fq *fq,
0089 const struct qm_fd *fd),
0090
0091 TP_ARGS(netdev, fq, fd)
0092 );
0093
0094
0095 DEFINE_EVENT(dpaa_eth_fd, dpaa_tx_conf_fd,
0096
0097 TP_PROTO(struct net_device *netdev,
0098 struct qman_fq *fq,
0099 const struct qm_fd *fd),
0100
0101 TP_ARGS(netdev, fq, fd)
0102 );
0103
0104
0105
0106
0107
0108 #endif
0109
0110
0111 #undef TRACE_INCLUDE_PATH
0112 #define TRACE_INCLUDE_PATH .
0113 #undef TRACE_INCLUDE_FILE
0114 #define TRACE_INCLUDE_FILE dpaa_eth_trace
0115 #include <trace/define_trace.h>