[ofa-general] [PATCH] IB/ipoib: CQ coalescing for connected mode

Eli Cohen eli at mellanox.co.il
Wed Oct 17 06:47:17 PDT 2007


Add CQ moderation for Connected mode QPs

Add predefined CQ coalescing parameters to CQs used by connected
mode QPs for reporting send completions.
Using CQ coalescing was proven to have good effect in connected mode.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>

---

This patch has been pushed into ofa.git tree to kernel_patches/fixes.
It relies on the previously sent patch that added the ib_modify_cq
verb.

Index: ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib_cm.c
===================================================================
--- ofa_1_3_dev_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_cm.c	2007-10-17 15:20:17.000000000 +0200
+++ ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib_cm.c	2007-10-17 18:13:37.000000000 +0200
@@ -914,6 +914,9 @@ static int ipoib_cm_tx_init(struct ipoib
 		goto err_cq;
 	}
 
+	if (ib_modify_cq(p->cq, IPOIB_CQ_COUNT, IPOIB_CQ_PERIOD))
+		ipoib_dbg(priv, "modify CQ failed\n");
+
 	ret = ib_req_notify_cq(p->cq, IB_CQ_NEXT_COMP);
 	if (ret) {
 		ipoib_warn(priv, "failed to request completion notification: %d\n", ret);
Index: ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib.h
===================================================================
--- ofa_1_3_dev_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib.h	2007-10-17 15:20:19.000000000 +0200
+++ ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib.h	2007-10-17 18:07:36.000000000 +0200
@@ -794,4 +794,9 @@ extern int ipoib_debug_level;
 
 #define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff)
 
+enum {
+	IPOIB_CQ_COUNT = 16,
+	IPOIB_CQ_PERIOD = 10,
+};
+
 #endif /* _IPOIB_H */




More information about the general mailing list