[openib-general] [PATCH 1/2] kDAPL: remove inline functions
Tom Duffy
Thomas.Duffy.99 at alumni.brown.edu
Thu Aug 4 08:23:06 PDT 2005
On Thu, 2005-08-04 at 17:13 +0300, Or Gerlitz wrote:
> Tom,
>
> Wouldn't it be simple to come with a patch that applies only to the
> "dat" code ie
> (gen2/trunk/src/linux-kernel/infiniband/ulp/kdapl/kdapl.h and/or api.c)
> which does
> not require --any-- code change at the cosumer side?
>
> that is, with the patch you sent, a call to dat_pz_create at in consumer
> code was changed
>
> from
> - ret = dat_pz_create (ia, &pz);
> to
> + ret = ia->common.provider->pz_create (ia, &pz);
>
> so cant it be done with dat_pz_create being a function (or define)
> calling to
>
> ia->common.provider->pz_create(ia, &pz);
>
> similar to what is done by ib_core / libibverbs calling ib_mthca /
> libmthca
>
> This makes the consumer code simpler and no changes are need in current
> consumers
This is almost exactly what is there now. Not really a change. I don't
like the multiple indirections to get to the function table, but this
can be simplified later. Using the function table to call the function
is a well established practice within the Linux kernel -- look at struct
file_operations for a good example usage.
-tduffy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050804/1db4d360/attachment.sig>
More information about the general
mailing list