Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Sowmini Varadhan | 46fcc6e | 2016-02-02 10:41:55 -0800 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM sunvnet |
| 4 | |
| 5 | #if !defined(_TRACE_SUNVNET_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define _TRACE_SUNVNET_H |
| 7 | |
| 8 | #include <linux/tracepoint.h> |
| 9 | |
| 10 | TRACE_EVENT(vnet_rx_one, |
| 11 | |
| 12 | TP_PROTO(int lsid, int rsid, int index, int needs_ack), |
| 13 | |
| 14 | TP_ARGS(lsid, rsid, index, needs_ack), |
| 15 | |
| 16 | TP_STRUCT__entry( |
| 17 | __field(int, lsid) |
| 18 | __field(int, rsid) |
| 19 | __field(int, index) |
| 20 | __field(int, needs_ack) |
| 21 | ), |
| 22 | |
| 23 | TP_fast_assign( |
| 24 | __entry->lsid = lsid; |
| 25 | __entry->rsid = rsid; |
| 26 | __entry->index = index; |
| 27 | __entry->needs_ack = needs_ack; |
| 28 | ), |
| 29 | |
| 30 | TP_printk("(%x:%x) walk_rx_one index %d; needs_ack %d", |
| 31 | __entry->lsid, __entry->rsid, |
| 32 | __entry->index, __entry->needs_ack) |
| 33 | ); |
| 34 | |
| 35 | DECLARE_EVENT_CLASS(vnet_tx_stopped_ack_template, |
| 36 | |
| 37 | TP_PROTO(int lsid, int rsid, int ack_end, int npkts), |
| 38 | |
| 39 | TP_ARGS(lsid, rsid, ack_end, npkts), |
| 40 | |
| 41 | TP_STRUCT__entry( |
| 42 | __field(int, lsid) |
| 43 | __field(int, rsid) |
| 44 | __field(int, ack_end) |
| 45 | __field(int, npkts) |
| 46 | ), |
| 47 | |
| 48 | TP_fast_assign( |
| 49 | __entry->lsid = lsid; |
| 50 | __entry->rsid = rsid; |
| 51 | __entry->ack_end = ack_end; |
| 52 | __entry->npkts = npkts; |
| 53 | ), |
| 54 | |
| 55 | TP_printk("(%x:%x) stopped ack for %d; npkts %d", |
| 56 | __entry->lsid, __entry->rsid, |
| 57 | __entry->ack_end, __entry->npkts) |
| 58 | ); |
| 59 | DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_send_stopped_ack, |
| 60 | TP_PROTO(int lsid, int rsid, int ack_end, int npkts), |
| 61 | TP_ARGS(lsid, rsid, ack_end, npkts)); |
| 62 | DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_defer_stopped_ack, |
| 63 | TP_PROTO(int lsid, int rsid, int ack_end, int npkts), |
| 64 | TP_ARGS(lsid, rsid, ack_end, npkts)); |
| 65 | DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_pending_stopped_ack, |
| 66 | TP_PROTO(int lsid, int rsid, int ack_end, int npkts), |
| 67 | TP_ARGS(lsid, rsid, ack_end, npkts)); |
| 68 | |
| 69 | TRACE_EVENT(vnet_rx_stopped_ack, |
| 70 | |
| 71 | TP_PROTO(int lsid, int rsid, int end), |
| 72 | |
| 73 | TP_ARGS(lsid, rsid, end), |
| 74 | |
| 75 | TP_STRUCT__entry( |
| 76 | __field(int, lsid) |
| 77 | __field(int, rsid) |
| 78 | __field(int, end) |
| 79 | ), |
| 80 | |
| 81 | TP_fast_assign( |
| 82 | __entry->lsid = lsid; |
| 83 | __entry->rsid = rsid; |
| 84 | __entry->end = end; |
| 85 | ), |
| 86 | |
| 87 | TP_printk("(%x:%x) stopped ack for index %d", |
| 88 | __entry->lsid, __entry->rsid, __entry->end) |
| 89 | ); |
| 90 | |
| 91 | TRACE_EVENT(vnet_tx_trigger, |
| 92 | |
| 93 | TP_PROTO(int lsid, int rsid, int start, int err), |
| 94 | |
| 95 | TP_ARGS(lsid, rsid, start, err), |
| 96 | |
| 97 | TP_STRUCT__entry( |
| 98 | __field(int, lsid) |
| 99 | __field(int, rsid) |
| 100 | __field(int, start) |
| 101 | __field(int, err) |
| 102 | ), |
| 103 | |
| 104 | TP_fast_assign( |
| 105 | __entry->lsid = lsid; |
| 106 | __entry->rsid = rsid; |
| 107 | __entry->start = start; |
| 108 | __entry->err = err; |
| 109 | ), |
| 110 | |
| 111 | TP_printk("(%x:%x) Tx trigger for %d sent with err %d %s", |
| 112 | __entry->lsid, __entry->rsid, __entry->start, |
| 113 | __entry->err, __entry->err > 0 ? "(ok)" : " ") |
| 114 | ); |
| 115 | |
| 116 | TRACE_EVENT(vnet_skip_tx_trigger, |
| 117 | |
| 118 | TP_PROTO(int lsid, int rsid, int last), |
| 119 | |
| 120 | TP_ARGS(lsid, rsid, last), |
| 121 | |
| 122 | TP_STRUCT__entry( |
| 123 | __field(int, lsid) |
| 124 | __field(int, rsid) |
| 125 | __field(int, last) |
| 126 | ), |
| 127 | |
| 128 | TP_fast_assign( |
| 129 | __entry->lsid = lsid; |
| 130 | __entry->rsid = rsid; |
| 131 | __entry->last = last; |
| 132 | ), |
| 133 | |
| 134 | TP_printk("(%x:%x) Skip Tx trigger. Last trigger sent was %d", |
| 135 | __entry->lsid, __entry->rsid, __entry->last) |
| 136 | ); |
| 137 | #endif /* _TRACE_SOCK_H */ |
| 138 | |
| 139 | /* This part must be outside protection */ |
| 140 | #include <trace/define_trace.h> |