bus: mhi: core: Fix some error return code
[linux/fpc-iii.git] / net / tls / trace.h
blob9ba5f600ea43c88917e457e1cc594e8c3d9c042b
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2 /* Copyright (C) 2019 Netronome Systems, Inc. */
4 #undef TRACE_SYSTEM
5 #define TRACE_SYSTEM tls
7 #if !defined(_TLS_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
8 #define _TLS_TRACE_H_
10 #include <asm/unaligned.h>
11 #include <linux/tracepoint.h>
13 struct sock;
15 TRACE_EVENT(tls_device_offload_set,
17 TP_PROTO(struct sock *sk, int dir, u32 tcp_seq, u8 *rec_no, int ret),
19 TP_ARGS(sk, dir, tcp_seq, rec_no, ret),
21 TP_STRUCT__entry(
22 __field( struct sock *, sk )
23 __field( u64, rec_no )
24 __field( int, dir )
25 __field( u32, tcp_seq )
26 __field( int, ret )
29 TP_fast_assign(
30 __entry->sk = sk;
31 __entry->rec_no = get_unaligned_be64(rec_no);
32 __entry->dir = dir;
33 __entry->tcp_seq = tcp_seq;
34 __entry->ret = ret;
37 TP_printk(
38 "sk=%p direction=%d tcp_seq=%u rec_no=%llu ret=%d",
39 __entry->sk, __entry->dir, __entry->tcp_seq, __entry->rec_no,
40 __entry->ret
44 TRACE_EVENT(tls_device_decrypted,
46 TP_PROTO(struct sock *sk, u32 tcp_seq, u8 *rec_no, u32 rec_len,
47 bool encrypted, bool decrypted),
49 TP_ARGS(sk, tcp_seq, rec_no, rec_len, encrypted, decrypted),
51 TP_STRUCT__entry(
52 __field( struct sock *, sk )
53 __field( u64, rec_no )
54 __field( u32, tcp_seq )
55 __field( u32, rec_len )
56 __field( bool, encrypted )
57 __field( bool, decrypted )
60 TP_fast_assign(
61 __entry->sk = sk;
62 __entry->rec_no = get_unaligned_be64(rec_no);
63 __entry->tcp_seq = tcp_seq;
64 __entry->rec_len = rec_len;
65 __entry->encrypted = encrypted;
66 __entry->decrypted = decrypted;
69 TP_printk(
70 "sk=%p tcp_seq=%u rec_no=%llu len=%u encrypted=%d decrypted=%d",
71 __entry->sk, __entry->tcp_seq,
72 __entry->rec_no, __entry->rec_len,
73 __entry->encrypted, __entry->decrypted
77 TRACE_EVENT(tls_device_rx_resync_send,
79 TP_PROTO(struct sock *sk, u32 tcp_seq, u8 *rec_no, int sync_type),
81 TP_ARGS(sk, tcp_seq, rec_no, sync_type),
83 TP_STRUCT__entry(
84 __field( struct sock *, sk )
85 __field( u64, rec_no )
86 __field( u32, tcp_seq )
87 __field( int, sync_type )
90 TP_fast_assign(
91 __entry->sk = sk;
92 __entry->rec_no = get_unaligned_be64(rec_no);
93 __entry->tcp_seq = tcp_seq;
94 __entry->sync_type = sync_type;
97 TP_printk(
98 "sk=%p tcp_seq=%u rec_no=%llu sync_type=%d",
99 __entry->sk, __entry->tcp_seq, __entry->rec_no,
100 __entry->sync_type
104 TRACE_EVENT(tls_device_rx_resync_nh_schedule,
106 TP_PROTO(struct sock *sk),
108 TP_ARGS(sk),
110 TP_STRUCT__entry(
111 __field( struct sock *, sk )
114 TP_fast_assign(
115 __entry->sk = sk;
118 TP_printk(
119 "sk=%p", __entry->sk
123 TRACE_EVENT(tls_device_rx_resync_nh_delay,
125 TP_PROTO(struct sock *sk, u32 sock_data, u32 rec_len),
127 TP_ARGS(sk, sock_data, rec_len),
129 TP_STRUCT__entry(
130 __field( struct sock *, sk )
131 __field( u32, sock_data )
132 __field( u32, rec_len )
135 TP_fast_assign(
136 __entry->sk = sk;
137 __entry->sock_data = sock_data;
138 __entry->rec_len = rec_len;
141 TP_printk(
142 "sk=%p sock_data=%u rec_len=%u",
143 __entry->sk, __entry->sock_data, __entry->rec_len
147 TRACE_EVENT(tls_device_tx_resync_req,
149 TP_PROTO(struct sock *sk, u32 tcp_seq, u32 exp_tcp_seq),
151 TP_ARGS(sk, tcp_seq, exp_tcp_seq),
153 TP_STRUCT__entry(
154 __field( struct sock *, sk )
155 __field( u32, tcp_seq )
156 __field( u32, exp_tcp_seq )
159 TP_fast_assign(
160 __entry->sk = sk;
161 __entry->tcp_seq = tcp_seq;
162 __entry->exp_tcp_seq = exp_tcp_seq;
165 TP_printk(
166 "sk=%p tcp_seq=%u exp_tcp_seq=%u",
167 __entry->sk, __entry->tcp_seq, __entry->exp_tcp_seq
171 TRACE_EVENT(tls_device_tx_resync_send,
173 TP_PROTO(struct sock *sk, u32 tcp_seq, u8 *rec_no),
175 TP_ARGS(sk, tcp_seq, rec_no),
177 TP_STRUCT__entry(
178 __field( struct sock *, sk )
179 __field( u64, rec_no )
180 __field( u32, tcp_seq )
183 TP_fast_assign(
184 __entry->sk = sk;
185 __entry->rec_no = get_unaligned_be64(rec_no);
186 __entry->tcp_seq = tcp_seq;
189 TP_printk(
190 "sk=%p tcp_seq=%u rec_no=%llu",
191 __entry->sk, __entry->tcp_seq, __entry->rec_no
195 #endif /* _TLS_TRACE_H_ */
197 #undef TRACE_INCLUDE_PATH
198 #define TRACE_INCLUDE_PATH .
199 #undef TRACE_INCLUDE_FILE
200 #define TRACE_INCLUDE_FILE trace
202 #include <trace/define_trace.h>