sunvnet.h 3.1 KB

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