aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_classes.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_classes.h')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_classes.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
index 6e75db68996e..9d689aeb928a 100644
--- a/drivers/infiniband/hw/ehca/ehca_classes.h
+++ b/drivers/infiniband/hw/ehca/ehca_classes.h
@@ -5,6 +5,7 @@
5 * 5 *
6 * Authors: Heiko J Schick <schickhj@de.ibm.com> 6 * Authors: Heiko J Schick <schickhj@de.ibm.com>
7 * Christoph Raisch <raisch@de.ibm.com> 7 * Christoph Raisch <raisch@de.ibm.com>
8 * Joachim Fenkes <fenkes@de.ibm.com>
8 * 9 *
9 * Copyright (c) 2005 IBM Corporation 10 * Copyright (c) 2005 IBM Corporation
10 * 11 *
@@ -117,9 +118,20 @@ struct ehca_pd {
117 u32 ownpid; 118 u32 ownpid;
118}; 119};
119 120
121enum ehca_ext_qp_type {
122 EQPT_NORMAL = 0,
123 EQPT_LLQP = 1,
124 EQPT_SRQBASE = 2,
125 EQPT_SRQ = 3,
126};
127
120struct ehca_qp { 128struct ehca_qp {
121 struct ib_qp ib_qp; 129 union {
130 struct ib_qp ib_qp;
131 struct ib_srq ib_srq;
132 };
122 u32 qp_type; 133 u32 qp_type;
134 enum ehca_ext_qp_type ext_type;
123 struct ipz_queue ipz_squeue; 135 struct ipz_queue ipz_squeue;
124 struct ipz_queue ipz_rqueue; 136 struct ipz_queue ipz_rqueue;
125 struct h_galpas galpas; 137 struct h_galpas galpas;
@@ -142,6 +154,10 @@ struct ehca_qp {
142 u32 mm_count_galpa; 154 u32 mm_count_galpa;
143}; 155};
144 156
157#define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ)
158#define HAS_SQ(qp) (qp->ext_type != EQPT_SRQ)
159#define HAS_RQ(qp) (qp->ext_type != EQPT_SRQBASE)
160
145/* must be power of 2 */ 161/* must be power of 2 */
146#define QP_HASHTAB_LEN 8 162#define QP_HASHTAB_LEN 8
147 163
@@ -307,6 +323,7 @@ struct ehca_create_qp_resp {
307 u32 qp_num; 323 u32 qp_num;
308 u32 token; 324 u32 token;
309 u32 qp_type; 325 u32 qp_type;
326 u32 ext_type;
310 u32 qkey; 327 u32 qkey;
311 /* qp_num assigned by ehca: sqp0/1 may have got different numbers */ 328 /* qp_num assigned by ehca: sqp0/1 may have got different numbers */
312 u32 real_qp_num; 329 u32 real_qp_num;
@@ -329,13 +346,6 @@ enum ehca_service_type {
329 ST_UD = 3, 346 ST_UD = 3,
330}; 347};
331 348
332enum ehca_ext_qp_type {
333 EQPT_NORMAL = 0,
334 EQPT_LLQP = 1,
335 EQPT_SRQBASE = 2,
336 EQPT_SRQ = 3,
337};
338
339enum ehca_ll_comp_flags { 349enum ehca_ll_comp_flags {
340 LLQP_SEND_COMP = 0x20, 350 LLQP_SEND_COMP = 0x20,
341 LLQP_RECV_COMP = 0x40, 351 LLQP_RECV_COMP = 0x40,