ehca_classes_pSeries.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /*
  2. * IBM eServer eHCA Infiniband device driver for Linux on POWER
  3. *
  4. * pSeries interface definitions
  5. *
  6. * Authors: Waleri Fomin <fomin@de.ibm.com>
  7. * Christoph Raisch <raisch@de.ibm.com>
  8. *
  9. * Copyright (c) 2005 IBM Corporation
  10. *
  11. * All rights reserved.
  12. *
  13. * This source code is distributed under a dual license of GPL v2.0 and OpenIB
  14. * BSD.
  15. *
  16. * OpenIB BSD License
  17. *
  18. * Redistribution and use in source and binary forms, with or without
  19. * modification, are permitted provided that the following conditions are met:
  20. *
  21. * Redistributions of source code must retain the above copyright notice, this
  22. * list of conditions and the following disclaimer.
  23. *
  24. * Redistributions in binary form must reproduce the above copyright notice,
  25. * this list of conditions and the following disclaimer in the documentation
  26. * and/or other materials
  27. * provided with the distribution.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  30. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  31. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  32. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  33. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  35. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  36. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  37. * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  38. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  39. * POSSIBILITY OF SUCH DAMAGE.
  40. */
  41. #ifndef __EHCA_CLASSES_PSERIES_H__
  42. #define __EHCA_CLASSES_PSERIES_H__
  43. #include "hcp_phyp.h"
  44. #include "ipz_pt_fn.h"
  45. struct ehca_pfqp {
  46. struct ipz_qpt sqpt;
  47. struct ipz_qpt rqpt;
  48. };
  49. struct ehca_pfcq {
  50. struct ipz_qpt qpt;
  51. u32 cqnr;
  52. };
  53. struct ehca_pfeq {
  54. struct ipz_qpt qpt;
  55. struct h_galpa galpa;
  56. u32 eqnr;
  57. };
  58. struct ipz_adapter_handle {
  59. u64 handle;
  60. };
  61. struct ipz_cq_handle {
  62. u64 handle;
  63. };
  64. struct ipz_eq_handle {
  65. u64 handle;
  66. };
  67. struct ipz_qp_handle {
  68. u64 handle;
  69. };
  70. struct ipz_mrmw_handle {
  71. u64 handle;
  72. };
  73. struct ipz_pd {
  74. u32 value;
  75. };
  76. struct hcp_modify_qp_control_block {
  77. u32 qkey; /* 00 */
  78. u32 rdd; /* reliable datagram domain */
  79. u32 send_psn; /* 02 */
  80. u32 receive_psn; /* 03 */
  81. u32 prim_phys_port; /* 04 */
  82. u32 alt_phys_port; /* 05 */
  83. u32 prim_p_key_idx; /* 06 */
  84. u32 alt_p_key_idx; /* 07 */
  85. u32 rdma_atomic_ctrl; /* 08 */
  86. u32 qp_state; /* 09 */
  87. u32 reserved_10; /* 10 */
  88. u32 rdma_nr_atomic_resp_res; /* 11 */
  89. u32 path_migration_state; /* 12 */
  90. u32 rdma_atomic_outst_dest_qp; /* 13 */
  91. u32 dest_qp_nr; /* 14 */
  92. u32 min_rnr_nak_timer_field; /* 15 */
  93. u32 service_level; /* 16 */
  94. u32 send_grh_flag; /* 17 */
  95. u32 retry_count; /* 18 */
  96. u32 timeout; /* 19 */
  97. u32 path_mtu; /* 20 */
  98. u32 max_static_rate; /* 21 */
  99. u32 dlid; /* 22 */
  100. u32 rnr_retry_count; /* 23 */
  101. u32 source_path_bits; /* 24 */
  102. u32 traffic_class; /* 25 */
  103. u32 hop_limit; /* 26 */
  104. u32 source_gid_idx; /* 27 */
  105. u32 flow_label; /* 28 */
  106. u32 reserved_29; /* 29 */
  107. union { /* 30 */
  108. u64 dw[2];
  109. u8 byte[16];
  110. } dest_gid;
  111. u32 service_level_al; /* 34 */
  112. u32 send_grh_flag_al; /* 35 */
  113. u32 retry_count_al; /* 36 */
  114. u32 timeout_al; /* 37 */
  115. u32 max_static_rate_al; /* 38 */
  116. u32 dlid_al; /* 39 */
  117. u32 rnr_retry_count_al; /* 40 */
  118. u32 source_path_bits_al; /* 41 */
  119. u32 traffic_class_al; /* 42 */
  120. u32 hop_limit_al; /* 43 */
  121. u32 source_gid_idx_al; /* 44 */
  122. u32 flow_label_al; /* 45 */
  123. u32 reserved_46; /* 46 */
  124. u32 reserved_47; /* 47 */
  125. union { /* 48 */
  126. u64 dw[2];
  127. u8 byte[16];
  128. } dest_gid_al;
  129. u32 max_nr_outst_send_wr; /* 52 */
  130. u32 max_nr_outst_recv_wr; /* 53 */
  131. u32 disable_ete_credit_check; /* 54 */
  132. u32 qp_number; /* 55 */
  133. u64 send_queue_handle; /* 56 */
  134. u64 recv_queue_handle; /* 58 */
  135. u32 actual_nr_sges_in_sq_wqe; /* 60 */
  136. u32 actual_nr_sges_in_rq_wqe; /* 61 */
  137. u32 qp_enable; /* 62 */
  138. u32 curr_srq_limit; /* 63 */
  139. u64 qp_aff_asyn_ev_log_reg; /* 64 */
  140. u64 shared_rq_hndl; /* 66 */
  141. u64 trigg_doorbell_qp_hndl; /* 68 */
  142. u32 reserved_70_127[58]; /* 70 */
  143. };
  144. #define MQPCB_MASK_QKEY EHCA_BMASK_IBM( 0, 0)
  145. #define MQPCB_MASK_SEND_PSN EHCA_BMASK_IBM( 2, 2)
  146. #define MQPCB_MASK_RECEIVE_PSN EHCA_BMASK_IBM( 3, 3)
  147. #define MQPCB_MASK_PRIM_PHYS_PORT EHCA_BMASK_IBM( 4, 4)
  148. #define MQPCB_PRIM_PHYS_PORT EHCA_BMASK_IBM(24, 31)
  149. #define MQPCB_MASK_ALT_PHYS_PORT EHCA_BMASK_IBM( 5, 5)
  150. #define MQPCB_MASK_PRIM_P_KEY_IDX EHCA_BMASK_IBM( 6, 6)
  151. #define MQPCB_PRIM_P_KEY_IDX EHCA_BMASK_IBM(24, 31)
  152. #define MQPCB_MASK_ALT_P_KEY_IDX EHCA_BMASK_IBM( 7, 7)
  153. #define MQPCB_MASK_RDMA_ATOMIC_CTRL EHCA_BMASK_IBM( 8, 8)
  154. #define MQPCB_MASK_QP_STATE EHCA_BMASK_IBM( 9, 9)
  155. #define MQPCB_MASK_RDMA_NR_ATOMIC_RESP_RES EHCA_BMASK_IBM(11, 11)
  156. #define MQPCB_MASK_PATH_MIGRATION_STATE EHCA_BMASK_IBM(12, 12)
  157. #define MQPCB_MASK_RDMA_ATOMIC_OUTST_DEST_QP EHCA_BMASK_IBM(13, 13)
  158. #define MQPCB_MASK_DEST_QP_NR EHCA_BMASK_IBM(14, 14)
  159. #define MQPCB_MASK_MIN_RNR_NAK_TIMER_FIELD EHCA_BMASK_IBM(15, 15)
  160. #define MQPCB_MASK_SERVICE_LEVEL EHCA_BMASK_IBM(16, 16)
  161. #define MQPCB_MASK_SEND_GRH_FLAG EHCA_BMASK_IBM(17, 17)
  162. #define MQPCB_MASK_RETRY_COUNT EHCA_BMASK_IBM(18, 18)
  163. #define MQPCB_MASK_TIMEOUT EHCA_BMASK_IBM(19, 19)
  164. #define MQPCB_MASK_PATH_MTU EHCA_BMASK_IBM(20, 20)
  165. #define MQPCB_MASK_MAX_STATIC_RATE EHCA_BMASK_IBM(21, 21)
  166. #define MQPCB_MASK_DLID EHCA_BMASK_IBM(22, 22)
  167. #define MQPCB_MASK_RNR_RETRY_COUNT EHCA_BMASK_IBM(23, 23)
  168. #define MQPCB_MASK_SOURCE_PATH_BITS EHCA_BMASK_IBM(24, 24)
  169. #define MQPCB_MASK_TRAFFIC_CLASS EHCA_BMASK_IBM(25, 25)
  170. #define MQPCB_MASK_HOP_LIMIT EHCA_BMASK_IBM(26, 26)
  171. #define MQPCB_MASK_SOURCE_GID_IDX EHCA_BMASK_IBM(27, 27)
  172. #define MQPCB_MASK_FLOW_LABEL EHCA_BMASK_IBM(28, 28)
  173. #define MQPCB_MASK_DEST_GID EHCA_BMASK_IBM(30, 30)
  174. #define MQPCB_MASK_SERVICE_LEVEL_AL EHCA_BMASK_IBM(31, 31)
  175. #define MQPCB_MASK_SEND_GRH_FLAG_AL EHCA_BMASK_IBM(32, 32)
  176. #define MQPCB_MASK_RETRY_COUNT_AL EHCA_BMASK_IBM(33, 33)
  177. #define MQPCB_MASK_TIMEOUT_AL EHCA_BMASK_IBM(34, 34)
  178. #define MQPCB_MASK_MAX_STATIC_RATE_AL EHCA_BMASK_IBM(35, 35)
  179. #define MQPCB_MASK_DLID_AL EHCA_BMASK_IBM(36, 36)
  180. #define MQPCB_MASK_RNR_RETRY_COUNT_AL EHCA_BMASK_IBM(37, 37)
  181. #define MQPCB_MASK_SOURCE_PATH_BITS_AL EHCA_BMASK_IBM(38, 38)
  182. #define MQPCB_MASK_TRAFFIC_CLASS_AL EHCA_BMASK_IBM(39, 39)
  183. #define MQPCB_MASK_HOP_LIMIT_AL EHCA_BMASK_IBM(40, 40)
  184. #define MQPCB_MASK_SOURCE_GID_IDX_AL EHCA_BMASK_IBM(41, 41)
  185. #define MQPCB_MASK_FLOW_LABEL_AL EHCA_BMASK_IBM(42, 42)
  186. #define MQPCB_MASK_DEST_GID_AL EHCA_BMASK_IBM(44, 44)
  187. #define MQPCB_MASK_MAX_NR_OUTST_SEND_WR EHCA_BMASK_IBM(45, 45)
  188. #define MQPCB_MASK_MAX_NR_OUTST_RECV_WR EHCA_BMASK_IBM(46, 46)
  189. #define MQPCB_MASK_DISABLE_ETE_CREDIT_CHECK EHCA_BMASK_IBM(47, 47)
  190. #define MQPCB_MASK_QP_ENABLE EHCA_BMASK_IBM(48, 48)
  191. #define MQPCB_MASK_CURR_SRQ_LIMIT EHCA_BMASK_IBM(49, 49)
  192. #define MQPCB_MASK_QP_AFF_ASYN_EV_LOG_REG EHCA_BMASK_IBM(50, 50)
  193. #define MQPCB_MASK_SHARED_RQ_HNDL EHCA_BMASK_IBM(51, 51)
  194. #endif /* __EHCA_CLASSES_PSERIES_H__ */