[ofw] DAPL bug fix comitted

Smith, Stan stan.smith at intel.com
Fri Apr 13 15:51:38 PDT 2007


[DAPL]

Dynamic EVD enlargement code removed as it caused more problems than it
was worth. Use what caller supplies.

-    qp_create.sq_sge      = p_ca->p_ca_attr->max_sges;
-    qp_create.rq_sge      = p_ca->p_ca_attr->max_sges;

Use what caller supplies - sounds like a theme. Using max_sges is
overkill and can induce QP create failures.  This change allowed MPI
testing to proceed when using Mellanox memfree HCA's; not a hardware
issue, bad SW choice.
	

Index: dapl_ibal_qp.c
===================================================================
--- dapl_ibal_qp.c	(revision 614)
+++ dapl_ibal_qp.c	(working copy)
@@ -136,40 +136,6 @@
     cq_recv = IB_INVALID_HANDLE;
     cq_send = IB_INVALID_HANDLE;
 
-	/* Dynamic EVD enlargement */
-	if ( recv_evd_ptr == request_evd_ptr ) 
-	{
-		DAT_COUNT	min_qlen = attr->max_recv_dtos +
attr->max_request_dtos;
-		if ( min_qlen > recv_evd_ptr->qlen )
-		{
-			dat_status = dapl_evd_resize
((DAT_EVD_HANDLE)recv_evd_ptr, 
-
min_qlen);
-			if ( dat_status != DAT_SUCCESS ) {
-				dapl_dbg_log (DAPL_DBG_TYPE_ERR,"-->
DsQA: failed to resize EVD(%p)\n",recv_evd_ptr);
-				return dat_status;
-			}
-		}
-	} else {
-		if (attr->max_recv_dtos > recv_evd_ptr->qlen)
-		{
-			dat_status = dapl_evd_resize
((DAT_EVD_HANDLE)recv_evd_ptr, 
-
attr->max_recv_dtos);
-			if ( dat_status != DAT_SUCCESS ) {
-				dapl_dbg_log (DAPL_DBG_TYPE_ERR,"-->
DsQA: failed to resize EVD(%p)\n",recv_evd_ptr);
-				return dat_status;
-			}
-		}
-		if (attr->max_request_dtos > request_evd_ptr->qlen)
-		{
-			dat_status = dapl_evd_resize
((DAT_EVD_HANDLE)request_evd_ptr, 
-
attr->max_request_dtos);
-			if ( dat_status != DAT_SUCCESS ) {
-				dapl_dbg_log (DAPL_DBG_TYPE_ERR,"-->
DsQA: failed to resize EVD(%p)\n",request_evd_ptr);
-				return dat_status;
-			}
-		}
-	}
-
     dapl_os_assert ( recv_evd_ptr != DAT_HANDLE_NULL );
     {
         cq_recv = (ib_cq_handle_t) recv_evd_ptr->ib_cq_handle;
@@ -236,17 +202,21 @@
      */
     p_ca = (dapl_ibal_ca_t *) ia_ptr->hca_ptr->ib_hca_handle;
 
-
     dapl_os_memzero (&qp_create, sizeof (qp_create));
     qp_create.qp_type     = IB_QPT_RELIABLE_CONN;
     qp_create.sq_depth    = attr->max_request_dtos;
     qp_create.rq_depth    = attr->max_recv_dtos;
-    qp_create.sq_sge      = p_ca->p_ca_attr->max_sges;
-    qp_create.rq_sge      = p_ca->p_ca_attr->max_sges;
+    qp_create.sq_sge      = attr->max_recv_iov;
+    qp_create.rq_sge      = attr->max_request_iov;

     qp_create.h_sq_cq     = cq_send;
     qp_create.h_rq_cq     = cq_recv;
     qp_create.sq_signaled = FALSE;
 
+    dapl_dbg_log (DAPL_DBG_TYPE_EP, 
+		"--> DsQA: sqd,iov=%d,%d rqd,iov=%d,%d\n", 
+		attr->max_request_dtos, attr->max_request_iov,
+		attr->max_recv_dtos, attr->max_recv_iov); 
+    
     ib_status = ib_create_qp ( 
                        ib_pd_handle,
                        &qp_create,
@@ -256,7 +226,8 @@
 
     if (ib_status != IB_SUCCESS)
     {
-	dapl_dbg_log (DAPL_DBG_TYPE_ERR, "--> DsQA: Create QP failed =
%s\n", ib_get_err_str(ib_status));
+	dapl_dbg_log (DAPL_DBG_TYPE_ERR, 
+		"--> DsQA: Create QP failed = %s\n",
ib_get_err_str(ib_status));
 	return (DAT_INSUFFICIENT_RESOURCES);
     }
 



More information about the ofw mailing list