svn commit: r234834 - in head/sys: contrib/pf/net net netinet netinet/ipfw ofed/drivers/infiniband/ulp/ipoib

Gleb Smirnoff glebius at FreeBSD.org
Mon Apr 30 11:36:18 UTC 2012


On Mon, Apr 30, 2012 at 01:48:36PM +0200, Luigi Rizzo wrote:
L> On Mon, Apr 30, 2012 at 10:22:23AM +0000, Alexander V. Chernikov wrote:
L> > Author: melifaro
L> > Date: Mon Apr 30 10:22:23 2012
L> > New Revision: 234834
L> > URL: http://svn.freebsd.org/changeset/base/234834
L> > 
L> > Log:
L> >   Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
L> 
L> I would be really grateful if you could revert this back and discuss
L> what you wanted to achieve with this change other than saving one
L> entry in the list of includes.
L> 
L> As clearly mentioned in the commit logs
L> 
L>     http://svnweb.freebsd.org/base?view=revision&revision=200580
L> 
L> when i did the last revision of the ipfw+dummynet code i tried
L> to put a strong separation between what is visible in userland
L> (ip_fw.h and ip_dummynet.h) and kernel specific stuff.
L> This way changes in the kernel code do not need to affect userland,
L> modify installed headers and so on.
L> 
L> This is why kernel-specific definitions were put in private files.
L> We may discuss on the filename, ip_fw_kernel.h may be a better fit,
L> but merging back kernel and userland defs is a bad design decision.
L> 
L> 20-30 years ago there were good reasons to use a single header
L> for all sorts of definitions: user-only, kernel-only, and kernel-userland API.
L> Machines were slow, disks were small, portability was not a big deal.
L> 
L> These days none of these conditions apply and keeping things
L> separate helps maintainance and avoid accidental pollution of
L> definitions and their misuse.
L> 
L> Besides, keep in mind that ipfw and dummynet are meant to work
L> on multiple platforms so this change is causing portability troubles.

Can we split ip_fw_private.h to ip_fw_private.h, and ip_fw_var.h? The
former is really private, and the latter is for other kernel modules.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list