Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jul 2011 01:03:02 +0900
From:      Masao Uebayashi <uebayasi@gmail.com>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        arch@freebsd.org, src-committers@freebsd.org
Subject:   Re: RFC: Correct location for SUBsystem-wide options ?
Message-ID:  <CADbF7eeVKn%2B51ZbUzjnEE9Zs70zK0X%2B-7ytbgp=--xwoHPmA=w@mail.gmail.com>
In-Reply-To: <20110704090912.GA18578@onelab2.iet.unipi.it>
References:  <20110704090912.GA18578@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
I think that conditional build switches belong to modules.  If FreeBSD
designs kernel carefully so that it can run without network support at
all, "network" can be said  a module, and network interfaces are
modules depending on "network".  Then network related build switches
don't need to be global.

On Mon, Jul 4, 2011 at 6:09 PM, Luigi Rizzo <rizzo@iet.unipi.it> wrote:
> Hi,
> in the process of deciding where to put the kernel option for NETMAP,
> i have looked at the current practice, and i see a bit of confusion
> on how things are done.
>
> Looking at the comment at the top of sys/conf/options we have
> * opt_foo.h =A0 =A0 =A0 =A0 =A0 =A0 for options affecting a single source=
 file foo.[cs]
> * opt_some_name.h =A0 =A0 =A0 for option SOME_NAME affecting only a few f=
iles.
> =A0<GAP_HERE> =A0 =A0 =A0 =A0 =A0 =A0for options affecting many but not a=
ll files
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(e.g. all network interfac=
es)
> * opt_global.h =A0 =A0 =A0 =A0 =A0for system-wide options
>
> So, we have no standard place for options affecting all network
> interfaces, which are exactly the thing i am looking at, and I
> see all possible varieties in our sys/conf/options:
>
> INET, INET6 =A0 =A0 go into their own headers (opt_inet.h and opt_inet6.h=
)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0In my view these are system wide in the se=
nse that
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0INET support may use some specific code al=
so in
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0device drivers, e.g. all the checksum and =
tcp offloading
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0support
>
> DEVICE_POLLING =A0goes into opt_device_polling.h
> NETGRAPH =A0 =A0 =A0 =A0goes into opt_netgraph.h
>
> ALTQ, VIMAGE =A0 =A0go into opt_global.h
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(note that internal ALTQ_* options are in =
opt_altq.h)
>
>
> Missing a specific header opt_network.h, in my opinion the correct
> approach is the one used for ALTQ and VIMAGE: they properly go
> into opt_global.h, and we should move there also INET, INET6,
> DEVICE_POLLING and NETGRAPH (and DEV_NETMAP).
>
> This way we reduce the clutter in all the if_*.c files, and
> also avoid the risk that one of these files forgets to include
> a required opt_something.h
>
> In any case, it is not my intention to modify the status quo,
> but at least add a proper suggestion in sys/conf/options
> to deal with these cases.
>
> Comments ?
>
> =A0 =A0 =A0 =A0cheers
> =A0 =A0 =A0 =A0luigi
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADbF7eeVKn%2B51ZbUzjnEE9Zs70zK0X%2B-7ytbgp=--xwoHPmA=w>