diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2007-07-09 09:23:15 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:27 -0400 |
commit | 9a79fc0a1b815cbd05a8e37ea838acfccb7235cc (patch) | |
tree | ed94fc291a5017f94e2b9d57f6909a84e1eb40db /drivers/infiniband/hw/ehca/ehca_classes.h | |
parent | 91f13aa3fc22e357b494c5b8270e94543870928d (diff) |
IB/ehca: QP code restructuring in preparation for SRQ
- Replace init_qp_queues() by a shorter init_qp_queue(), eliminating
duplicate code.
- hipz_h_alloc_resource_qp() doesn't need a pointer to struct ehca_qp any
longer. All input and output data is transferred through the parms
parameter.
- Change the interface to also support SRQ.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_classes.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_classes.h | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 35d948f2502c..6e75db68996e 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h | |||
@@ -322,14 +322,49 @@ struct ehca_alloc_cq_parms { | |||
322 | struct ipz_eq_handle eq_handle; | 322 | struct ipz_eq_handle eq_handle; |
323 | }; | 323 | }; |
324 | 324 | ||
325 | enum ehca_service_type { | ||
326 | ST_RC = 0, | ||
327 | ST_UC = 1, | ||
328 | ST_RD = 2, | ||
329 | ST_UD = 3, | ||
330 | }; | ||
331 | |||
332 | enum ehca_ext_qp_type { | ||
333 | EQPT_NORMAL = 0, | ||
334 | EQPT_LLQP = 1, | ||
335 | EQPT_SRQBASE = 2, | ||
336 | EQPT_SRQ = 3, | ||
337 | }; | ||
338 | |||
339 | enum ehca_ll_comp_flags { | ||
340 | LLQP_SEND_COMP = 0x20, | ||
341 | LLQP_RECV_COMP = 0x40, | ||
342 | LLQP_COMP_MASK = 0x60, | ||
343 | }; | ||
344 | |||
325 | struct ehca_alloc_qp_parms { | 345 | struct ehca_alloc_qp_parms { |
326 | int servicetype; | 346 | /* input parameters */ |
347 | enum ehca_service_type servicetype; | ||
327 | int sigtype; | 348 | int sigtype; |
328 | int daqp_ctrl; | 349 | enum ehca_ext_qp_type ext_type; |
329 | int max_send_sge; | 350 | enum ehca_ll_comp_flags ll_comp_flags; |
330 | int max_recv_sge; | 351 | |
352 | int max_send_wr, max_recv_wr; | ||
353 | int max_send_sge, max_recv_sge; | ||
331 | int ud_av_l_key_ctl; | 354 | int ud_av_l_key_ctl; |
332 | 355 | ||
356 | u32 token; | ||
357 | struct ipz_eq_handle eq_handle; | ||
358 | struct ipz_pd pd; | ||
359 | struct ipz_cq_handle send_cq_handle, recv_cq_handle; | ||
360 | |||
361 | u32 srq_qpn, srq_token, srq_limit; | ||
362 | |||
363 | /* output parameters */ | ||
364 | u32 real_qp_num; | ||
365 | struct ipz_qp_handle qp_handle; | ||
366 | struct h_galpas galpas; | ||
367 | |||
333 | u16 act_nr_send_wqes; | 368 | u16 act_nr_send_wqes; |
334 | u16 act_nr_recv_wqes; | 369 | u16 act_nr_recv_wqes; |
335 | u8 act_nr_recv_sges; | 370 | u8 act_nr_recv_sges; |
@@ -337,9 +372,6 @@ struct ehca_alloc_qp_parms { | |||
337 | 372 | ||
338 | u32 nr_rq_pages; | 373 | u32 nr_rq_pages; |
339 | u32 nr_sq_pages; | 374 | u32 nr_sq_pages; |
340 | |||
341 | struct ipz_eq_handle ipz_eq_handle; | ||
342 | struct ipz_pd pd; | ||
343 | }; | 375 | }; |
344 | 376 | ||
345 | int ehca_cq_assign_qp(struct ehca_cq *cq, struct ehca_qp *qp); | 377 | int ehca_cq_assign_qp(struct ehca_cq *cq, struct ehca_qp *qp); |