[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Patch: accept filters for NetBSD
On Tue, Jan 29, 2008 at 01:02:08PM -0500, Thor Lancelot Simon wrote:
> On Tue, Jan 29, 2008 at 11:47:09AM -0600, David Young wrote:
> > On Tue, Jan 29, 2008 at 12:17:46PM -0500, Thor Lancelot Simon wrote:
> > > On Tue, Jan 29, 2008 at 10:15:42AM +0100, Darren Reed wrote:
> > > > Hmmm..
> > > >
> > > > Are you going to contribute (or suggest) changes to the FreeBSD
> > > > code based on any changes we might make?
> > >
> > > I can suggest. I can't directly contribute -- no privs. Can you?
> > >
> > > I think we are going to put a lot of the FreeBSD-specific code back,
> > > #ifdef __FreeBSD__, to make cross-polination easier. It leaves the
> > > file fairly dirty but it also provides a useful example of how they
> > > rearranged a few bits of their stack for socket locking. That will
> > > make feeding changes back a bit simpler, anyway -- smaller diffs.
> > Please don't clutter the code with #ifdefs.
> If I do, it can be the same exact source file for FreeBSD and NetBSD.
> If I don't, it can't.
> I think in this case it is better to have the same source file. You
> do not?
I don't think that the #ifdef clutter is worth it. It has been
tremendously difficult for me to maintain in PF, in IP Filter, and in
net80211. Recently I've had to poke at a lot of ethernet/WLAN drivers,
and the rampant #ifdef'age in cxgb and in if_ndis makes reading and
modifying those drivers as great a chore as dealing with ten less
I think that you can achieve the end goal of sharing source in a
different way. For example, you can extract the OS-dependent parts into
subroutines, or you can use a vendor branch.
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933 ext 24
Main Index |
Thread Index |