Skip to contentSkip to conversation

please pull infiniband.git

GIT PULL Roland Dreier 1 participant 1 message Aug 12, 2008 InfiniBand

lore
Share & tools
lore
#0 lore raw

Linus, please pull from

master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus

This tree is also available from kernel.org mirrors at:

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus

This will get the following fixes:

Alexander Schmidt (5):
IB/ehca: Update qp_state on cached modify_qp() IB/ehca: Rename goto label in ehca_poll_cq_one() IB/ehca: Repoll CQ on invalid opcode IB/ehca: Check idr_find() return value IB/ehca: Discard double CQE for one WR

David J. Wilder (1):
IPoIB/cm: Use vmalloc() to allocate rx_rings

Roland Dreier (1):
Merge branches 'ehca' and 'ipoib' into for-linus

 drivers/infiniband/hw/ehca/ehca_classes.h |    9 ++++
 drivers/infiniband/hw/ehca/ehca_qes.h     |    1 +
 drivers/infiniband/hw/ehca/ehca_qp.c      |   48 +++++++++++++++++------
 drivers/infiniband/hw/ehca/ehca_reqs.c    |   60 ++++++++++++++++++++++------
 drivers/infiniband/ulp/ipoib/ipoib_cm.c   |   17 ++++++--
 5 files changed, 104 insertions(+), 31 deletions(-)
drivers/infiniband/hw/ehca/ehca_classes.h +9 -0
index 0b0618e..1ab919f 100644
@@ -156,6 +156,14 @@ struct ehca_mod_qp_parm {
 
 #define EHCA_MOD_QP_PARM_MAX 4
 
+#define QMAP_IDX_MASK 0xFFFFULL
+
+/* struct for tracking if cqes have been reported to the application */
+struct ehca_qmap_entry {
+	u16 app_wr_id;
+	u16 reported;
+};
+
 struct ehca_qp {
 	union {
 		struct ib_qp ib_qp;
@@ -165,6 +173,7 @@ struct ehca_qp {
 	enum ehca_ext_qp_type ext_type;
 	enum ib_qp_state state;
 	struct ipz_queue ipz_squeue;
+	struct ehca_qmap_entry *sq_map;
 	struct ipz_queue ipz_rqueue;
 	struct h_galpas galpas;
 	u32 qkey;
drivers/infiniband/hw/ehca/ehca_qes.h +1 -0
index 8188030..5d28e3e 100644
@@ -213,6 +213,7 @@ struct ehca_wqe {
 #define WC_STATUS_ERROR_BIT 0x80000000
 #define WC_STATUS_REMOTE_ERROR_FLAGS 0x0000F800
 #define WC_STATUS_PURGE_BIT 0x10
+#define WC_SEND_RECEIVE_BIT 0x80
 
 struct ehca_cqe {
 	u64 work_request_id;
drivers/infiniband/hw/ehca/ehca_qp.c +35 -13

131 lines not on this page · raw message

drivers/infiniband/hw/ehca/ehca_reqs.c +47 -13

121 lines not on this page · raw message

drivers/infiniband/ulp/ipoib/ipoib_cm.c +12 -5
index 7ebc400..341ffed 100644
@@ -202,7 +202,7 @@ static void ipoib_cm_free_rx_ring(struct net_device *dev,
 			dev_kfree_skb_any(rx_ring[i].skb);
 		}
 
-	kfree(rx_ring);
+	vfree(rx_ring);
 }
 
 static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv *priv)
@@ -352,9 +352,14 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i
 	int ret;
 	int i;
 
-	rx->rx_ring = kcalloc(ipoib_recvq_size, sizeof *rx->rx_ring, GFP_KERNEL);
-	if (!rx->rx_ring)
+	rx->rx_ring = vmalloc(ipoib_recvq_size * sizeof *rx->rx_ring);
+	if (!rx->rx_ring) {
+		printk(KERN_WARNING "%s: failed to allocate CM non-SRQ ring (%d entries)\n",
+		       priv->ca->name, ipoib_recvq_size);
 		return -ENOMEM;
+	}
+
+	memset(rx->rx_ring, 0, ipoib_recvq_size * sizeof *rx->rx_ring);
 
 	t = kmalloc(sizeof *t, GFP_KERNEL);
 	if (!t) {
@@ -1494,14 +1499,16 @@ static void ipoib_cm_create_srq(struct net_device *dev, int max_sge)
 		return;
 	}
 
-	priv->cm.srq_ring = kzalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring,
-				    GFP_KERNEL);
+	priv->cm.srq_ring = vmalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring);
 	if (!priv->cm.srq_ring) {
 		printk(KERN_WARNING "%s: failed to allocate CM SRQ ring (%d entries)\n",
 		       priv->ca->name, ipoib_recvq_size);
 		ib_destroy_srq(priv->cm.srq);
 		priv->cm.srq = NULL;
+		return;
 	}
+
+	memset(priv->cm.srq_ring, 0, ipoib_recvq_size * sizeof *priv->cm.srq_ring);
 }
 
 int ipoib_cm_dev_init(struct net_device *dev)