[ewg] OFED 1.4's autoconf.h conflicting with kernel

Brian J. Murrell brian at sun.com
Thu Jan 29 06:34:06 PST 2009

On Thu, 2009-01-29 at 04:59 -0800, Poornima Kamath (Contractor) wrote:
> Hi Brian,
> You can  create another autoconf.h file and define all the variables that are being overridden by OFED and which you want defined in that file.

I'm not sure I'm following that.  If I am, then it seems
less-than-straightforward that I, as a package maintainer need to start
cobbling up my own autoconf.h files to be a union of the two I need to
use.  But on to your example...

> Consider you keep this autoconf.h in /usr/src/test/linux directory.
> So then you can specifically include it in the following way.
>   -include include/linux/autoconf.h -include /usr/src/ofa_kernel/include/linux/autoconf.h -include /usr/src/test/linux/autoconf.h
> This will take care of the variables being defined correctly. 
> Now you also will have to include the following
>       -I  /usr/src/test  -I/usr/src/ofa_kernel/include/
>    This is  so that if you have any files with <linux/autoconf.h>, then autoconf.h will be taken from /usr/src/test/ 
> Thus variables in OFED autoconf.h will be overridden by the ones in your autoconf.h

Yeah.  I'm understanding it alright.  I just don't like it.  The need
for me to have to manually build "unionized" autoconf.h files for every
combination of kernel/OFED configuration that I will want to build is
just not optimal.

IMHO, if the OFED development tree is going to provide an autoconf.h
that is going to get found and preferred to the kernel's own, it needs
to do it in a way that _augments_ the kernel's file, not completely
overrides it.


If we use the example on hand, where the nfsrdma option is not selected
in the OFED build, then maybe all of the #undefs for the NFS related
options should simply be omitted from the OFED version of the autoconf.h
file rather than included as #undef and then the OFED autoconf.h should
#include_next the kernel's autoconf.h

So maybe something like the following in the OFED autoconf.h:

#include_next <linux/autoconf.h>

[ core IB defines which should override the kernel ]

[ nfsrdma IB defines, if nfsrdma is configured -- no #undefs if not ]

And then there are specific items like CONFIG_DEBUG_INFO.  I'm not even
sure why the OFED stack is doing anything with them.  I don't see a
single source file in the whole tree that uses it.

CONFIG_SYSCTL does get used by the core NFS code in the OFED stack that
is built when nfsrdma is selected, but I'm not convinced that we should
not just be following what the kernel does with this.  There's really no
point to building the sysctl stuff into the modules if the kernel the
modules are being inserted into doesn't have it enabled, yes?


More information about the ewg mailing list