[ofw][patch][IBAL] remove unnecessary query_qp request duringmodify_qp

Leonid Keller leonid at mellanox.co.il
Sun Jun 28 01:38:18 PDT 2009


Aplied in 2271.


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Leonid Keller
	Sent: Wednesday, June 17, 2009 4:59 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw][patch][IBAL] remove unnecessary query_qp request
duringmodify_qp
	
	
	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/20090628/daa2fc94/attachment.html>


More information about the ofw mailing list