]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WSD] Properly size CQs and allow multiple QPs per CQ with HCA drivers that don't...
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Jul 2006 15:47:58 +0000 (15:47 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Jul 2006 15:47:58 +0000 (15:47 +0000)
Fix for bug 149 (http://openib.org/bugzilla/show_bug.cgi?id=149).

git-svn-id: svn://openib.tc.cornell.edu/gen1@404 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/wsd/user/ibsp_iblow.c
trunk/ulp/wsd/user/ibspdefines.h

index f1c108a08f91e179a17e7e4969e91ec5eb49357b..3dc8e13b1811fbb36e195d738de7c39061db38ae 100644 (file)
@@ -582,7 +582,7 @@ ib_alloc_cq_tinfo(
        STAT_INC( thread_num );\r
 \r
        /* Completion queue */\r
-       cq_create.size = IB_CQ_SIZE;\r
+       cq_create.size = IB_INIT_CQ_SIZE;\r
 \r
        cq_create.pfn_comp_cb = NULL;\r
        cq_create.h_wait_obj = cq_tinfo->cq_waitobj;\r
@@ -608,7 +608,7 @@ ib_alloc_cq_tinfo(
                return NULL;\r
        }\r
 \r
-       cq_tinfo->cqe_size = IB_CQ_SIZE;\r
+       cq_tinfo->cqe_size = cq_create.size;\r
 \r
        if( hca->cq_tinfo )\r
        {\r
index 2f9414c150d3dd5df68eda262487b88af54bf6cc..bb38ea3da7d5ecd73444dfbdffd8fd6b05b06153 100644 (file)
@@ -76,7 +76,8 @@ C_ASSERT( QP_ATTRIB_RQ_DEPTH <= 256 );
  * TODO: Workaround until MTHCA driver supports resize CQ, pre-allocate\r
  * for 100 QPs per CQ.\r
  */\r
-#define IB_CQ_SIZE ((QP_ATTRIB_SQ_DEPTH + QP_ATTRIB_RQ_DEPTH) * 100)\r
+#define IB_CQ_SIZE                     (QP_ATTRIB_SQ_DEPTH + QP_ATTRIB_RQ_DEPTH)\r
+#define IB_INIT_CQ_SIZE                (IB_CQ_SIZE * 100)\r
 \r
 /* CM timeouts */\r
 #define CM_MIN_LOCAL_TIMEOUT   (18)\r