blob: 5d7b7855afb9d2c8fe9178e11d9dcf60cc41096d [file] [log] [blame]
Heiko J Schickfab97222006-09-22 15:22:22 -07001/*
2 * IBM eServer eHCA Infiniband device driver for Linux on POWER
3 *
4 * Struct definition for eHCA internal structures
5 *
6 * Authors: Heiko J Schick <schickhj@de.ibm.com>
7 * Christoph Raisch <raisch@de.ibm.com>
Joachim Fenkesa6a12942007-07-09 15:25:10 +02008 * Joachim Fenkes <fenkes@de.ibm.com>
Heiko J Schickfab97222006-09-22 15:22:22 -07009 *
10 * Copyright (c) 2005 IBM Corporation
11 *
12 * All rights reserved.
13 *
14 * This source code is distributed under a dual license of GPL v2.0 and OpenIB
15 * BSD.
16 *
17 * OpenIB BSD License
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are met:
21 *
22 * Redistributions of source code must retain the above copyright notice, this
23 * list of conditions and the following disclaimer.
24 *
25 * Redistributions in binary form must reproduce the above copyright notice,
26 * this list of conditions and the following disclaimer in the documentation
27 * and/or other materials
28 * provided with the distribution.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
34 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
37 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
38 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 * POSSIBILITY OF SUCH DAMAGE.
41 */
42
43#ifndef __EHCA_CLASSES_H__
44#define __EHCA_CLASSES_H__
45
Heiko J Schickfab97222006-09-22 15:22:22 -070046struct ehca_module;
47struct ehca_qp;
48struct ehca_cq;
49struct ehca_eq;
50struct ehca_mr;
51struct ehca_mw;
52struct ehca_pd;
53struct ehca_av;
54
Hoang-Nam Nguyen31726792007-02-28 18:01:02 +010055#include <linux/wait.h>
Roland Dreier1fea3912007-10-09 19:59:05 -070056#include <linux/mutex.h>
Hoang-Nam Nguyen31726792007-02-28 18:01:02 +010057
Heiko J Schickfab97222006-09-22 15:22:22 -070058#include <rdma/ib_verbs.h>
59#include <rdma/ib_user_verbs.h>
60
Hoang-Nam Nguyen78d8d5f2007-02-15 17:06:33 +010061#ifdef CONFIG_PPC64
62#include "ehca_classes_pSeries.h"
63#endif
64#include "ipz_pt_fn.h"
65#include "ehca_qes.h"
Heiko J Schickfab97222006-09-22 15:22:22 -070066#include "ehca_irq.h"
67
Hoang-Nam Nguyen78d8d5f2007-02-15 17:06:33 +010068#define EHCA_EQE_CACHE_SIZE 20
Stefan Roscherd227fa72008-04-29 13:46:53 -070069#define EHCA_MAX_NUM_QUEUES 0xffff
Hoang-Nam Nguyen78d8d5f2007-02-15 17:06:33 +010070
71struct ehca_eqe_cache_entry {
72 struct ehca_eqe *eqe;
73 struct ehca_cq *cq;
74};
75
Heiko J Schickfab97222006-09-22 15:22:22 -070076struct ehca_eq {
77 u32 length;
78 struct ipz_queue ipz_queue;
79 struct ipz_eq_handle ipz_eq_handle;
80 struct work_struct work;
81 struct h_galpas galpas;
82 int is_initialized;
83 struct ehca_pfeq pf;
84 spinlock_t spinlock;
85 struct tasklet_struct interrupt_task;
86 u32 ist;
Hoang-Nam Nguyen78d8d5f2007-02-15 17:06:33 +010087 spinlock_t irq_spinlock;
88 struct ehca_eqe_cache_entry eqe_cache[EHCA_EQE_CACHE_SIZE];
Heiko J Schickfab97222006-09-22 15:22:22 -070089};
90
Joachim Fenkes8705ce52007-07-09 15:32:22 +020091struct ehca_sma_attr {
92 u16 lid, lmc, sm_sl, sm_lid;
93 u16 pkey_tbl_len, pkeys[16];
94};
95
Heiko J Schickfab97222006-09-22 15:22:22 -070096struct ehca_sport {
97 struct ib_cq *ibcq_aqp1;
Hoang-Nam Nguyenb8b50e32008-01-17 15:04:32 +010098 struct ib_qp *ibqp_sqp[2];
Hoang-Nam Nguyenbbdd2672008-01-17 15:05:45 +010099 /* lock to serialze modify_qp() calls for sqp in normal
100 * and irq path (when event PORT_ACTIVE is received first time)
101 */
102 spinlock_t mod_sqp_lock;
Heiko J Schickfab97222006-09-22 15:22:22 -0700103 enum ib_port_state port_state;
Joachim Fenkes8705ce52007-07-09 15:32:22 +0200104 struct ehca_sma_attr saved_attr;
Hoang-Nam Nguyen2b5e6b12008-01-25 21:18:27 +0100105 u32 pma_qp_nr;
Heiko J Schickfab97222006-09-22 15:22:22 -0700106};
107
Hoang-Nam Nguyen08c283a2007-09-13 18:14:58 +0200108#define HCA_CAP_MR_PGSIZE_4K 0x80000000
109#define HCA_CAP_MR_PGSIZE_64K 0x40000000
110#define HCA_CAP_MR_PGSIZE_1M 0x20000000
111#define HCA_CAP_MR_PGSIZE_16M 0x10000000
Hoang-Nam Nguyen5bb7d922007-07-20 16:01:51 +0200112
Heiko J Schickfab97222006-09-22 15:22:22 -0700113struct ehca_shca {
114 struct ib_device ib_device;
Joachim Fenkes6b08f3a2007-09-26 19:45:51 +1000115 struct of_device *ofdev;
Heiko J Schickfab97222006-09-22 15:22:22 -0700116 u8 num_ports;
117 int hw_level;
118 struct list_head shca_list;
119 struct ipz_adapter_handle ipz_hca_handle;
120 struct ehca_sport sport[2];
121 struct ehca_eq eq;
122 struct ehca_eq neq;
123 struct ehca_mr *maxmr;
124 struct ehca_pd *pd;
125 struct h_galpas galpas;
Joachim Fenkesc4ed7902007-04-24 17:44:31 +0200126 struct mutex modify_mutex;
Joachim Fenkes91f13aa2007-07-09 15:21:45 +0200127 u64 hca_cap;
Hoang-Nam Nguyen5bb7d922007-07-20 16:01:51 +0200128 /* MR pgsize: bit 0-3 means 4K, 64K, 1M, 16M respectively */
129 u32 hca_cap_mr_pgsize;
Joachim Fenkes91f13aa2007-07-09 15:21:45 +0200130 int max_mtu;
Stefan Roscherd227fa72008-04-29 13:46:53 -0700131 atomic_t num_cqs;
132 atomic_t num_qps;
Heiko J Schickfab97222006-09-22 15:22:22 -0700133};
134
135struct ehca_pd {
136 struct ib_pd ib_pd;
137 struct ipz_pd fw_pd;
Stefan Roschere2f81da2007-07-20 16:04:17 +0200138 /* small queue mgmt */
139 struct mutex lock;
140 struct list_head free[2];
141 struct list_head full[2];
Heiko J Schickfab97222006-09-22 15:22:22 -0700142};
143
Joachim Fenkesa6a12942007-07-09 15:25:10 +0200144enum ehca_ext_qp_type {
145 EQPT_NORMAL = 0,
146 EQPT_LLQP = 1,
147 EQPT_SRQBASE = 2,
148 EQPT_SRQ = 3,
149};
150
Hoang-Nam Nguyenbbdd2672008-01-17 15:05:45 +0100151/* struct to cache modify_qp()'s parms for GSI/SMI qp */
152struct ehca_mod_qp_parm {
153 int mask;
154 struct ib_qp_attr attr;
155};
156
157#define EHCA_MOD_QP_PARM_MAX 4
158
Alexander Schmidt6773f072008-08-12 15:46:30 +0200159#define QMAP_IDX_MASK 0xFFFFULL
160
161/* struct for tracking if cqes have been reported to the application */
162struct ehca_qmap_entry {
163 u16 app_wr_id;
164 u16 reported;
165};
166
Alexander Schmidtb9012e02008-09-20 20:05:21 -0700167struct ehca_queue_map {
168 struct ehca_qmap_entry *map;
169 unsigned int entries;
170 unsigned int tail;
171 unsigned int left_to_poll;
172};
173
Heiko J Schickfab97222006-09-22 15:22:22 -0700174struct ehca_qp {
Joachim Fenkesa6a12942007-07-09 15:25:10 +0200175 union {
176 struct ib_qp ib_qp;
177 struct ib_srq ib_srq;
178 };
Heiko J Schickfab97222006-09-22 15:22:22 -0700179 u32 qp_type;
Joachim Fenkesa6a12942007-07-09 15:25:10 +0200180 enum ehca_ext_qp_type ext_type;
Joachim Fenkes863fb092008-04-23 11:55:45 -0700181 enum ib_qp_state state;
Heiko J Schickfab97222006-09-22 15:22:22 -0700182 struct ipz_queue ipz_squeue;
Alexander Schmidtb9012e02008-09-20 20:05:21 -0700183 struct ehca_queue_map sq_map;
Heiko J Schickfab97222006-09-22 15:22:22 -0700184 struct ipz_queue ipz_rqueue;
Alexander Schmidtb9012e02008-09-20 20:05:21 -0700185 struct ehca_queue_map rq_map;
Heiko J Schickfab97222006-09-22 15:22:22 -0700186 struct h_galpas galpas;
187 u32 qkey;
188 u32 real_qp_num;
189 u32 token;
190 spinlock_t spinlock_s;
191 spinlock_t spinlock_r;
192 u32 sq_max_inline_data_size;
193 struct ipz_qp_handle ipz_qp_handle;
194 struct ehca_pfqp pf;
195 struct ib_qp_init_attr init_attr;
Heiko J Schickfab97222006-09-22 15:22:22 -0700196 struct ehca_cq *send_cq;
197 struct ehca_cq *recv_cq;
198 unsigned int sqerr_purgeflag;
199 struct hlist_node list_entries;
Hoang-Nam Nguyenbbdd2672008-01-17 15:05:45 +0100200 /* array to cache modify_qp()'s parms for GSI/SMI qp */
201 struct ehca_mod_qp_parm *mod_qp_parm;
202 int mod_qp_parm_idx;
Hoang-Nam Nguyen4c34bdf2007-01-24 00:13:35 +0100203 /* mmap counter for resources mapped into user space */
204 u32 mm_count_squeue;
205 u32 mm_count_rqueue;
206 u32 mm_count_galpa;
Joachim Fenkes2ec8e6622008-01-17 15:07:24 +0100207 /* unsolicited ack circumvention */
208 int unsol_ack_circ;
209 int mtu_shift;
210 u32 message_count;
211 u32 packet_count;
Stefan Roscher12137c52008-05-07 11:35:06 -0700212 atomic_t nr_events; /* events seen */
213 wait_queue_head_t wait_completion;
Joachim Fenkes5b673b72008-07-22 14:18:07 -0700214 int mig_armed;
Alexander Schmidtb9012e02008-09-20 20:05:21 -0700215 struct list_head sq_err_node;
216 struct list_head rq_err_node;
Heiko J Schickfab97222006-09-22 15:22:22 -0700217};
218
Joachim Fenkesa6a12942007-07-09 15:25:10 +0200219#define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ)
220#define HAS_SQ(qp) (qp->ext_type != EQPT_SRQ)
221#define HAS_RQ(qp) (qp->ext_type != EQPT_SRQBASE)
222
Heiko J Schickfab97222006-09-22 15:22:22 -0700223/* must be power of 2 */
224#define QP_HASHTAB_LEN 8
225
226struct ehca_cq {
227 struct ib_cq ib_cq;
228 struct ipz_queue ipz_queue;
229 struct h_galpas galpas;
230 spinlock_t spinlock;
231 u32 cq_number;
232 u32 token;
233 u32 nr_of_entries;
234 struct ipz_cq_handle ipz_cq_handle;
235 struct ehca_pfcq pf;
236 spinlock_t cb_lock;
Heiko J Schickfab97222006-09-22 15:22:22 -0700237 struct hlist_head qp_hashtab[QP_HASHTAB_LEN];
238 struct list_head entry;
Joachim Fenkes28db6be2007-07-09 15:30:39 +0200239 u32 nr_callbacks; /* #events assigned to cpu by scaling code */
240 atomic_t nr_events; /* #events seen */
Hoang-Nam Nguyen31726792007-02-28 18:01:02 +0100241 wait_queue_head_t wait_completion;
Heiko J Schickfab97222006-09-22 15:22:22 -0700242 spinlock_t task_lock;
Hoang-Nam Nguyen4c34bdf2007-01-24 00:13:35 +0100243 /* mmap counter for resources mapped into user space */
244 u32 mm_count_queue;
245 u32 mm_count_galpa;
Alexander Schmidtb9012e02008-09-20 20:05:21 -0700246 struct list_head sqp_err_list;
247 struct list_head rqp_err_list;
Heiko J Schickfab97222006-09-22 15:22:22 -0700248};
249
250enum ehca_mr_flag {
251 EHCA_MR_FLAG_FMR = 0x80000000, /* FMR, created with ehca_alloc_fmr */
252 EHCA_MR_FLAG_MAXMR = 0x40000000, /* max-MR */
253};
254
255struct ehca_mr {
256 union {
257 struct ib_mr ib_mr; /* must always be first in ehca_mr */
258 struct ib_fmr ib_fmr; /* must always be first in ehca_mr */
259 } ib;
Roland Dreierf7c6a7b2007-03-04 16:15:11 -0800260 struct ib_umem *umem;
Heiko J Schickfab97222006-09-22 15:22:22 -0700261 spinlock_t mrlock;
262
263 enum ehca_mr_flag flags;
Hoang-Nam Nguyendf17bfd2007-07-12 17:52:29 +0200264 u32 num_kpages; /* number of kernel pages */
265 u32 num_hwpages; /* number of hw pages to form MR */
Hoang-Nam Nguyen5bb7d922007-07-20 16:01:51 +0200266 u64 hwpage_size; /* hw page size used for this MR */
Heiko J Schickfab97222006-09-22 15:22:22 -0700267 int acl; /* ACL (stored here for usage in reregister) */
268 u64 *start; /* virtual start address (stored here for */
Hoang-Nam Nguyen2b943972007-07-12 17:53:47 +0200269 /* usage in reregister) */
Heiko J Schickfab97222006-09-22 15:22:22 -0700270 u64 size; /* size (stored here for usage in reregister) */
271 u32 fmr_page_size; /* page size for FMR */
272 u32 fmr_max_pages; /* max pages for FMR */
273 u32 fmr_max_maps; /* max outstanding maps for FMR */
274 u32 fmr_map_cnt; /* map counter for FMR */
275 /* fw specific data */
276 struct ipz_mrmw_handle ipz_mr_handle; /* MR handle for h-calls */
277 struct h_galpas galpas;
Heiko J Schickfab97222006-09-22 15:22:22 -0700278};
279
280struct ehca_mw {
281 struct ib_mw ib_mw; /* gen2 mw, must always be first in ehca_mw */
282 spinlock_t mwlock;
283
284 u8 never_bound; /* indication MW was never bound */
285 struct ipz_mrmw_handle ipz_mw_handle; /* MW handle for h-calls */
286 struct h_galpas galpas;
287};
288
289enum ehca_mr_pgi_type {
290 EHCA_MR_PGI_PHYS = 1, /* type of ehca_reg_phys_mr,
291 * ehca_rereg_phys_mr,
292 * ehca_reg_internal_maxmr */
293 EHCA_MR_PGI_USER = 2, /* type of ehca_reg_user_mr */
294 EHCA_MR_PGI_FMR = 3 /* type of ehca_map_phys_fmr */
295};
296
297struct ehca_mr_pginfo {
298 enum ehca_mr_pgi_type type;
Hoang-Nam Nguyendf17bfd2007-07-12 17:52:29 +0200299 u64 num_kpages;
300 u64 kpage_cnt;
Hoang-Nam Nguyen5bb7d922007-07-20 16:01:51 +0200301 u64 hwpage_size; /* hw page size used for this MR */
Hoang-Nam Nguyendf17bfd2007-07-12 17:52:29 +0200302 u64 num_hwpages; /* number of hw pages */
303 u64 hwpage_cnt; /* counter for hw pages */
304 u64 next_hwpage; /* next hw page in buffer/chunk/listelem */
Heiko J Schickfab97222006-09-22 15:22:22 -0700305
Hoang-Nam Nguyendf17bfd2007-07-12 17:52:29 +0200306 union {
307 struct { /* type EHCA_MR_PGI_PHYS section */
308 int num_phys_buf;
309 struct ib_phys_buf *phys_buf_array;
310 u64 next_buf;
311 } phy;
312 struct { /* type EHCA_MR_PGI_USER section */
313 struct ib_umem *region;
314 struct ib_umem_chunk *next_chunk;
315 u64 next_nmap;
316 } usr;
317 struct { /* type EHCA_MR_PGI_FMR section */
318 u64 fmr_pgsize;
319 u64 *page_list;
320 u64 next_listelem;
321 } fmr;
322 } u;
Heiko J Schickfab97222006-09-22 15:22:22 -0700323};
324
325/* output parameters for MR/FMR hipz calls */
326struct ehca_mr_hipzout_parms {
327 struct ipz_mrmw_handle handle;
328 u32 lkey;
329 u32 rkey;
330 u64 len;
331 u64 vaddr;
332 u32 acl;
333};
334
335/* output parameters for MW hipz calls */
336struct ehca_mw_hipzout_parms {
337 struct ipz_mrmw_handle handle;
338 u32 rkey;
339};
340
341struct ehca_av {
342 struct ib_ah ib_ah;
343 struct ehca_ud_av av;
344};
345
346struct ehca_ucontext {
347 struct ib_ucontext ib_ucontext;
348};
349
Heiko J Schickfab97222006-09-22 15:22:22 -0700350int ehca_init_pd_cache(void);
351void ehca_cleanup_pd_cache(void);
352int ehca_init_cq_cache(void);
353void ehca_cleanup_cq_cache(void);
354int ehca_init_qp_cache(void);
355void ehca_cleanup_qp_cache(void);
356int ehca_init_av_cache(void);
357void ehca_cleanup_av_cache(void);
358int ehca_init_mrmw_cache(void);
359void ehca_cleanup_mrmw_cache(void);
Stefan Roschere2f81da2007-07-20 16:04:17 +0200360int ehca_init_small_qp_cache(void);
361void ehca_cleanup_small_qp_cache(void);
Heiko J Schickfab97222006-09-22 15:22:22 -0700362
Joachim Fenkes26ed6872007-07-09 15:31:10 +0200363extern rwlock_t ehca_qp_idr_lock;
364extern rwlock_t ehca_cq_idr_lock;
Heiko J Schickfab97222006-09-22 15:22:22 -0700365extern struct idr ehca_qp_idr;
366extern struct idr ehca_cq_idr;
367
368extern int ehca_static_rate;
369extern int ehca_port_act_time;
370extern int ehca_use_hp_mr;
Hoang-Nam Nguyen4fd30062007-02-15 17:08:33 +0100371extern int ehca_scaling_code;
Joachim Fenkes3d758a42007-12-13 13:35:57 +0100372extern int ehca_lock_hcalls;
Hoang-Nam Nguyenbbdd2672008-01-17 15:05:45 +0100373extern int ehca_nr_ports;
Stefan Roscherd227fa72008-04-29 13:46:53 -0700374extern int ehca_max_cq;
375extern int ehca_max_qp;
Heiko J Schickfab97222006-09-22 15:22:22 -0700376
377struct ipzu_queue_resp {
Heiko J Schickfab97222006-09-22 15:22:22 -0700378 u32 qe_size; /* queue entry size */
379 u32 act_nr_of_sg;
380 u32 queue_length; /* queue length allocated in bytes */
381 u32 pagesize;
382 u32 toggle_state;
Stefan Roschere2f81da2007-07-20 16:04:17 +0200383 u32 offset; /* save offset within a page for small_qp */
Heiko J Schickfab97222006-09-22 15:22:22 -0700384};
385
386struct ehca_create_cq_resp {
387 u32 cq_number;
388 u32 token;
389 struct ipzu_queue_resp ipz_queue;
Hoang-Nam Nguyene390d3b2007-09-11 15:31:06 +0200390 u32 fw_handle_ofs;
391 u32 dummy;
Heiko J Schickfab97222006-09-22 15:22:22 -0700392};
393
394struct ehca_create_qp_resp {
395 u32 qp_num;
396 u32 token;
397 u32 qp_type;
Joachim Fenkesa6a12942007-07-09 15:25:10 +0200398 u32 ext_type;
Heiko J Schickfab97222006-09-22 15:22:22 -0700399 u32 qkey;
400 /* qp_num assigned by ehca: sqp0/1 may have got different numbers */
401 u32 real_qp_num;
Hoang-Nam Nguyene390d3b2007-09-11 15:31:06 +0200402 u32 fw_handle_ofs;
Hoang-Nam Nguyena6607222007-09-28 17:18:47 +0200403 u32 dummy;
Heiko J Schickfab97222006-09-22 15:22:22 -0700404 struct ipzu_queue_resp ipz_squeue;
405 struct ipzu_queue_resp ipz_rqueue;
Heiko J Schickfab97222006-09-22 15:22:22 -0700406};
407
408struct ehca_alloc_cq_parms {
409 u32 nr_cqe;
410 u32 act_nr_of_entries;
411 u32 act_pages;
412 struct ipz_eq_handle eq_handle;
413};
414
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200415enum ehca_service_type {
416 ST_RC = 0,
417 ST_UC = 1,
418 ST_RD = 2,
419 ST_UD = 3,
420};
421
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200422enum ehca_ll_comp_flags {
423 LLQP_SEND_COMP = 0x20,
424 LLQP_RECV_COMP = 0x40,
425 LLQP_COMP_MASK = 0x60,
426};
427
Stefan Roschere2f81da2007-07-20 16:04:17 +0200428struct ehca_alloc_queue_parms {
429 /* input parameters */
430 int max_wr;
431 int max_sge;
432 int page_size;
433 int is_small;
434
435 /* output parameters */
436 u16 act_nr_wqes;
437 u8 act_nr_sges;
438 u32 queue_size; /* bytes for small queues, pages otherwise */
439};
440
Heiko J Schickfab97222006-09-22 15:22:22 -0700441struct ehca_alloc_qp_parms {
Stefan Roschere2f81da2007-07-20 16:04:17 +0200442 struct ehca_alloc_queue_parms squeue;
443 struct ehca_alloc_queue_parms rqueue;
444
445 /* input parameters */
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200446 enum ehca_service_type servicetype;
Stefan Roschere2f81da2007-07-20 16:04:17 +0200447 int qp_storage;
Heiko J Schickfab97222006-09-22 15:22:22 -0700448 int sigtype;
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200449 enum ehca_ext_qp_type ext_type;
450 enum ehca_ll_comp_flags ll_comp_flags;
Heiko J Schickfab97222006-09-22 15:22:22 -0700451 int ud_av_l_key_ctl;
452
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200453 u32 token;
454 struct ipz_eq_handle eq_handle;
455 struct ipz_pd pd;
456 struct ipz_cq_handle send_cq_handle, recv_cq_handle;
457
458 u32 srq_qpn, srq_token, srq_limit;
459
Stefan Roschere2f81da2007-07-20 16:04:17 +0200460 /* output parameters */
Joachim Fenkes9a79fc02007-07-09 15:23:15 +0200461 u32 real_qp_num;
462 struct ipz_qp_handle qp_handle;
463 struct h_galpas galpas;
Heiko J Schickfab97222006-09-22 15:22:22 -0700464};
465
466int ehca_cq_assign_qp(struct ehca_cq *cq, struct ehca_qp *qp);
467int ehca_cq_unassign_qp(struct ehca_cq *cq, unsigned int qp_num);
Hoang-Nam Nguyen2b943972007-07-12 17:53:47 +0200468struct ehca_qp *ehca_cq_get_qp(struct ehca_cq *cq, int qp_num);
Heiko J Schickfab97222006-09-22 15:22:22 -0700469
470#endif