[ofw] question on use of ib_put_mad

Fab Tillier ftillier at windows.microsoft.com
Mon May 4 16:37:20 PDT 2009


>> The MAD pool has a reference taken out on it for each mad taken out of
>> the pool.  So the pool won't go away until all MADs have been returned.
>> 
>> I'm not sure I understand the synchronization issue you're seeing.
> 
> The following steps are required to send a MAD:
> 
> open_al
> open_ca
> alloc_pd
> get_spl_qp
> reg_mad_svc
> 
> cleanup is almost the reverse (no unregister_mad_svc)
> 
> destroy_qp
> dealloc_pd
> close_ca
> close_al

Ok, I follow you now.

> If all cleanup calls are synchronous, where must ib_put_mad be called?

It doesn't appear that you can destroy everything synchronously.

> The user never explicitly destroys the mad pool or unregisters the MAD
> service, so callbacks can occur up until destroy_qp returns, correct?

It certainly looks like that's how it is implemented, and likely originally designed.  Who ever thought of that design? :P

I don't know if anyone's ever tried to synchronously stop responding to unsolicited MADs.  Probably not, the only possible case would be OpenSM, but as far as I know you have to kill it to stop it, there isn't a graceful shutdown (at least not that I know of).

-Fab





More information about the ofw mailing list