From: ftillier Date: Wed, 5 Jul 2006 15:47:58 +0000 (+0000) Subject: [WSD] Properly size CQs and allow multiple QPs per CQ with HCA drivers that don't... X-Git-Url: http://git.etherboot.org/mirror/winof/.git/commitdiff_plain/dd49131b144aafb16f5e2b0890949294fd10c703 [WSD] Properly size CQs and allow multiple QPs per CQ with HCA drivers that don't support resize CQ. Fix for bug 149 (http://openib.org/bugzilla/show_bug.cgi?id=149). git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@404 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/ulp/wsd/user/ibsp_iblow.c b/ulp/wsd/user/ibsp_iblow.c index f1c108a0..3dc8e13b 100644 --- a/ulp/wsd/user/ibsp_iblow.c +++ b/ulp/wsd/user/ibsp_iblow.c @@ -582,7 +582,7 @@ ib_alloc_cq_tinfo( STAT_INC( thread_num ); /* Completion queue */ - cq_create.size = IB_CQ_SIZE; + cq_create.size = IB_INIT_CQ_SIZE; cq_create.pfn_comp_cb = NULL; cq_create.h_wait_obj = cq_tinfo->cq_waitobj; @@ -608,7 +608,7 @@ ib_alloc_cq_tinfo( return NULL; } - cq_tinfo->cqe_size = IB_CQ_SIZE; + cq_tinfo->cqe_size = cq_create.size; if( hca->cq_tinfo ) { diff --git a/ulp/wsd/user/ibspdefines.h b/ulp/wsd/user/ibspdefines.h index 2f9414c1..bb38ea3d 100644 --- a/ulp/wsd/user/ibspdefines.h +++ b/ulp/wsd/user/ibspdefines.h @@ -76,7 +76,8 @@ C_ASSERT( QP_ATTRIB_RQ_DEPTH <= 256 ); * TODO: Workaround until MTHCA driver supports resize CQ, pre-allocate * for 100 QPs per CQ. */ -#define IB_CQ_SIZE ((QP_ATTRIB_SQ_DEPTH + QP_ATTRIB_RQ_DEPTH) * 100) +#define IB_CQ_SIZE (QP_ATTRIB_SQ_DEPTH + QP_ATTRIB_RQ_DEPTH) +#define IB_INIT_CQ_SIZE (IB_CQ_SIZE * 100) /* CM timeouts */ #define CM_MIN_LOCAL_TIMEOUT (18)