[Rdma-developers] Re: [openib-general] OpenIB and OpenRDMA: Convergence on common RDMAAPIs and ULPs for Linux

Caitlin Bestler caitlin.bestler at gmail.com
Thu Jun 2 09:49:51 PDT 2005


On 6/2/05, Tom Duffy <tduffy at sun.com> wrote:
> On Thu, 2005-06-02 at 11:16 -0400, James Lentini wrote:
> > - in dat.h, create a public structure for each object type:
> >
> >   struct dat_ep {
> >       struct dat_provider *provider;
> >   };
> >
> > - in the transport provider (dapl.h) have a private structure that
> >    contains the public one:
> >
> >    struct dapl_ep {
> >       struct dat_ep   dat_ep;
> >          ...
> >    };
> >
> > Is that the sort of thing you were thinking of?
> 
> Yes, exactly.  Then you can create small inline functions that would
> cast back and forth.
> 

They were actually #defines in the DAT 1.0 headers, but I agree
that inline functions are better. At the time the #defines were 
adopted there was still a concern about compilers that did
not implement inlining efficiently. I believe that concern is
no longer valid in general, and it is especially not relevant
when gcc is known to be available.


> The other "issue" right now is that dapl has a header struct that needs
> to come first in all the structs.  So, that would need to be changed.
> 

That is what enables the use of the method table. It allows the
in-line function to know the actual method to call for 'dat_ep_post_send'
on this specific EP without knowing at compile time which Provider
code is being invoked.

The DAT 1.0 headers included some #define options to let that
be hard-coded in environments where it was known that there
was only a single provider.



More information about the general mailing list