ocrdma_abi.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. /* user kernel communication data structures. */
  30. struct ocrdma_alloc_ucontext_resp {
  31. u32 dev_id;
  32. u32 wqe_size;
  33. u32 max_inline_data;
  34. u32 dpp_wqe_size;
  35. u64 ah_tbl_page;
  36. u32 ah_tbl_len;
  37. u32 rqe_size;
  38. u8 fw_ver[32];
  39. /* for future use/new features in progress */
  40. u64 rsvd1;
  41. u64 rsvd2;
  42. };
  43. struct ocrdma_alloc_pd_ureq {
  44. u64 rsvd1;
  45. };
  46. struct ocrdma_alloc_pd_uresp {
  47. u32 id;
  48. u32 dpp_enabled;
  49. u32 dpp_page_addr_hi;
  50. u32 dpp_page_addr_lo;
  51. u64 rsvd1;
  52. };
  53. struct ocrdma_create_cq_ureq {
  54. u32 dpp_cq;
  55. u32 rsvd; /* pad */
  56. };
  57. #define MAX_CQ_PAGES 8
  58. struct ocrdma_create_cq_uresp {
  59. u32 cq_id;
  60. u32 page_size;
  61. u32 num_pages;
  62. u32 max_hw_cqe;
  63. u64 page_addr[MAX_CQ_PAGES];
  64. u64 db_page_addr;
  65. u32 db_page_size;
  66. u32 phase_change;
  67. /* for future use/new features in progress */
  68. u64 rsvd1;
  69. u64 rsvd2;
  70. };
  71. #define MAX_QP_PAGES 8
  72. #define MAX_UD_AV_PAGES 8
  73. struct ocrdma_create_qp_ureq {
  74. u8 enable_dpp_cq;
  75. u8 rsvd;
  76. u16 dpp_cq_id;
  77. u32 rsvd1; /* pad */
  78. };
  79. struct ocrdma_create_qp_uresp {
  80. u16 qp_id;
  81. u16 sq_dbid;
  82. u16 rq_dbid;
  83. u16 resv0; /* pad */
  84. u32 sq_page_size;
  85. u32 rq_page_size;
  86. u32 num_sq_pages;
  87. u32 num_rq_pages;
  88. u64 sq_page_addr[MAX_QP_PAGES];
  89. u64 rq_page_addr[MAX_QP_PAGES];
  90. u64 db_page_addr;
  91. u32 db_page_size;
  92. u32 dpp_credit;
  93. u32 dpp_offset;
  94. u32 num_wqe_allocated;
  95. u32 num_rqe_allocated;
  96. u32 db_sq_offset;
  97. u32 db_rq_offset;
  98. u32 db_shift;
  99. u64 rsvd1;
  100. u64 rsvd2;
  101. u64 rsvd3;
  102. } __packed;
  103. struct ocrdma_create_srq_uresp {
  104. u16 rq_dbid;
  105. u16 resv0; /* pad */
  106. u32 resv1;
  107. u32 rq_page_size;
  108. u32 num_rq_pages;
  109. u64 rq_page_addr[MAX_QP_PAGES];
  110. u64 db_page_addr;
  111. u32 db_page_size;
  112. u32 num_rqe_allocated;
  113. u32 db_rq_offset;
  114. u32 db_shift;
  115. u64 rsvd2;
  116. u64 rsvd3;
  117. };
  118. #endif /* __OCRDMA_ABI_H__ */