[ofw][patch][IBAL] remove unnecessary query_qp request during modify_qp

Leonid Keller leonid at mellanox.co.il
Wed Jun 17 06:58:55 PDT 2009


HCA API of modify_qp contains an optional parameter of qp_attr. 

If it is coded, modify_qp makes internally a query_qp request to
low-level driver and returns QP attributes.

IBAL codes this parameter, but do not use the returned QP attributes.

It causes unnecessary query_qp request to low-level driver and possible
racy scenarios.

 
 
Index: core/al/al_qp.c
===================================================================
--- core/al/al_qp.c (revision 2256)
+++ core/al/al_qp.c (working copy)
@@ -1332,7 +1332,6 @@
  IN OUT   ci_umv_buf_t* const   p_umv_buf )
 {
  ib_api_status_t   status;
- ib_qp_attr_t   qp_attr;
 
  CL_ASSERT( h_qp );
 
@@ -1350,7 +1349,7 @@
 #endif /* CL_KERNEL */
 
  /* Modify the actual QP attributes. */
- status = verbs_modify_qp( h_qp, p_qp_mod, qp_attr );
+ status = verbs_modify_qp( h_qp, p_qp_mod, NULL );
 
  /* Record the QP state if the modify was successful. */
  if( status == IB_SUCCESS )
Index: core/al/al_verbs.h
===================================================================
--- core/al/al_verbs.h (revision 2256)
+++ core/al/al_verbs.h (working copy)
@@ -333,9 +333,9 @@
  h_qp->obj.p_ci_ca->verbs.query_qp( h_qp->h_ci_qp,\
   p_qp_attr, p_umv_buf )
 
-#define verbs_modify_qp(h_qp, p_qp_mod, qp_attr) \
+#define verbs_modify_qp(h_qp, p_qp_mod, p_qp_attr) \
  h_qp->obj.p_ci_ca->verbs.modify_qp( h_qp->h_ci_qp,\
-  p_qp_mod, &qp_attr, p_umv_buf )
+  p_qp_mod, p_qp_attr, p_umv_buf )
 
 #define verbs_ndi_modify_qp(h_qp, p_qp_mod, qp_attr, buf_size, p_buf) \
   h_qp->obj.p_ci_ca->verbs.ndi_modify_qp( h_qp->h_ci_qp,\
@@ -593,8 +593,8 @@
  ual_query_qp(h_qp, p_qp_attr); \
  UNUSED_PARAM( p_umv_buf );
 
-#define verbs_modify_qp(h_qp, p_qp_mod, qp_attr) \
- ual_modify_qp(h_qp, p_qp_mod, &qp_attr); \
+#define verbs_modify_qp(h_qp, p_qp_mod, p_qp_attr) \
+ ual_modify_qp(h_qp, p_qp_mod, p_qp_attr); \
  UNUSED_PARAM( p_umv_buf );
 
 #define verbs_post_send(h_qp, p_send_wr, pp_send_failure) \

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090617/8da0a751/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_query_qp1.patch
Type: application/octet-stream
Size: 1656 bytes
Desc: no_query_qp1.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090617/8da0a751/attachment.obj>


More information about the ofw mailing list