ocrdma_abi.h 3.2 KB

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