[openib-general] [PATCH 2/4] ipath mmaped CQs, QPs, SRQs

Ralph Campbell ralphc at pathscale.com
Mon Jun 19 16:41:51 PDT 2006


This patch contains the mthca and ehca specific changes.

Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>

Index: src/userspace/libmthca/src/verbs.c
===================================================================
--- src/userspace/libmthca/src/verbs.c	(revision 8021)
+++ src/userspace/libmthca/src/verbs.c	(working copy)
@@ -259,6 +259,7 @@
 {
 	struct mthca_cq *cq = to_mcq(ibcq);
 	struct mthca_resize_cq cmd;
+	struct ibv_resize_cq_resp resp;
 	struct ibv_mr *mr;
 	void *buf;
 	int old_cqe;
@@ -292,7 +293,8 @@
 	old_cqe = ibcq->cqe;
 
 	cmd.lkey = mr->lkey;
-	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd);
+	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd,
+				&resp, sizeof resp);
 	if (ret) {
 		mthca_dereg_mr(mr);
 		free(buf);
Index: src/linux-kernel/infiniband/hw/mthca/mthca_srq.c
===================================================================
--- src/linux-kernel/infiniband/hw/mthca/mthca_srq.c	(revision 8021)
+++ src/linux-kernel/infiniband/hw/mthca/mthca_srq.c	(working copy)
@@ -357,7 +357,7 @@
 }
 
 int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
-		     enum ib_srq_attr_mask attr_mask)
+		     enum ib_srq_attr_mask attr_mask, struct ib_udata *udata)
 {
 	struct mthca_dev *dev = to_mdev(ibsrq->device);
 	struct mthca_srq *srq = to_msrq(ibsrq);
Index: src/linux-kernel/infiniband/hw/mthca/mthca_dev.h
===================================================================
--- src/linux-kernel/infiniband/hw/mthca/mthca_dev.h	(revision 8021)
+++ src/linux-kernel/infiniband/hw/mthca/mthca_dev.h	(working copy)
@@ -506,7 +506,7 @@
 		    struct ib_srq_attr *attr, struct mthca_srq *srq);
 void mthca_free_srq(struct mthca_dev *dev, struct mthca_srq *srq);
 int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
-		     enum ib_srq_attr_mask attr_mask);
+		     enum ib_srq_attr_mask attr_mask, struct ib_udata *udata);
 int mthca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
 int mthca_max_srq_sge(struct mthca_dev *dev);
 void mthca_srq_event(struct mthca_dev *dev, u32 srqn,
@@ -521,7 +521,8 @@
 		    enum ib_event_type event_type);
 int mthca_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask,
 		   struct ib_qp_init_attr *qp_init_attr);
-int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask);
+int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
+		    struct ib_udata *udata);
 int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 			  struct ib_send_wr **bad_wr);
 int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
Index: src/linux-kernel/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- src/linux-kernel/infiniband/hw/mthca/mthca_qp.c	(revision 8021)
+++ src/linux-kernel/infiniband/hw/mthca/mthca_qp.c	(working copy)
@@ -522,7 +522,8 @@
 	return 0;
 }
 
-int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
+int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
+		    struct ib_udata *udata)
 {
 	struct mthca_dev *dev = to_mdev(ibqp->device);
 	struct mthca_qp *qp = to_mqp(ibqp);
Index: src/linux-kernel/infiniband/hw/ehca/ehca_qp.c
===================================================================
--- src/linux-kernel/infiniband/hw/ehca/ehca_qp.c	(revision 8021)
+++ src/linux-kernel/infiniband/hw/ehca/ehca_qp.c	(working copy)
@@ -1288,7 +1288,8 @@
 	return ret;
 }
 
-int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
+int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
+		   struct ib_udata *udata)
 {
 	int ret = 0;
 	struct ehca_qp *my_qp = NULL;
Index: src/linux-kernel/infiniband/hw/ehca/ehca_iverbs.h
===================================================================
--- src/linux-kernel/infiniband/hw/ehca/ehca_iverbs.h	(revision 8021)
+++ src/linux-kernel/infiniband/hw/ehca/ehca_iverbs.h	(working copy)
@@ -143,7 +143,8 @@
 
 int ehca_destroy_qp(struct ib_qp *qp);
 
-int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask);
+int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
+		   struct ib_udata *udata);
 
 int ehca_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
 		  int qp_attr_mask, struct ib_qp_init_attr *qp_init_attr);

-- 
Ralph Campbell <ralphc at pathscale.com>





More information about the general mailing list