Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 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 | |
| 28 | #ifndef __OCRDMA_ABI_H__ |
| 29 | #define __OCRDMA_ABI_H__ |
| 30 | |
Devesh Sharma | 2e6e9f2 | 2014-02-04 11:57:01 +0530 | [diff] [blame] | 31 | #define OCRDMA_ABI_VERSION 2 |
Devesh Sharma | b6b87d2 | 2014-02-04 11:56:58 +0530 | [diff] [blame] | 32 | #define OCRDMA_BE_ROCE_ABI_VERSION 1 |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 33 | /* user kernel communication data structures. */ |
| 34 | |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 35 | struct ocrdma_alloc_ucontext_resp { |
| 36 | u32 dev_id; |
| 37 | u32 wqe_size; |
| 38 | u32 max_inline_data; |
| 39 | u32 dpp_wqe_size; |
| 40 | u64 ah_tbl_page; |
| 41 | u32 ah_tbl_len; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 42 | u32 rqe_size; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 43 | u8 fw_ver[32]; |
| 44 | /* for future use/new features in progress */ |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 45 | u64 rsvd1; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 46 | u64 rsvd2; |
| 47 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 48 | |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 49 | struct ocrdma_alloc_pd_ureq { |
| 50 | u64 rsvd1; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 51 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 52 | |
| 53 | struct ocrdma_alloc_pd_uresp { |
| 54 | u32 id; |
| 55 | u32 dpp_enabled; |
| 56 | u32 dpp_page_addr_hi; |
| 57 | u32 dpp_page_addr_lo; |
| 58 | u64 rsvd1; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 59 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 60 | |
| 61 | struct ocrdma_create_cq_ureq { |
| 62 | u32 dpp_cq; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 63 | u32 rsvd; /* pad */ |
| 64 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 65 | |
| 66 | #define MAX_CQ_PAGES 8 |
| 67 | struct ocrdma_create_cq_uresp { |
| 68 | u32 cq_id; |
| 69 | u32 page_size; |
| 70 | u32 num_pages; |
| 71 | u32 max_hw_cqe; |
| 72 | u64 page_addr[MAX_CQ_PAGES]; |
| 73 | u64 db_page_addr; |
| 74 | u32 db_page_size; |
| 75 | u32 phase_change; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 76 | /* for future use/new features in progress */ |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 77 | u64 rsvd1; |
| 78 | u64 rsvd2; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 79 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 80 | |
| 81 | #define MAX_QP_PAGES 8 |
| 82 | #define MAX_UD_AV_PAGES 8 |
| 83 | |
| 84 | struct ocrdma_create_qp_ureq { |
| 85 | u8 enable_dpp_cq; |
| 86 | u8 rsvd; |
| 87 | u16 dpp_cq_id; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 88 | u32 rsvd1; /* pad */ |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 89 | }; |
| 90 | |
| 91 | struct ocrdma_create_qp_uresp { |
| 92 | u16 qp_id; |
| 93 | u16 sq_dbid; |
| 94 | u16 rq_dbid; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 95 | u16 resv0; /* pad */ |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 96 | u32 sq_page_size; |
| 97 | u32 rq_page_size; |
| 98 | u32 num_sq_pages; |
| 99 | u32 num_rq_pages; |
| 100 | u64 sq_page_addr[MAX_QP_PAGES]; |
| 101 | u64 rq_page_addr[MAX_QP_PAGES]; |
| 102 | u64 db_page_addr; |
| 103 | u32 db_page_size; |
| 104 | u32 dpp_credit; |
| 105 | u32 dpp_offset; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 106 | u32 num_wqe_allocated; |
| 107 | u32 num_rqe_allocated; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 108 | u32 db_sq_offset; |
| 109 | u32 db_rq_offset; |
| 110 | u32 db_shift; |
Devesh Sharma | fad51b7 | 2014-02-04 11:57:10 +0530 | [diff] [blame] | 111 | u64 rsvd[11]; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 112 | } __packed; |
| 113 | |
| 114 | struct ocrdma_create_srq_uresp { |
| 115 | u16 rq_dbid; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 116 | u16 resv0; /* pad */ |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 117 | u32 resv1; |
| 118 | |
| 119 | u32 rq_page_size; |
| 120 | u32 num_rq_pages; |
| 121 | |
| 122 | u64 rq_page_addr[MAX_QP_PAGES]; |
| 123 | u64 db_page_addr; |
| 124 | |
| 125 | u32 db_page_size; |
| 126 | u32 num_rqe_allocated; |
| 127 | u32 db_rq_offset; |
| 128 | u32 db_shift; |
| 129 | |
Parav Pandit | cd4fedf | 2012-05-23 21:02:07 +0530 | [diff] [blame] | 130 | u64 rsvd2; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 131 | u64 rsvd3; |
Naresh Gottumukkala | 7b9b1a5 | 2013-08-07 12:52:36 +0530 | [diff] [blame] | 132 | }; |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 133 | |
| 134 | #endif /* __OCRDMA_ABI_H__ */ |