1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM dccp
5 #if !defined(_TRACE_DCCP_H) || defined(TRACE_HEADER_MULTI_READ)
10 #include "ccids/ccid3.h"
11 #include <linux/tracepoint.h>
12 #include <trace/events/net_probe_common.h>
14 TRACE_EVENT(dccp_probe,
16 TP_PROTO(struct sock *sk, size_t size),
21 /* sockaddr_in6 is always bigger than sockaddr_in */
22 __array(__u8, saddr, sizeof(struct sockaddr_in6))
23 __array(__u8, daddr, sizeof(struct sockaddr_in6))
28 __field(__u32, tx_rtt)
30 __field(__u32, tx_x_calc)
31 __field(__u64, tx_x_recv)
33 __field(__u32, tx_t_ipi)
37 const struct inet_sock *inet = inet_sk(sk);
38 struct ccid3_hc_tx_sock *hc = NULL;
40 if (ccid_get_current_tx_ccid(dccp_sk(sk)) == DCCPC_CCID3)
41 hc = ccid3_hc_tx_sk(sk);
43 memset(__entry->saddr, 0, sizeof(struct sockaddr_in6));
44 memset(__entry->daddr, 0, sizeof(struct sockaddr_in6));
46 TP_STORE_ADDR_PORTS(__entry, inet, sk);
48 /* For filtering use */
49 __entry->sport = ntohs(inet->inet_sport);
50 __entry->dport = ntohs(inet->inet_dport);
54 __entry->tx_s = hc->tx_s;
55 __entry->tx_rtt = hc->tx_rtt;
56 __entry->tx_p = hc->tx_p;
57 __entry->tx_x_calc = hc->tx_x_calc;
58 __entry->tx_x_recv = hc->tx_x_recv >> 6;
59 __entry->tx_x = hc->tx_x >> 6;
60 __entry->tx_t_ipi = hc->tx_t_ipi;
63 memset_startat(__entry, 0, tx_rtt);
67 TP_printk("src=%pISpc dest=%pISpc size=%d tx_s=%d tx_rtt=%d "
68 "tx_p=%d tx_x_calc=%u tx_x_recv=%llu tx_x=%llu tx_t_ipi=%d",
69 __entry->saddr, __entry->daddr, __entry->size,
70 __entry->tx_s, __entry->tx_rtt, __entry->tx_p,
71 __entry->tx_x_calc, __entry->tx_x_recv, __entry->tx_x,
75 #endif /* _TRACE_TCP_H */
77 /* This part must be outside protection */
78 #undef TRACE_INCLUDE_PATH
79 #define TRACE_INCLUDE_PATH .
80 #undef TRACE_INCLUDE_FILE
81 #define TRACE_INCLUDE_FILE trace
82 #include <trace/define_trace.h>