sunvnet.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM sunvnet
  3. #if !defined(_TRACE_SUNVNET_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_SUNVNET_H
  5. #include <linux/tracepoint.h>
  6. TRACE_EVENT(vnet_rx_one,
  7. TP_PROTO(int lsid, int rsid, int index, int needs_ack),
  8. TP_ARGS(lsid, rsid, index, needs_ack),
  9. TP_STRUCT__entry(
  10. __field(int, lsid)
  11. __field(int, rsid)
  12. __field(int, index)
  13. __field(int, needs_ack)
  14. ),
  15. TP_fast_assign(
  16. __entry->lsid = lsid;
  17. __entry->rsid = rsid;
  18. __entry->index = index;
  19. __entry->needs_ack = needs_ack;
  20. ),
  21. TP_printk("(%x:%x) walk_rx_one index %d; needs_ack %d",
  22. __entry->lsid, __entry->rsid,
  23. __entry->index, __entry->needs_ack)
  24. );
  25. DECLARE_EVENT_CLASS(vnet_tx_stopped_ack_template,
  26. TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
  27. TP_ARGS(lsid, rsid, ack_end, npkts),
  28. TP_STRUCT__entry(
  29. __field(int, lsid)
  30. __field(int, rsid)
  31. __field(int, ack_end)
  32. __field(int, npkts)
  33. ),
  34. TP_fast_assign(
  35. __entry->lsid = lsid;
  36. __entry->rsid = rsid;
  37. __entry->ack_end = ack_end;
  38. __entry->npkts = npkts;
  39. ),
  40. TP_printk("(%x:%x) stopped ack for %d; npkts %d",
  41. __entry->lsid, __entry->rsid,
  42. __entry->ack_end, __entry->npkts)
  43. );
  44. DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_send_stopped_ack,
  45. TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
  46. TP_ARGS(lsid, rsid, ack_end, npkts));
  47. DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_defer_stopped_ack,
  48. TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
  49. TP_ARGS(lsid, rsid, ack_end, npkts));
  50. DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_pending_stopped_ack,
  51. TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
  52. TP_ARGS(lsid, rsid, ack_end, npkts));
  53. TRACE_EVENT(vnet_rx_stopped_ack,
  54. TP_PROTO(int lsid, int rsid, int end),
  55. TP_ARGS(lsid, rsid, end),
  56. TP_STRUCT__entry(
  57. __field(int, lsid)
  58. __field(int, rsid)
  59. __field(int, end)
  60. ),
  61. TP_fast_assign(
  62. __entry->lsid = lsid;
  63. __entry->rsid = rsid;
  64. __entry->end = end;
  65. ),
  66. TP_printk("(%x:%x) stopped ack for index %d",
  67. __entry->lsid, __entry->rsid, __entry->end)
  68. );
  69. TRACE_EVENT(vnet_tx_trigger,
  70. TP_PROTO(int lsid, int rsid, int start, int err),
  71. TP_ARGS(lsid, rsid, start, err),
  72. TP_STRUCT__entry(
  73. __field(int, lsid)
  74. __field(int, rsid)
  75. __field(int, start)
  76. __field(int, err)
  77. ),
  78. TP_fast_assign(
  79. __entry->lsid = lsid;
  80. __entry->rsid = rsid;
  81. __entry->start = start;
  82. __entry->err = err;
  83. ),
  84. TP_printk("(%x:%x) Tx trigger for %d sent with err %d %s",
  85. __entry->lsid, __entry->rsid, __entry->start,
  86. __entry->err, __entry->err > 0 ? "(ok)" : " ")
  87. );
  88. TRACE_EVENT(vnet_skip_tx_trigger,
  89. TP_PROTO(int lsid, int rsid, int last),
  90. TP_ARGS(lsid, rsid, last),
  91. TP_STRUCT__entry(
  92. __field(int, lsid)
  93. __field(int, rsid)
  94. __field(int, last)
  95. ),
  96. TP_fast_assign(
  97. __entry->lsid = lsid;
  98. __entry->rsid = rsid;
  99. __entry->last = last;
  100. ),
  101. TP_printk("(%x:%x) Skip Tx trigger. Last trigger sent was %d",
  102. __entry->lsid, __entry->rsid, __entry->last)
  103. );
  104. #endif /* _TRACE_SOCK_H */
  105. /* This part must be outside protection */
  106. #include <trace/define_trace.h>