[openib-general] Re: [PATCH][RFC/v2][1/21] Add core InfiniBand support (public headers)

shaharf shaharf at voltaire.com
Thu Nov 25 05:03:45 PST 2004


> 
>     Sam> After giving it a second thought my vote goes for:
>     Sam> include/linux/infiniband
> 
> Could you share the reasoning that led to that preference?
> 
> Unfortunately we don't seem to be converging on one choice of
location.
> 
> On one side there is the fact that the .h files are not used outside
> of drivers/infiniband -- hence they should stay under
drivers/infiniband.
> 
> On the other side is the fact that moving the includes under include/
> gets rid of some CFLAGS lines in the Makefile.
> 
> I don't see a conclusive reason to choose any particular place.
> Perhaps Linus or Andrew can simply hand down an authoritative answer?
> 
> Thanks,
>   Roland

(This message is posted to openib-general only)

I agree that headers that are not used outside drivers/infiniband should
stay there, but it seems that some header currently located in
drivers/infiniband may be used by user mode programs - ib_user_mad.h for
example, but also parts of ib_mad.h, ib_sa.h, etc.

So there are two issues -
	1 Shouldn't we move known public headers to
include/linux/infiniband?
	2 I would prefer to let user mode staff to include IB related
headers such that ib_mad.h without including real kernel only stuff. Can
we separate these files to (user mode) public parts and kernel only
(even drivers/infiniband only) parts? If we do that, I would say that
the public headers should be located in include/linux/infiniband and
leave the private headers where there are today. Of course we can use
also the #ifdef KERNEL mechanism, but personally I don't like it.

Shahar 



More information about the general mailing list