ocrdma_abi.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*******************************************************************
  2. * This file is part of the Emulex RoCE Device Driver for *
  3. * RoCE (RDMA over Converged Ethernet) adapters. *
  4. * Copyright (C) 2008-2012 Emulex. All rights reserved. *
  5. * EMULEX and SLI are trademarks of Emulex. *
  6. * www.emulex.com *
  7. * *
  8. * This program is free software; you can redistribute it and/or *
  9. * modify it under the terms of version 2 of the GNU General *
  10. * Public License as published by the Free Software Foundation. *
  11. * This program is distributed in the hope that it will be useful. *
  12. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
  13. * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
  14. * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
  15. * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
  16. * TO BE LEGALLY INVALID. See the GNU General Public License for *
  17. * more details, a copy of which can be found in the file COPYING *
  18. * included with this package. *
  19. *
  20. * Contact Information:
  21. * linux-drivers@emulex.com
  22. *
  23. * Emulex
  24. * 3333 Susan Street
  25. * Costa Mesa, CA 92626
  26. *******************************************************************/
  27. #ifndef __OCRDMA_ABI_H__
  28. #define __OCRDMA_ABI_H__
  29. struct ocrdma_alloc_ucontext_resp {
  30. u32 dev_id;
  31. u32 wqe_size;
  32. u32 max_inline_data;
  33. u32 dpp_wqe_size;
  34. u64 ah_tbl_page;
  35. u32 ah_tbl_len;
  36. u32 rsvd;
  37. u8 fw_ver[32];
  38. u32 rqe_size;
  39. u64 rsvd1;
  40. } __packed;
  41. /* user kernel communication data structures. */
  42. struct ocrdma_alloc_pd_ureq {
  43. u64 rsvd1;
  44. } __packed;
  45. struct ocrdma_alloc_pd_uresp {
  46. u32 id;
  47. u32 dpp_enabled;
  48. u32 dpp_page_addr_hi;
  49. u32 dpp_page_addr_lo;
  50. u64 rsvd1;
  51. } __packed;
  52. struct ocrdma_create_cq_ureq {
  53. u32 dpp_cq;
  54. u32 rsvd;
  55. } __packed;
  56. #define MAX_CQ_PAGES 8
  57. struct ocrdma_create_cq_uresp {
  58. u32 cq_id;
  59. u32 page_size;
  60. u32 num_pages;
  61. u32 max_hw_cqe;
  62. u64 page_addr[MAX_CQ_PAGES];
  63. u64 db_page_addr;
  64. u32 db_page_size;
  65. u32 phase_change;
  66. u64 rsvd1;
  67. u64 rsvd2;
  68. } __packed;
  69. #define MAX_QP_PAGES 8
  70. #define MAX_UD_AV_PAGES 8
  71. struct ocrdma_create_qp_ureq {
  72. u8 enable_dpp_cq;
  73. u8 rsvd;
  74. u16 dpp_cq_id;
  75. u32 rsvd1;
  76. };
  77. struct ocrdma_create_qp_uresp {
  78. u16 qp_id;
  79. u16 sq_dbid;
  80. u16 rq_dbid;
  81. u16 resv0;
  82. u32 sq_page_size;
  83. u32 rq_page_size;
  84. u32 num_sq_pages;
  85. u32 num_rq_pages;
  86. u64 sq_page_addr[MAX_QP_PAGES];
  87. u64 rq_page_addr[MAX_QP_PAGES];
  88. u64 db_page_addr;
  89. u32 db_page_size;
  90. u32 dpp_credit;
  91. u32 dpp_offset;
  92. u32 rsvd1;
  93. u32 num_wqe_allocated;
  94. u32 num_rqe_allocated;
  95. u32 db_sq_offset;
  96. u32 db_rq_offset;
  97. u32 db_shift;
  98. u64 rsvd2;
  99. u64 rsvd3;
  100. } __packed;
  101. struct ocrdma_create_srq_uresp {
  102. u16 rq_dbid;
  103. u16 resv0;
  104. u32 resv1;
  105. u32 rq_page_size;
  106. u32 num_rq_pages;
  107. u64 rq_page_addr[MAX_QP_PAGES];
  108. u64 db_page_addr;
  109. u32 db_page_size;
  110. u32 num_rqe_allocated;
  111. u32 db_rq_offset;
  112. u32 db_shift;
  113. u64 rsvd2;
  114. u64 rsvd3;
  115. } __packed;
  116. #endif /* __OCRDMA_ABI_H__ */