[openib-general] [PATCH v2] sa_query: require SA query registration

Roland Dreier rdreier at cisco.com
Thu Aug 10 10:56:29 PDT 2006


I think I agree with Michael that having ib_sa_register_client()
allocate the structure is going to far in the name of encapsulation.
How about making the structure public, but providing a macro
DEFINE_IB_SA_CLIENT() to wrap up the initialization?  (Similar to
DEFINE_MUTEX, DEFINE_IDR, etc)

For debugging, if we want, we can do some macro magic to get the
__FILE__ and variable name stuffed into a char[] member.

If we want to allow for dynamic allocation of clients, then we can
have a ib_sa_init_client(struct ib_sa_client *client) function, but I
don't see a need for that right now.

 - R.




More information about the general mailing list