[openib-general] ib_req_ncomp_notif in core_ layer

Grant Grundler iod00d at hp.com
Thu Aug 5 08:27:36 PDT 2004


On Thu, Aug 05, 2004 at 03:52:42PM +0300, Michael S. Tsirkin wrote:
> > It's useful to hide the indirect function call with either static inline
> > or a macro.
> But req_ncomp_notif is not inline, nor is it a macro.

I saw that before I replied. Making it a inline or a macro means
it has to be moved to a header file. I'm perfectly ok with
that if folks are (1) comfortable the method won't change soon
and (2) if it does, an ABI "event" will occur.

> > This reduces programming errors, hides the "method" used
> > to access the indirect function and defines the "API" for a layer of code.
> 
> I do see a problem though
> since each new method has to be added in multiple places - I count 4:
> core header, core implementation, device structure, specific implementation.

Yes. That can be reduced a bit by using inline/macro in a core header.
But basically you are right. That's a tradeoff of using a jump table
which provides needed flexibility.

thanks,
grant



More information about the general mailing list