diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-04 16:19:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-05 16:29:00 -0700 |
commit | 9ec1c6ac27640f6a65378f11e433baa4ece12a28 (patch) | |
tree | 1811112c2a6c8ea184bc32d26a7b0d4887e5b19a /net/tls/trace.h | |
parent | 8538d29cea9530f114159e06bfa31b2358161493 (diff) | |
download | linux-stable-9ec1c6ac27640f6a65378f11e433baa4ece12a28.tar.gz linux-stable-9ec1c6ac27640f6a65378f11e433baa4ece12a28.tar.bz2 linux-stable-9ec1c6ac27640f6a65378f11e433baa4ece12a28.zip |
net/tls: add device decrypted trace point
Add a tracepoint to the TLS offload's fast path. This tracepoint
can be used to track the decrypted and encrypted status of received
records. Records decrypted by the device should have decrypted set
to 1, records which have neither decrypted nor decrypted set are
partially decrypted, require re-encryption and therefore are most
expensive to deal with.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/trace.h')
-rw-r--r-- | net/tls/trace.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/tls/trace.h b/net/tls/trace.h index 95b6ded2f9b2..9ba5f600ea43 100644 --- a/net/tls/trace.h +++ b/net/tls/trace.h @@ -41,6 +41,39 @@ TRACE_EVENT(tls_device_offload_set, ) ); +TRACE_EVENT(tls_device_decrypted, + + TP_PROTO(struct sock *sk, u32 tcp_seq, u8 *rec_no, u32 rec_len, + bool encrypted, bool decrypted), + + TP_ARGS(sk, tcp_seq, rec_no, rec_len, encrypted, decrypted), + + TP_STRUCT__entry( + __field( struct sock *, sk ) + __field( u64, rec_no ) + __field( u32, tcp_seq ) + __field( u32, rec_len ) + __field( bool, encrypted ) + __field( bool, decrypted ) + ), + + TP_fast_assign( + __entry->sk = sk; + __entry->rec_no = get_unaligned_be64(rec_no); + __entry->tcp_seq = tcp_seq; + __entry->rec_len = rec_len; + __entry->encrypted = encrypted; + __entry->decrypted = decrypted; + ), + + TP_printk( + "sk=%p tcp_seq=%u rec_no=%llu len=%u encrypted=%d decrypted=%d", + __entry->sk, __entry->tcp_seq, + __entry->rec_no, __entry->rec_len, + __entry->encrypted, __entry->decrypted + ) +); + TRACE_EVENT(tls_device_rx_resync_send, TP_PROTO(struct sock *sk, u32 tcp_seq, u8 *rec_no, int sync_type), |