[openib-general] [PATCH]: GSI Use ib_create_qp rather than ib_get_special_qp
Hal Rosenstock
halr at voltaire.com
Tue Aug 10 18:40:26 PDT 2004
Use ib_create_qp rather than ib_get_special_qp
Index: access/gsi_main.c
===================================================================
--- access/gsi_main.c (revision 624)
+++ access/gsi_main.c (working copy)
@@ -732,20 +732,19 @@
qp_init_attr.recv_cq = hca->cq;
qp_init_attr.sq_sig_type = IB_SIGNAL_ALL_WR;
qp_init_attr.rq_sig_type = IB_SIGNAL_ALL_WR;
- qp_init_attr.qp_type = IB_QPT_GSI;
qp_init_attr.cap.max_send_wr = GSI_QP_SND_SIZE;
qp_init_attr.cap.max_recv_wr = GSI_QP_RCV_SIZE;
qp_init_attr.cap.max_send_sge = GSI_SND_REQ_MAX_SG;
qp_init_attr.cap.max_recv_sge = GSI_RCV_REQ_MAX_SG;
#if 0 /* GSI_REDIRECT */
- hca->qp =
- ib_create_qp(hca->pd, hca->port, IB_QPT_UD, &qp_init_attr, &qp_cap);
+ qp_init_attr.qp_type = IB_QPT_UD;
#else
- hca->qp =
- ib_get_special_qp(hca->pd, hca->port, IB_QPT_GSI, &qp_init_attr,
- &qp_cap);
+ qp_init_attr.qp_type = IB_QPT_GSI;
+ qp_init_attr.port_num = hca->port;
#endif
+ hca->qp =
+ ib_create_qp(hca->pd, &qp_init_attr, &qp_cap);
if (IS_ERR(hca->qp)) {
printk(KERN_ERR "Could not create QP.\n");
ret = PTR_ERR(hca->qp);
Index: include/ib_verbs.h
===================================================================
--- include/ib_verbs.h (revision 625)
+++ include/ib_verbs.h (working copy)
@@ -299,6 +299,7 @@
enum ib_sig_type sq_sig_type;
enum ib_sig_type rq_sig_type;
enum ib_qp_type qp_type;
+ u8 port_num; /* special QP types only */
};
enum ib_qp_attr_mask {
@@ -578,12 +579,6 @@
int ib_destroy_qp(struct ib_qp *qp);
-struct ib_qp *ib_get_special_qp(struct ib_pd *pd,
- u8 port_num,
- enum ib_qp_type qp_type,
- struct ib_qp_init_attr *qp_init_attr,
- struct ib_qp_cap *qp_cap);
-
struct ib_srq *ib_create_srq(struct ib_pd *pd, struct ib_srq_attr *srq_attr);
int ib_query_srq(struct ib_srq *srq,
More information about the general
mailing list