1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 246fcc6efSSowmini Varadhan #undef TRACE_SYSTEM 346fcc6efSSowmini Varadhan #define TRACE_SYSTEM sunvnet 446fcc6efSSowmini Varadhan 546fcc6efSSowmini Varadhan #if !defined(_TRACE_SUNVNET_H) || defined(TRACE_HEADER_MULTI_READ) 646fcc6efSSowmini Varadhan #define _TRACE_SUNVNET_H 746fcc6efSSowmini Varadhan 846fcc6efSSowmini Varadhan #include <linux/tracepoint.h> 946fcc6efSSowmini Varadhan 1046fcc6efSSowmini Varadhan TRACE_EVENT(vnet_rx_one, 1146fcc6efSSowmini Varadhan 1246fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int index, int needs_ack), 1346fcc6efSSowmini Varadhan 1446fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, index, needs_ack), 1546fcc6efSSowmini Varadhan 1646fcc6efSSowmini Varadhan TP_STRUCT__entry( 1746fcc6efSSowmini Varadhan __field(int, lsid) 1846fcc6efSSowmini Varadhan __field(int, rsid) 1946fcc6efSSowmini Varadhan __field(int, index) 2046fcc6efSSowmini Varadhan __field(int, needs_ack) 2146fcc6efSSowmini Varadhan ), 2246fcc6efSSowmini Varadhan 2346fcc6efSSowmini Varadhan TP_fast_assign( 2446fcc6efSSowmini Varadhan __entry->lsid = lsid; 2546fcc6efSSowmini Varadhan __entry->rsid = rsid; 2646fcc6efSSowmini Varadhan __entry->index = index; 2746fcc6efSSowmini Varadhan __entry->needs_ack = needs_ack; 2846fcc6efSSowmini Varadhan ), 2946fcc6efSSowmini Varadhan 3046fcc6efSSowmini Varadhan TP_printk("(%x:%x) walk_rx_one index %d; needs_ack %d", 3146fcc6efSSowmini Varadhan __entry->lsid, __entry->rsid, 3246fcc6efSSowmini Varadhan __entry->index, __entry->needs_ack) 3346fcc6efSSowmini Varadhan ); 3446fcc6efSSowmini Varadhan 3546fcc6efSSowmini Varadhan DECLARE_EVENT_CLASS(vnet_tx_stopped_ack_template, 3646fcc6efSSowmini Varadhan 3746fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int ack_end, int npkts), 3846fcc6efSSowmini Varadhan 3946fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, ack_end, npkts), 4046fcc6efSSowmini Varadhan 4146fcc6efSSowmini Varadhan TP_STRUCT__entry( 4246fcc6efSSowmini Varadhan __field(int, lsid) 4346fcc6efSSowmini Varadhan __field(int, rsid) 4446fcc6efSSowmini Varadhan __field(int, ack_end) 4546fcc6efSSowmini Varadhan __field(int, npkts) 4646fcc6efSSowmini Varadhan ), 4746fcc6efSSowmini Varadhan 4846fcc6efSSowmini Varadhan TP_fast_assign( 4946fcc6efSSowmini Varadhan __entry->lsid = lsid; 5046fcc6efSSowmini Varadhan __entry->rsid = rsid; 5146fcc6efSSowmini Varadhan __entry->ack_end = ack_end; 5246fcc6efSSowmini Varadhan __entry->npkts = npkts; 5346fcc6efSSowmini Varadhan ), 5446fcc6efSSowmini Varadhan 5546fcc6efSSowmini Varadhan TP_printk("(%x:%x) stopped ack for %d; npkts %d", 5646fcc6efSSowmini Varadhan __entry->lsid, __entry->rsid, 5746fcc6efSSowmini Varadhan __entry->ack_end, __entry->npkts) 5846fcc6efSSowmini Varadhan ); 5946fcc6efSSowmini Varadhan DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_send_stopped_ack, 6046fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int ack_end, int npkts), 6146fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, ack_end, npkts)); 6246fcc6efSSowmini Varadhan DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_defer_stopped_ack, 6346fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int ack_end, int npkts), 6446fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, ack_end, npkts)); 6546fcc6efSSowmini Varadhan DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_pending_stopped_ack, 6646fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int ack_end, int npkts), 6746fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, ack_end, npkts)); 6846fcc6efSSowmini Varadhan 6946fcc6efSSowmini Varadhan TRACE_EVENT(vnet_rx_stopped_ack, 7046fcc6efSSowmini Varadhan 7146fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int end), 7246fcc6efSSowmini Varadhan 7346fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, end), 7446fcc6efSSowmini Varadhan 7546fcc6efSSowmini Varadhan TP_STRUCT__entry( 7646fcc6efSSowmini Varadhan __field(int, lsid) 7746fcc6efSSowmini Varadhan __field(int, rsid) 7846fcc6efSSowmini Varadhan __field(int, end) 7946fcc6efSSowmini Varadhan ), 8046fcc6efSSowmini Varadhan 8146fcc6efSSowmini Varadhan TP_fast_assign( 8246fcc6efSSowmini Varadhan __entry->lsid = lsid; 8346fcc6efSSowmini Varadhan __entry->rsid = rsid; 8446fcc6efSSowmini Varadhan __entry->end = end; 8546fcc6efSSowmini Varadhan ), 8646fcc6efSSowmini Varadhan 8746fcc6efSSowmini Varadhan TP_printk("(%x:%x) stopped ack for index %d", 8846fcc6efSSowmini Varadhan __entry->lsid, __entry->rsid, __entry->end) 8946fcc6efSSowmini Varadhan ); 9046fcc6efSSowmini Varadhan 9146fcc6efSSowmini Varadhan TRACE_EVENT(vnet_tx_trigger, 9246fcc6efSSowmini Varadhan 9346fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int start, int err), 9446fcc6efSSowmini Varadhan 9546fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, start, err), 9646fcc6efSSowmini Varadhan 9746fcc6efSSowmini Varadhan TP_STRUCT__entry( 9846fcc6efSSowmini Varadhan __field(int, lsid) 9946fcc6efSSowmini Varadhan __field(int, rsid) 10046fcc6efSSowmini Varadhan __field(int, start) 10146fcc6efSSowmini Varadhan __field(int, err) 10246fcc6efSSowmini Varadhan ), 10346fcc6efSSowmini Varadhan 10446fcc6efSSowmini Varadhan TP_fast_assign( 10546fcc6efSSowmini Varadhan __entry->lsid = lsid; 10646fcc6efSSowmini Varadhan __entry->rsid = rsid; 10746fcc6efSSowmini Varadhan __entry->start = start; 10846fcc6efSSowmini Varadhan __entry->err = err; 10946fcc6efSSowmini Varadhan ), 11046fcc6efSSowmini Varadhan 11146fcc6efSSowmini Varadhan TP_printk("(%x:%x) Tx trigger for %d sent with err %d %s", 11246fcc6efSSowmini Varadhan __entry->lsid, __entry->rsid, __entry->start, 11346fcc6efSSowmini Varadhan __entry->err, __entry->err > 0 ? "(ok)" : " ") 11446fcc6efSSowmini Varadhan ); 11546fcc6efSSowmini Varadhan 11646fcc6efSSowmini Varadhan TRACE_EVENT(vnet_skip_tx_trigger, 11746fcc6efSSowmini Varadhan 11846fcc6efSSowmini Varadhan TP_PROTO(int lsid, int rsid, int last), 11946fcc6efSSowmini Varadhan 12046fcc6efSSowmini Varadhan TP_ARGS(lsid, rsid, last), 12146fcc6efSSowmini Varadhan 12246fcc6efSSowmini Varadhan TP_STRUCT__entry( 12346fcc6efSSowmini Varadhan __field(int, lsid) 12446fcc6efSSowmini Varadhan __field(int, rsid) 12546fcc6efSSowmini Varadhan __field(int, last) 12646fcc6efSSowmini Varadhan ), 12746fcc6efSSowmini Varadhan 12846fcc6efSSowmini Varadhan TP_fast_assign( 12946fcc6efSSowmini Varadhan __entry->lsid = lsid; 13046fcc6efSSowmini Varadhan __entry->rsid = rsid; 13146fcc6efSSowmini Varadhan __entry->last = last; 13246fcc6efSSowmini Varadhan ), 13346fcc6efSSowmini Varadhan 13446fcc6efSSowmini Varadhan TP_printk("(%x:%x) Skip Tx trigger. Last trigger sent was %d", 13546fcc6efSSowmini Varadhan __entry->lsid, __entry->rsid, __entry->last) 13646fcc6efSSowmini Varadhan ); 13746fcc6efSSowmini Varadhan #endif /* _TRACE_SOCK_H */ 13846fcc6efSSowmini Varadhan 13946fcc6efSSowmini Varadhan /* This part must be outside protection */ 14046fcc6efSSowmini Varadhan #include <trace/define_trace.h> 141