1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM qrtr
5 #if !defined(_TRACE_QRTR_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/qrtr.h>
9 #include <linux/tracepoint.h>
11 TRACE_EVENT(qrtr_ns_service_announce_new
,
13 TP_PROTO(__le32 service
, __le32 instance
, __le32 node
, __le32 port
),
15 TP_ARGS(service
, instance
, node
, port
),
18 __field(__le32
, service
)
19 __field(__le32
, instance
)
25 __entry
->service
= service
;
26 __entry
->instance
= instance
;
31 TP_printk("advertising new server [%d:%x]@[%d:%d]",
32 __entry
->service
, __entry
->instance
, __entry
->node
,
37 TRACE_EVENT(qrtr_ns_service_announce_del
,
39 TP_PROTO(__le32 service
, __le32 instance
, __le32 node
, __le32 port
),
41 TP_ARGS(service
, instance
, node
, port
),
44 __field(__le32
, service
)
45 __field(__le32
, instance
)
51 __entry
->service
= service
;
52 __entry
->instance
= instance
;
57 TP_printk("advertising removal of server [%d:%x]@[%d:%d]",
58 __entry
->service
, __entry
->instance
, __entry
->node
,
63 TRACE_EVENT(qrtr_ns_server_add
,
65 TP_PROTO(__le32 service
, __le32 instance
, __le32 node
, __le32 port
),
67 TP_ARGS(service
, instance
, node
, port
),
70 __field(__le32
, service
)
71 __field(__le32
, instance
)
77 __entry
->service
= service
;
78 __entry
->instance
= instance
;
83 TP_printk("add server [%d:%x]@[%d:%d]",
84 __entry
->service
, __entry
->instance
, __entry
->node
,
89 TRACE_EVENT(qrtr_ns_message
,
91 TP_PROTO(const char * const ctrl_pkt_str
, __u32 sq_node
, __u32 sq_port
),
93 TP_ARGS(ctrl_pkt_str
, sq_node
, sq_port
),
96 __string(ctrl_pkt_str
, ctrl_pkt_str
)
97 __field(__u32
, sq_node
)
98 __field(__u32
, sq_port
)
102 __assign_str(ctrl_pkt_str
, ctrl_pkt_str
);
103 __entry
->sq_node
= sq_node
;
104 __entry
->sq_port
= sq_port
;
107 TP_printk("%s from %d:%d",
108 __get_str(ctrl_pkt_str
), __entry
->sq_node
, __entry
->sq_port
112 #endif /* _TRACE_QRTR_H */
114 /* This part must be outside protection */
115 #include <trace/define_trace.h>