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

James Lentini jlentini at netapp.com
Thu Jun 2 08:16:53 PDT 2005



On Wed, 1 Jun 2005, Tom Duffy wrote:

> On Wed, 2005-06-01 at 12:04 +0200, Christoph Hellwig wrote:
>> That beeing said, one of the first thing you should get rid of if you
>> want to be able to take code from kdapl to the generic rdma code is way
>> it deals with handles.  The kdapl code gives up language type safety
>> just to add its own bandaided type system below.  Please always pass the
>> real struct pointer around, or at least the generic struct type which
>> might be embedded into a bigger structure, and get rid of all the magic
>> number checking and magic macros that expect special members at the
>> beginning of all objects behind these handles.
>
> I absolutely agree with this and was planning on implementing said
> changes in the near future.
>
> James, can I get a "hell yeah" or a "no freaking way" from you before I
> go off and start writing patches?
>
> -tduffy

This could be an improvement. We just need to be careful that we don't 
expose anything transport specific. Off the top of my head, I can 
think of one way to do this:

- 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?

I'll do some research here and find out why the original mechanism was 
chosen.



More information about the general mailing list