rdma.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2017 Oracle. All rights reserved.
  4. */
  5. /*
  6. * enum ib_event_type, from include/rdma/ib_verbs.h
  7. */
  8. #define IB_EVENT_LIST \
  9. ib_event(CQ_ERR) \
  10. ib_event(QP_FATAL) \
  11. ib_event(QP_REQ_ERR) \
  12. ib_event(QP_ACCESS_ERR) \
  13. ib_event(COMM_EST) \
  14. ib_event(SQ_DRAINED) \
  15. ib_event(PATH_MIG) \
  16. ib_event(PATH_MIG_ERR) \
  17. ib_event(DEVICE_FATAL) \
  18. ib_event(PORT_ACTIVE) \
  19. ib_event(PORT_ERR) \
  20. ib_event(LID_CHANGE) \
  21. ib_event(PKEY_CHANGE) \
  22. ib_event(SM_CHANGE) \
  23. ib_event(SRQ_ERR) \
  24. ib_event(SRQ_LIMIT_REACHED) \
  25. ib_event(QP_LAST_WQE_REACHED) \
  26. ib_event(CLIENT_REREGISTER) \
  27. ib_event(GID_CHANGE) \
  28. ib_event_end(WQ_FATAL)
  29. #undef ib_event
  30. #undef ib_event_end
  31. #define ib_event(x) TRACE_DEFINE_ENUM(IB_EVENT_##x);
  32. #define ib_event_end(x) TRACE_DEFINE_ENUM(IB_EVENT_##x);
  33. IB_EVENT_LIST
  34. #undef ib_event
  35. #undef ib_event_end
  36. #define ib_event(x) { IB_EVENT_##x, #x },
  37. #define ib_event_end(x) { IB_EVENT_##x, #x }
  38. #define rdma_show_ib_event(x) \
  39. __print_symbolic(x, IB_EVENT_LIST)
  40. /*
  41. * enum ib_wc_status type, from include/rdma/ib_verbs.h
  42. */
  43. #define IB_WC_STATUS_LIST \
  44. ib_wc_status(SUCCESS) \
  45. ib_wc_status(LOC_LEN_ERR) \
  46. ib_wc_status(LOC_QP_OP_ERR) \
  47. ib_wc_status(LOC_EEC_OP_ERR) \
  48. ib_wc_status(LOC_PROT_ERR) \
  49. ib_wc_status(WR_FLUSH_ERR) \
  50. ib_wc_status(MW_BIND_ERR) \
  51. ib_wc_status(BAD_RESP_ERR) \
  52. ib_wc_status(LOC_ACCESS_ERR) \
  53. ib_wc_status(REM_INV_REQ_ERR) \
  54. ib_wc_status(REM_ACCESS_ERR) \
  55. ib_wc_status(REM_OP_ERR) \
  56. ib_wc_status(RETRY_EXC_ERR) \
  57. ib_wc_status(RNR_RETRY_EXC_ERR) \
  58. ib_wc_status(LOC_RDD_VIOL_ERR) \
  59. ib_wc_status(REM_INV_RD_REQ_ERR) \
  60. ib_wc_status(REM_ABORT_ERR) \
  61. ib_wc_status(INV_EECN_ERR) \
  62. ib_wc_status(INV_EEC_STATE_ERR) \
  63. ib_wc_status(FATAL_ERR) \
  64. ib_wc_status(RESP_TIMEOUT_ERR) \
  65. ib_wc_status_end(GENERAL_ERR)
  66. #undef ib_wc_status
  67. #undef ib_wc_status_end
  68. #define ib_wc_status(x) TRACE_DEFINE_ENUM(IB_WC_##x);
  69. #define ib_wc_status_end(x) TRACE_DEFINE_ENUM(IB_WC_##x);
  70. IB_WC_STATUS_LIST
  71. #undef ib_wc_status
  72. #undef ib_wc_status_end
  73. #define ib_wc_status(x) { IB_WC_##x, #x },
  74. #define ib_wc_status_end(x) { IB_WC_##x, #x }
  75. #define rdma_show_wc_status(x) \
  76. __print_symbolic(x, IB_WC_STATUS_LIST)
  77. /*
  78. * enum ib_cm_event_type, from include/rdma/ib_cm.h
  79. */
  80. #define IB_CM_EVENT_LIST \
  81. ib_cm_event(REQ_ERROR) \
  82. ib_cm_event(REQ_RECEIVED) \
  83. ib_cm_event(REP_ERROR) \
  84. ib_cm_event(REP_RECEIVED) \
  85. ib_cm_event(RTU_RECEIVED) \
  86. ib_cm_event(USER_ESTABLISHED) \
  87. ib_cm_event(DREQ_ERROR) \
  88. ib_cm_event(DREQ_RECEIVED) \
  89. ib_cm_event(DREP_RECEIVED) \
  90. ib_cm_event(TIMEWAIT_EXIT) \
  91. ib_cm_event(MRA_RECEIVED) \
  92. ib_cm_event(REJ_RECEIVED) \
  93. ib_cm_event(LAP_ERROR) \
  94. ib_cm_event(LAP_RECEIVED) \
  95. ib_cm_event(APR_RECEIVED) \
  96. ib_cm_event(SIDR_REQ_ERROR) \
  97. ib_cm_event(SIDR_REQ_RECEIVED) \
  98. ib_cm_event_end(SIDR_REP_RECEIVED)
  99. #undef ib_cm_event
  100. #undef ib_cm_event_end
  101. #define ib_cm_event(x) TRACE_DEFINE_ENUM(IB_CM_##x);
  102. #define ib_cm_event_end(x) TRACE_DEFINE_ENUM(IB_CM_##x);
  103. IB_CM_EVENT_LIST
  104. #undef ib_cm_event
  105. #undef ib_cm_event_end
  106. #define ib_cm_event(x) { IB_CM_##x, #x },
  107. #define ib_cm_event_end(x) { IB_CM_##x, #x }
  108. #define rdma_show_ib_cm_event(x) \
  109. __print_symbolic(x, IB_CM_EVENT_LIST)
  110. /*
  111. * enum rdma_cm_event_type, from include/rdma/rdma_cm.h
  112. */
  113. #define RDMA_CM_EVENT_LIST \
  114. rdma_cm_event(ADDR_RESOLVED) \
  115. rdma_cm_event(ADDR_ERROR) \
  116. rdma_cm_event(ROUTE_RESOLVED) \
  117. rdma_cm_event(ROUTE_ERROR) \
  118. rdma_cm_event(CONNECT_REQUEST) \
  119. rdma_cm_event(CONNECT_RESPONSE) \
  120. rdma_cm_event(CONNECT_ERROR) \
  121. rdma_cm_event(UNREACHABLE) \
  122. rdma_cm_event(REJECTED) \
  123. rdma_cm_event(ESTABLISHED) \
  124. rdma_cm_event(DISCONNECTED) \
  125. rdma_cm_event(DEVICE_REMOVAL) \
  126. rdma_cm_event(MULTICAST_JOIN) \
  127. rdma_cm_event(MULTICAST_ERROR) \
  128. rdma_cm_event(ADDR_CHANGE) \
  129. rdma_cm_event_end(TIMEWAIT_EXIT)
  130. #undef rdma_cm_event
  131. #undef rdma_cm_event_end
  132. #define rdma_cm_event(x) TRACE_DEFINE_ENUM(RDMA_CM_EVENT_##x);
  133. #define rdma_cm_event_end(x) TRACE_DEFINE_ENUM(RDMA_CM_EVENT_##x);
  134. RDMA_CM_EVENT_LIST
  135. #undef rdma_cm_event
  136. #undef rdma_cm_event_end
  137. #define rdma_cm_event(x) { RDMA_CM_EVENT_##x, #x },
  138. #define rdma_cm_event_end(x) { RDMA_CM_EVENT_##x, #x }
  139. #define rdma_show_cm_event(x) \
  140. __print_symbolic(x, RDMA_CM_EVENT_LIST)