Skip to contentSkip to conversation

IB/ehca: Fixes for rc5

PATCH Applied Joachim Fenkes 2 participants 4 messages Aug 31, 2007 InfiniBand

lore
Share & tools
lore
#0 lore raw

cover IB/ehca: Fixes for rc5

These two patches fix some ehca issues that should be fixed in 2.6.23.

[1/2] fixes regressions caused by the recent addition of Small QPs. [2/2] adds missing SRQ-related functionality that would have broken IPoIB C= M.

The patches should apply cleanly, in order, against Roland's git. Please review the changes and apply the patches for 2.6.23-rc5 if they are okay.

Regards,
Joachim

=2D-=20
Joachim Fenkes =A0-- =A0eHCA Linux Driver Developer and Hardware Tamer IBM Deutschland Entwicklung GmbH =A0-- =A0Dept. 3627 (I/O Firmware Dev. 2) Schoenaicher Strasse 220 =A0-- =A071032 Boeblingen =A0-- =A0Germany
eMail: [email protected]

#1 lore raw

PATCH 1/2 IB/ehca: fix Small QP regressions

From: Stefan Roscher <[email protected]>

The new Small QP code had a few bugs that would also trigger for non-Small QPs. Fix them.

---
 drivers/infiniband/hw/ehca/ehca_qp.c   |   10 ++++++----
 drivers/infiniband/hw/ehca/ipz_pt_fn.c |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
drivers/infiniband/hw/ehca/ehca_qp.c +6 -4
index b178cba..84d435a 100644
@@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp(
 
 	if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
 	    && !(context && udata)) { /* no small QP support in userspace ATM */
-		ehca_determine_small_queue(
-			&parms.squeue, max_send_sge, is_llqp);
-		ehca_determine_small_queue(
-			&parms.rqueue, max_recv_sge, is_llqp);
+		if (HAS_SQ(my_qp))
+			ehca_determine_small_queue(
+				&parms.squeue, max_send_sge, is_llqp);
+		if (HAS_RQ(my_qp))
+			ehca_determine_small_queue(
+				&parms.rqueue, max_recv_sge, is_llqp);
 		parms.qp_storage =
 			(parms.squeue.is_small || parms.rqueue.is_small);
 	}
drivers/infiniband/hw/ehca/ipz_pt_fn.c +1 -1
index a090c67..29bd476 100644
@@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
 	unsigned long bit;
 	int free_page = 0;
 
-	bit = ((unsigned long)queue->queue_pages[0] & PAGE_MASK)
+	bit = ((unsigned long)queue->queue_pages[0] & ~PAGE_MASK)
 		>> (order + 9);
 
 	mutex_lock(&pd->lock);
Signature · 1 line
1.5.2
#2 lore raw

PATCH 2/2 IB/ehca: SRQ fixes to enable IPoIB CM

In reply to Joachim Fenkes

a) Report max_srq > 0 if SRQ is supported
b) Report "last wqe reached" event when base QP dies

---
 drivers/infiniband/hw/ehca/ehca_hca.c |   10 +++++--
 drivers/infiniband/hw/ehca/ehca_irq.c |   48 +++++++++++++++++++++-----------
 2 files changed, 38 insertions(+), 20 deletions(-)
drivers/infiniband/hw/ehca/ehca_hca.c +7 -3
index fc19ef9..cf22472 100644
@@ -93,9 +93,13 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
 	props->max_pd          = min_t(int, rblock->max_pd, INT_MAX);
 	props->max_ah          = min_t(int, rblock->max_ah, INT_MAX);
 	props->max_fmr         = min_t(int, rblock->max_mr, INT_MAX);
-	props->max_srq         = 0;
-	props->max_srq_wr      = 0;
-	props->max_srq_sge     = 0;
+
+	if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
+		props->max_srq         = props->max_qp;
+		props->max_srq_wr      = props->max_qp_wr;
+		props->max_srq_sge     = 3;
+	}
+
 	props->max_pkeys       = 16;
 	props->local_ca_ack_delay
 		= rblock->local_ca_ack_delay;
drivers/infiniband/hw/ehca/ehca_irq.c +31 -17

72 lines not on this page · raw message

Signature · 1 line
1.5.2
#3 lore raw

Re: [PATCH 2/2] IB/ehca: SRQ fixes to enable IPoIB CM

thanks, applied 1 and 2.