[openib-general] [PATCH][RFC] kDAPL: remove dat wrapper funct ion dat_ia_query()
James Lentini
jlentini at netapp.com
Thu Jun 9 11:27:24 PDT 2005
Tom,
I think this change has a lot of merits, but I would prefer to defer
this sort of change until we have a more stable provider. Once we have
removed the bugs and finished our update of the provider code
(removing the custom DAPL data structures, etc.), then I think we
should revisit this topic.
Does that sound reasonable?
james
On Thu, 9 Jun 2005, Christoph Hellwig wrote:
> On Thu, Jun 09, 2005 at 11:37:25AM +0300, Itamar Rabenstein wrote:
>> Hi Tom,
>>
>> It looks very good to me but i want to ask why do we need the dat_common
>> struct ?
>>
>> as we can see in dat.h dat_common is defined as :
>>
>> struct dat_common {
>> struct dat_provider *provider;
>> union dat_context context;
>> };
>> and is being use as data member of any dat_* struct
>> There are 9 places were we instance dat_common
>> (dat_ia, dat_ep, dat_evd, ...)
>>
>> i think that that dat_* struct should be like this
>> struct dat_ia {
>> struct dat_provider *provider;
>> union dat_context context;
>> };
>> instaed of
>> struct dat_ia {
>> struct dat_common common;
>> };
>>
>> if we do it (only 5 lines more in code )
>> every time we want to call a function it will be
>> ret = ia->provider->dat_ia_query(ia, NULL,
>> instaed of
>> ret = ia->common.provider->dat_ia_query(ia, NULL,
>>
>> i think that this is more readable.
>
> It is. B?ut I think it'll change even more later on - having a pointer
> to the method table in every object is an enormous waste of space, in
> the end the method should probably be only in a hca-level object, and
> all other objects should have public pointers to it.
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
More information about the general
mailing list