Subject: Re: netipsec/ipsec6.h prototype changes for NetBSD/FreeBSD diffs
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 11/20/2003 13:25:44
>Whatever you do here, be careful not to break any of C99's alias rules; 
>the new GCC uses aliases rules to optimize, and when you break them, 
>you can get bad object code.

True. But this was an incompatible change int he GCC dialect of C;
while its a beneficial change for people who want FORTRAN-like
optimization, its a Bloody Nightmare for mbuf-like code.

I do agree with you, but (in general): if it turns out we have to make
a choice between sticking with gcc 3's narrowing of GCC, and some way
to work around that on a file-by-file or pointer-by-pointer basis;
or dealing with a pointer-chasing mess that finesses the issue at
some performance, then I'd say there is a  tradeoff we should address
consciously and quantitaively.

>I tend to favor passing the common bits around, as well.  Casting inpcb 
>to in6pcb is just going to confuse people when they look at the code 
>later.

I'll send that version after my "morning" coffee.

From my end, though, its worth a fair bit to keep the code in synch
with Sam Leffler's FreeBSD version. And from FreeBSD's perspective,
this is all just obfuscation. If Sam is prepared to buy back some
obfuscation to make life easier for NetBSd, then I give Sam's
preferences a pretty strong weighting.