Skip to content

Commit

Permalink
IB/ehca: QP code restructuring in preparation for SRQ
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Joachim Fenkes authored and Roland Dreier committed Jul 10, 2007
1 parent 91f13aa commit 9a79fc0
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 170 deletions.
46 changes: 39 additions & 7 deletions drivers/infiniband/hw/ehca/ehca_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,24 +322,56 @@ struct ehca_alloc_cq_parms {
struct ipz_eq_handle eq_handle;
};

enum ehca_service_type {
ST_RC = 0,
ST_UC = 1,
ST_RD = 2,
ST_UD = 3,
};

enum ehca_ext_qp_type {
EQPT_NORMAL = 0,
EQPT_LLQP = 1,
EQPT_SRQBASE = 2,
EQPT_SRQ = 3,
};

enum ehca_ll_comp_flags {
LLQP_SEND_COMP = 0x20,
LLQP_RECV_COMP = 0x40,
LLQP_COMP_MASK = 0x60,
};

struct ehca_alloc_qp_parms {
int servicetype;
/* input parameters */
enum ehca_service_type servicetype;
int sigtype;
int daqp_ctrl;
int max_send_sge;
int max_recv_sge;
enum ehca_ext_qp_type ext_type;
enum ehca_ll_comp_flags ll_comp_flags;

int max_send_wr, max_recv_wr;
int max_send_sge, max_recv_sge;
int ud_av_l_key_ctl;

u32 token;
struct ipz_eq_handle eq_handle;
struct ipz_pd pd;
struct ipz_cq_handle send_cq_handle, recv_cq_handle;

u32 srq_qpn, srq_token, srq_limit;

/* output parameters */
u32 real_qp_num;
struct ipz_qp_handle qp_handle;
struct h_galpas galpas;

u16 act_nr_send_wqes;
u16 act_nr_recv_wqes;
u8 act_nr_recv_sges;
u8 act_nr_send_sges;

u32 nr_rq_pages;
u32 nr_sq_pages;

struct ipz_eq_handle ipz_eq_handle;
struct ipz_pd pd;
};

int ehca_cq_assign_qp(struct ehca_cq *cq, struct ehca_qp *qp);
Expand Down
Loading

0 comments on commit 9a79fc0

Please sign in to comment.