From owner-svn-src-head@FreeBSD.ORG Sun Jun 6 01:10:02 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C94451065672; Sun, 6 Jun 2010 01:10:02 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 8BCC18FC13; Sun, 6 Jun 2010 01:10:02 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 94816730A1; Sun, 6 Jun 2010 03:20:34 +0200 (CEST) Date: Sun, 6 Jun 2010 03:20:34 +0200 From: Luigi Rizzo To: Randall Stewart Message-ID: <20100606012034.GA56426@onelab2.iet.unipi.it> References: <201006052139.o55LdrBK045695@svn.freebsd.org> <20100606004429.GC56080@onelab2.iet.unipi.it> <3A129572-D7A0-4211-AB71-21C808981C37@lakerest.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3A129572-D7A0-4211-AB71-21C808981C37@lakerest.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r208857 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2010 01:10:02 -0000 On Sat, Jun 05, 2010 at 05:53:55PM -0700, Randall Stewart wrote: > Luigi: > > We on the SCTP team ;-) have always worked under the > constraint of "scrubbing out" with un-ifdef loads of stuff for > > - Windows > - MacOS-X > - User-Space Implementation > - Panda (translated IOS-XR) > > Now there is a HUGE amount of cruft that has some ugly ifdef's in it > which > I was told way back was a no-no.... (I was also told unifdef is your > friend ;-D) > > Anyway.. I would be more than glad to bring back the "full" code if > folks would all agree.. it actually makes it a lot easier when you > are debugging to have the precise line number instead of working between > two worlds ;-) > > But of course we would have to get agreement from quite a few folks... > but > I am game ;-) as a data point, i went through a similar problem when i ported ipfw+dummynet to linux and windows, and as you can see from the code in HEAD, the amount of OS-dependent code in the common files is minimal (much much less than in the first versions). Being ashamed of committing large #ifdef sections was a big motivator for trying to pack os-dependent parts in os-specific files and leave the core as clean as possible In the case of SCTP, i don't think anyone but the SCTP team would put hands or think of modifying the code, so if FreeBSD trusts your code (which obviously is the case), and as long as there no licensing issues (this is something you can tell us) I don't see why people should object on having the unscrubbed code. cheers luigi > R > On Jun 5, 2010, at 5:44 PM, Luigi Rizzo wrote: > > >On Sat, Jun 05, 2010 at 09:39:53PM +0000, Randall Stewart wrote: > >>Author: rrs > >>Date: Sat Jun 5 21:39:52 2010 > >>New Revision: 208857 > >>URL: http://svn.freebsd.org/changeset/base/208857 > >> > >>Log: > >> Purge out a Windows def that somehow slipped > >> past the scrubber. > > > >i wonder if it makes sense to scrub away the code for other OS. > >While I understand the rationale, seeing the whole code might have > >several advantages: > >- understand the constraints that other OS impose; > >- learn what APIs are available in other OS; > >- teach people how to write portable code; > > > >cheers > >luigi > > > > ------------------------------ > Randall Stewart > 803-317-4952 (cell)