[ofw] [PATCH] core [4/5]

Reuven Amitai reuven at mellanox.co.il
Wed Apr 9 06:16:29 PDT 2008


Hi,
 
The following patch adds qp creation sanity checks that disabled.
 
Thanks, Reuven.
 

Index: core/al/al_pd.c

===================================================================

--- core/al/al_pd.c     (revision 1047)

+++ core/al/al_pd.c     (working copy)

@@ -333,24 +333,22 @@

            AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );

            return IB_INVALID_PD_HANDLE;

      }

-

-#if 0

-     /* seems like no need in these checks */

-     if( !p_qp_create->rq_depth || !p_qp_create->sq_depth )

+     if( !p_qp_create || !ph_qp )

      {

-           AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_MAX_WRS (%d:%d)\n",

-                 p_qp_create->rq_depth, p_qp_create->sq_depth ) );

-           return IB_INVALID_MAX_WRS;

+           AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );

+           return IB_INVALID_PARAMETER;

      }

-

-     if( !p_qp_create->rq_sge || !p_qp_create->sq_sge)

+     if( !p_qp_create->rq_depth &&  !p_qp_create->sq_depth )

      {

-           AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_MAX_SGE (%d:%d)\n", 

-                 p_qp_create->rq_sge, p_qp_create->sq_sge ) );

-           return IB_INVALID_MAX_SGE;

+           AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_SETTING\n") );

+           return IB_INVALID_SETTING;

      }

-#endif     

+     if( !p_qp_create->rq_sge && !p_qp_create->sq_sge)

+     {

+           AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("IB_INVALID_SETTING\n") );

+           return IB_INVALID_SETTING;

 

+     }

      if (h_pd->obj.p_ci_ca && h_pd->obj.p_ci_ca->p_pnp_attr)

      {

            if ((p_qp_create->rq_depth >
h_pd->obj.p_ci_ca->p_pnp_attr->max_wrs) ||

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080409/9a754ffb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qp_create_sanity_checks.patch
Type: application/octet-stream
Size: 1481 bytes
Desc: qp_create_sanity_checks.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080409/9a754ffb/attachment.obj>


More information about the ofw mailing list