Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #undef TRACE_SYSTEM
0003 #define TRACE_SYSTEM sctp
0004 
0005 #if !defined(_TRACE_SCTP_H) || defined(TRACE_HEADER_MULTI_READ)
0006 #define _TRACE_SCTP_H
0007 
0008 #include <net/sctp/structs.h>
0009 #include <linux/tracepoint.h>
0010 
0011 TRACE_EVENT(sctp_probe_path,
0012 
0013     TP_PROTO(struct sctp_transport *sp,
0014          const struct sctp_association *asoc),
0015 
0016     TP_ARGS(sp, asoc),
0017 
0018     TP_STRUCT__entry(
0019         __field(__u64, asoc)
0020         __field(__u32, primary)
0021         __array(__u8, ipaddr, sizeof(union sctp_addr))
0022         __field(__u32, state)
0023         __field(__u32, cwnd)
0024         __field(__u32, ssthresh)
0025         __field(__u32, flight_size)
0026         __field(__u32, partial_bytes_acked)
0027         __field(__u32, pathmtu)
0028     ),
0029 
0030     TP_fast_assign(
0031         __entry->asoc = (unsigned long)asoc;
0032         __entry->primary = (sp == asoc->peer.primary_path);
0033         memcpy(__entry->ipaddr, &sp->ipaddr, sizeof(union sctp_addr));
0034         __entry->state = sp->state;
0035         __entry->cwnd = sp->cwnd;
0036         __entry->ssthresh = sp->ssthresh;
0037         __entry->flight_size = sp->flight_size;
0038         __entry->partial_bytes_acked = sp->partial_bytes_acked;
0039         __entry->pathmtu = sp->pathmtu;
0040     ),
0041 
0042     TP_printk("asoc=%#llx%s ipaddr=%pISpc state=%u cwnd=%u ssthresh=%u "
0043           "flight_size=%u partial_bytes_acked=%u pathmtu=%u",
0044           __entry->asoc, __entry->primary ? "(*)" : "",
0045           __entry->ipaddr, __entry->state, __entry->cwnd,
0046           __entry->ssthresh, __entry->flight_size,
0047           __entry->partial_bytes_acked, __entry->pathmtu)
0048 );
0049 
0050 TRACE_EVENT(sctp_probe,
0051 
0052     TP_PROTO(const struct sctp_endpoint *ep,
0053          const struct sctp_association *asoc,
0054          struct sctp_chunk *chunk),
0055 
0056     TP_ARGS(ep, asoc, chunk),
0057 
0058     TP_STRUCT__entry(
0059         __field(__u64, asoc)
0060         __field(__u32, mark)
0061         __field(__u16, bind_port)
0062         __field(__u16, peer_port)
0063         __field(__u32, pathmtu)
0064         __field(__u32, rwnd)
0065         __field(__u16, unack_data)
0066     ),
0067 
0068     TP_fast_assign(
0069         struct sk_buff *skb = chunk->skb;
0070 
0071         __entry->asoc = (unsigned long)asoc;
0072         __entry->mark = skb->mark;
0073         __entry->bind_port = ep->base.bind_addr.port;
0074         __entry->peer_port = asoc->peer.port;
0075         __entry->pathmtu = asoc->pathmtu;
0076         __entry->rwnd = asoc->peer.rwnd;
0077         __entry->unack_data = asoc->unack_data;
0078     ),
0079 
0080     TP_printk("asoc=%#llx mark=%#x bind_port=%d peer_port=%d pathmtu=%d "
0081           "rwnd=%u unack_data=%d",
0082           __entry->asoc, __entry->mark, __entry->bind_port,
0083           __entry->peer_port, __entry->pathmtu, __entry->rwnd,
0084           __entry->unack_data)
0085 );
0086 
0087 #endif /* _TRACE_SCTP_H */
0088 
0089 /* This part must be outside protection */
0090 #include <trace/define_trace.h>