svn commit: r281643 - head/sys/net

Peter Wemm peter at wemm.org
Mon May 4 05:15:18 UTC 2015


On Sunday, May 03, 2015 09:52:08 PM Peter Wemm wrote:
> On Sunday, May 03, 2015 09:31:01 PM Peter Wemm wrote:
> > On Friday, April 17, 2015 06:39:16 AM Gleb Smirnoff wrote:
> > > Author: glebius
> > > Date: Fri Apr 17 06:39:15 2015
> > > New Revision: 281643
> > > URL: https://svnweb.freebsd.org/changeset/base/281643
> > > 
> > > Log:
> > >   Bring in if_types.h from projects/ifnet, where types are
> > >   defined in enum.
> > > 
> > > Modified:
> > >   head/sys/net/if_types.h
> > 
> > I'm sorry, but this breaks the freebsd.org cluster.
> > 
> > 281642 works
> > 281643 fails
> > head with 281643 reverted works
> > 
> > IPv6 doesn't work on systems with pf, carp and multiple interfaces.  I
> > have
> > nothing more specific than that.
> 
> The kernel is smaller with the enums:
>           text     data       bss           dec             hex
> 11438123   730686   2998048   15166857   0xe76d89
> 11437787   730686   2998048   15166521   0xe76c39
> 
> The first is with the #defines, the second is enums.  The enums caused 336
> bytes less code to be generated, so presumably the enums enabled some
> "optimization" that wasn't expected.

More data; looking at size *.o in the kernel compile obj directory to see what 
changes size with enum vs #define:
@@ -470,10 +470,10 @@
     1158     124        0     1282     0x502   imgact_shell.o
    11617     160       36    11813    0x2e25   in.o
      343       0        0      343     0x157   in4_cksum.o
-   22155       0        0    22155    0x568b   in6.o
+   22187       0        0    22187    0x56ab   in6.o
     2084       0        0     2084     0x824   in6_cksum.o
     1155     200        0     1355     0x54b   in6_gif.o
-    5208      12       16     5236    0x1474   in6_ifattach.o
+    5224      12       16     5252    0x1484   in6_ifattach.o
    21933     864        0    22797    0x590d   in6_mcast.o
     6860       0        0     6860    0x1acc   in6_pcb.o
     2627    6960      248     9835    0x266b   in6_proto.o
@@ -750,8 +750,8 @@
    25424     452        0    25876    0x6514   mvs.o
        0      24        0       24      0x18   mvs_if.o
     5989     268        0     6257    0x1871   mvs_pci.o
-   17111     388       72    17571    0x44a3   nd6.o
-   15251      92       48    15391    0x3c1f   nd6_nbr.o
+   17287     388       72    17747    0x4553   nd6.o
+   15366      92       48    15506    0x3c92   nd6_nbr.o
    16318      66       16    16400    0x4010   nd6_rtr.o
      466     196        8      670     0x29e   nehemiah.o
     7844    2412     2036    12292    0x3004   netisr.o

The size changes are confined to the ipv6 stack.

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20150503/34d1b035/attachment.sig>


More information about the svn-src-head mailing list