[openib-general] [PATCH 1/2] ib/core/uverbs: return sq_draining value in query_qp response

Jack Morgenstein jackm at dev.mellanox.co.il
Thu Oct 26 00:28:11 PDT 2006


On Wednesday 25 October 2006 20:50, Roland Dreier wrote:
> Let's just take one of the
> reserved fields that we're lucky to have in the query QP response, and
> put sq_draining in there.
> 
We need to remove the field "en_sqd_async_notify" from the structure.
It is an error!  The async_notify flag is valid ONLY for modify_qp,
during the RTS->SQD transition.  If you wish to use a different field
for the sq_draining flag, please rename the en_sqd_async_notify field
to "reserved1".

BTW, I checked the low-level drivers for what they return in the
attr->en_sqd_async_notify field.

a. mthca:  leaves this field explicitly undefined, with the following comment
	   in procedure mthca_query_qp() :
	/* qp_attr->en_sqd_async_notify is only applicable in modify qp */

b. ipath:  sets this field explicitly to zero (ipath_query_qp() )
c. ehca: leaves this field undefined (ehca_query_qp() )

All 3 providers do explicitly set the value of attr->sq_draining in
<provider>_query_qp().

Conclusions:
	1. I agree that we should use a previously reserved field in the
           response structure for returning the value of sq_draining.

        2. IMHO, we must remove the field en_sqd_async_notify.  It is erroneous
	   and no one uses it (in fact the values currently returned in that
	   field are undefined for 2 of the 3 providers, and no one noticed or
	   cared enough to ask). Leaving it in is just asking for trouble.

- Jack




More information about the general mailing list