[openib-general] Re: SDP_CONN_LOCK

Sean Hefty mshefty at ichips.intel.com
Thu Feb 17 15:49:31 PST 2005


Michael S. Tsirkin wrote:

> Quoting r. Roland Dreier <roland at topspin.com>:
> 
>>Subject: Re: SDP_CONN_LOCK
>>
>>BTW, since mthca currently calls completion handlers directly from
>>interrupt context (rather than BH/tasklet context), it might be worth
>>renaming all the SDP locking macros so they're not confusingly named
>>with _BH suffixes.
>>
>> - R.
> 
> 
> I think it would be much nicer to reduce the number of macros used.

I'd have to agree with this.  The SDP locking macros are fairly complex 
and hide a lot of functionality.  E.g. SDP_CONN_RELOCK results in 
polling/rearming the CQ, same with SDP_CONN_UNLOCK.  Maybe that's just 
a naming issue though.

I think these would probably be better off as just function calls, 
rather than macros.  SDP_CONN_LOCK calls sdp_conn_internal_lock(), and 
that appears to be the only place that the function is called. 
Similarly, SDP_CONN_UNLOCK calls sdp_conn_internal_unlock().  It seems 
that you could just merge the macros into the function calls.

Unfortunately, I don't really have the time at the moment to help do 
any of this cleanup.

- Sean



More information about the general mailing list