From owner-freebsd-arch@FreeBSD.ORG Sun Mar 1 15:25:14 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FBC4106566C for ; Sun, 1 Mar 2009 15:25:14 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 527968FC0C for ; Sun, 1 Mar 2009 15:25:14 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 656FC73098; Sun, 1 Mar 2009 16:30:10 +0100 (CET) Date: Sun, 1 Mar 2009 16:30:10 +0100 From: Luigi Rizzo To: net@freebsd.org Message-ID: <20090301153010.GA58942@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: arch@freebsd.org Subject: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 15:25:14 -0000 Hi, I am planning to split netinet/ip_fw2.c in a number of smaller files to make it more manageable, and while i do this I would also like to move the files related to ipfw2 (namely ip_fw*c) to a better place. Any objection to moving them to sys/netinet/ipfw2 ? Also, I can't help noticing that sys/netinet/ contains 36 files related to sctp -- wouldn't it be the case to move them (perhaps with the exception of the userland headers) to a separate subdirectory ? (I know the same reasoning would apply to tcp, which has 23 files, but the issue here is that there is 25 years of userland code expecting the tcp headers in netinet/ and moving them would be a nightmare for ports...) cheers luigi From owner-freebsd-arch@FreeBSD.ORG Sun Mar 1 18:15:45 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7810110656DE; Sun, 1 Mar 2009 18:15:45 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 4988C8FC17; Sun, 1 Mar 2009 18:15:45 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n21HdLfK062972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Mar 2009 09:39:23 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49AAC849.9060105@freebsd.org> Date: Sun, 01 Mar 2009 09:39:21 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <20090301153010.GA58942@onelab2.iet.unipi.it> In-Reply-To: <20090301153010.GA58942@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist Cc: arch@freebsd.org, net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 18:15:46 -0000 Luigi Rizzo wrote: > Hi, > I am planning to split netinet/ip_fw2.c in a number of smaller files > to make it more manageable, and while i do this I would also like > to move the files related to ipfw2 (namely ip_fw*c) to a better place. > Any objection to moving them to sys/netinet/ipfw2 ? > > Also, I can't help noticing that sys/netinet/ contains 36 files > related to sctp -- wouldn't it be the case to move them > (perhaps with the exception of the userland headers) > to a separate subdirectory ? > > (I know the same reasoning would apply to tcp, which has 23 files, > but the issue here is that there is 25 years of userland code expecting > the tcp headers in netinet/ and moving them would be a > nightmare for ports...) > I think sctp belongs in it's own directory. I'd vote for just ipfw; the "2" was an artifact of previous code. Sam From owner-freebsd-arch@FreeBSD.ORG Sun Mar 1 21:26:43 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E708B10656C0 for ; Sun, 1 Mar 2009 21:26:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outQ.internet-mail-service.net (outq.internet-mail-service.net [216.240.47.240]) by mx1.freebsd.org (Postfix) with ESMTP id CE6B98FC0C for ; Sun, 1 Mar 2009 21:26:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A44ECB4E3; Sun, 1 Mar 2009 13:26:43 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 312252D601E; Sun, 1 Mar 2009 13:26:43 -0800 (PST) Message-ID: <49AAFD92.105@elischer.org> Date: Sun, 01 Mar 2009 13:26:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <20090301153010.GA58942@onelab2.iet.unipi.it> In-Reply-To: <20090301153010.GA58942@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 21:26:44 -0000 Luigi Rizzo wrote: > Hi, > I am planning to split netinet/ip_fw2.c in a number of smaller files > to make it more manageable, and while i do this I would also like > to move the files related to ipfw2 (namely ip_fw*c) to a better place. > Any objection to moving them to sys/netinet/ipfw2 ? > > Also, I can't help noticing that sys/netinet/ contains 36 files > related to sctp -- wouldn't it be the case to move them > (perhaps with the exception of the userland headers) > to a separate subdirectory ? for that matter it would be nice to put ALL teh protocols in their own subdirectories. tcp related files are also multiplying, with things like syncookies etc. > > (I know the same reasoning would apply to tcp, which has 23 files, > but the issue here is that there is 25 years of userland code expecting > the tcp headers in netinet/ and moving them would be a > nightmare for ports...) > > cheers > luigi > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 00:41:37 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A93CC1065679 for ; Mon, 2 Mar 2009 00:41:37 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f166.google.com (mail-ew0-f166.google.com [209.85.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id F411D8FC18 for ; Mon, 2 Mar 2009 00:41:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy10 with SMTP id 10so1698371ewy.43 for ; Sun, 01 Mar 2009 16:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=Wx2XbqRvk7TbsfSy8XLPtzeRwOj/oyMn1u2eKfLoJlc=; b=pvAu2w2XlP0sJRwEkFsxX7tYlMPhqhPlK/HLZLf54jppYmEgiNFl//r+jEyZbZVju2 f7lC1U355kj7S84dQinlDJ5nZWuTaaOkpAm3gptVnrlgXIDz+ZL0QtqQ1Sfht6Kgkj3B dBX7xI3L9zRzkBB4WuEfp1i9u+Owz7H0Tj2b8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=XTIOKp481bp7BHfCCPf3LiykCRqsUtMStNhgnw60R3U2WhOYssTyktTEtUFDxTwYiF Yn4LDNgl4nybHSdKhN2KJC61lbFtbZ0fKzppth0gOpkOhDl3ELCl8jq3U9t2YDvoQqZX p9hpp7jg0bP/V4UVWhzdTMNZEtuTaSvefVH3I= Received: by 10.210.92.11 with SMTP id p11mr4257150ebb.2.1235953120026; Sun, 01 Mar 2009 16:18:40 -0800 (PST) Received: from epsilon.lan (bl6-147-236.dsl.telepac.pt [82.155.147.236]) by mx.google.com with ESMTPS id 34sm4812260nfu.77.2009.03.01.16.18.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Mar 2009 16:18:39 -0800 (PST) Message-Id: <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> From: Rui Paulo To: Julian Elischer In-Reply-To: <49AAFD92.105@elischer.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-5--52127531" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 2 Mar 2009 00:18:30 +0000 References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: arch@freebsd.org, net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 00:41:38 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-5--52127531 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 1 Mar 2009, at 21:26, Julian Elischer wrote: > Luigi Rizzo wrote: >> Hi, >> I am planning to split netinet/ip_fw2.c in a number of smaller files >> to make it more manageable, and while i do this I would also like >> to move the files related to ipfw2 (namely ip_fw*c) to a better >> place. >> Any objection to moving them to sys/netinet/ipfw2 ? >> Also, I can't help noticing that sys/netinet/ contains 36 files >> related to sctp -- wouldn't it be the case to move them >> (perhaps with the exception of the userland headers) >> to a separate subdirectory ? > > for that matter it would be nice to put ALL teh protocols in their > own subdirectories. Yes, that would be the perfect scenario, but I don't think that's doable. SCTP can be moved because it hasn't matured enough to cause a "moving nightmare". I vote for "ipfw" like Sam, BTW. -- Rui Paulo --Apple-Mail-5--52127531 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkmrJdYACgkQfD8M/ASTygLouQCgivm7VKOGxz443T3q8L6k7lLR XQQAoNkm7fhzghvLZnDVHarrna/ANxGA =Qbs8 -----END PGP SIGNATURE----- --Apple-Mail-5--52127531-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 02:54:48 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 550A5106566B; Mon, 2 Mar 2009 02:54:48 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 2281C8FC0C; Mon, 2 Mar 2009 02:54:48 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id n222QQMD091705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 1 Mar 2009 18:26:26 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id n222QQrK091700; Sun, 1 Mar 2009 18:26:26 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA15727; Sun, 1 Mar 09 18:22:22 PST Date: Sun, 01 Mar 2009 18:22:02 -0800 From: perryh@pluto.rain.com To: rpaulo@gmail.com, julian@elischer.org Message-Id: <49ab42ca.YZ1mfcCDO0pvdDhv%perryh@pluto.rain.com> References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> In-Reply-To: <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 02:54:48 -0000 Rui Paulo wrote: > On 1 Mar 2009, at 21:26, Julian Elischer wrote: > > Luigi Rizzo wrote: > >> Hi, > >> I am planning to split netinet/ip_fw2.c in a number of smaller > >> files to make it more manageable, and while i do this I would > >> also like to move the files related to ipfw2 (namely ip_fw*c) > >> to a better place. > >> Any objection to moving them to sys/netinet/ipfw2 ? > >> Also, I can't help noticing that sys/netinet/ contains 36 > >> files related to sctp -- wouldn't it be the case to move > >> them (perhaps with the exception of the userland headers) > >> to a separate subdirectory ? > > > > for that matter it would be nice to put ALL teh protocols in > > their own subdirectories. > > Yes, that would be the perfect scenario, but I don't think that's > doable. > > SCTP can be moved because it hasn't matured enough to cause a > "moving nightmare". Perhaps everything can be moved, if hardlinks or symlinks are left in sys/netinet for those parts (mostly .h files, presumably) which have too much legacy to be moved outright. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 11:07:01 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 754FB1065700 for ; Mon, 2 Mar 2009 11:07:01 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6763D8FC2B for ; Mon, 2 Mar 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n22B6n4S057241 for ; Mon, 2 Mar 2009 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n22B6mAY057237 for freebsd-arch@FreeBSD.org; Mon, 2 Mar 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 2 Mar 2009 11:06:48 GMT Message-Id: <200903021106.n22B6mAY057237@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 11:07:29 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 16:50:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF0441065677 for ; Mon, 2 Mar 2009 16:50:05 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2368FC1D for ; Mon, 2 Mar 2009 16:50:05 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.3/8.14.3) with ESMTP id n22Go1Js049248; Mon, 2 Mar 2009 08:50:01 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id n22GngaW022220; Mon, 2 Mar 2009 08:49:42 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from gnnmac.hudson-trading.com.neville-neil.com (209.249.190.8.available.above.net [209.249.190.8] (may be forged)) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.3) with ESMTP id n22Gnfol004421; Mon, 2 Mar 2009 08:49:41 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Mon, 02 Mar 2009 11:49:41 -0500 Message-ID: From: "George V. Neville-Neil" To: perryh@pluto.rain.com In-Reply-To: <49ab42ca.YZ1mfcCDO0pvdDhv%perryh@pluto.rain.com> References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> <49ab42ca.YZ1mfcCDO0pvdDhv%perryh@pluto.rain.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-apple-darwin9.6.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: undef - spam scanning disabled X-CanIt-Geo: No geolocation information available for 64.13.141.3 X-CanItPRO-Stream: default X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 Cc: rpaulo@gmail.com, rrs@lakerest.net, arch@freebsd.org, julian@elischer.org, net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 16:50:06 -0000 At Sun, 01 Mar 2009 18:22:02 -0800, perryh@pluto.rain.com wrote: > > Rui Paulo wrote: > > On 1 Mar 2009, at 21:26, Julian Elischer wrote: > > > Luigi Rizzo wrote: > > >> Hi, > > >> I am planning to split netinet/ip_fw2.c in a number of smaller > > >> files to make it more manageable, and while i do this I would > > >> also like to move the files related to ipfw2 (namely ip_fw*c) > > >> to a better place. > > >> Any objection to moving them to sys/netinet/ipfw2 ? > > >> Also, I can't help noticing that sys/netinet/ contains 36 > > >> files related to sctp -- wouldn't it be the case to move > > >> them (perhaps with the exception of the userland headers) > > >> to a separate subdirectory ? > > > > > > for that matter it would be nice to put ALL teh protocols in > > > their own subdirectories. > > > > Yes, that would be the perfect scenario, but I don't think that's > > doable. > > > > SCTP can be moved because it hasn't matured enough to cause a > > "moving nightmare". > > Perhaps everything can be moved, if hardlinks or symlinks are > left in sys/netinet for those parts (mostly .h files, presumably) > which have too much legacy to be moved outright. I do not believe we want to go down the path of doing links. I do think that moving protocols is OK, and SCTP is a good candidate. I have cc'd the maintainer in case he's not on arch@. As to the original question about ipfw, if it can e done cleanly then yes that's fine. Best, George From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 18:30:28 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F351065735; Mon, 2 Mar 2009 18:30:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E2A5B8FC23; Mon, 2 Mar 2009 18:30:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5F74B46B3C; Mon, 2 Mar 2009 13:30:27 -0500 (EST) Date: Mon, 2 Mar 2009 18:30:27 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Rui Paulo In-Reply-To: <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> Message-ID: References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, Julian Elischer , net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 18:30:28 -0000 On Mon, 2 Mar 2009, Rui Paulo wrote: > On 1 Mar 2009, at 21:26, Julian Elischer wrote: > >> Luigi Rizzo wrote: >>> Hi, I am planning to split netinet/ip_fw2.c in a number of smaller files >>> to make it more manageable, and while i do this I would also like to move >>> the files related to ipfw2 (namely ip_fw*c) to a better place. Any >>> objection to moving them to sys/netinet/ipfw2 ? Also, I can't help >>> noticing that sys/netinet/ contains 36 files related to sctp -- wouldn't >>> it be the case to move them (perhaps with the exception of the userland >>> headers) to a separate subdirectory ? >> >> for that matter it would be nice to put ALL teh protocols in their own >> subdirectories. > > Yes, that would be the perfect scenario, but I don't think that's doable. > > SCTP can be moved because it hasn't matured enough to cause a "moving > nightmare". > > I vote for "ipfw" like Sam, BTW. I think massively rearranging things doesn't by us much in terms of beauty, but does give us a lot in terms of hassle, given current assumptions of alignment between the layout of /usr/include and the layout of /usr/src/sys. We'd need to introduce new explicit mappings to install include files in their old locations (which are required by applications), etc. For a change with such a minor benefit, the hassle will be huge. I'm fine with renaming the ipfw .c files and leaving in netinet, but let's not get carried away. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon Mar 2 18:57:00 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C7DF1065C84; Mon, 2 Mar 2009 18:57:00 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id B78938FC1C; Mon, 2 Mar 2009 18:56:59 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 0817D73098; Mon, 2 Mar 2009 20:01:57 +0100 (CET) Date: Mon, 2 Mar 2009 20:01:57 +0100 From: Luigi Rizzo To: Robert Watson Message-ID: <20090302190157.GA33704@onelab2.iet.unipi.it> References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: Rui Paulo , arch@freebsd.org, Julian Elischer , net@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 18:57:04 -0000 On Mon, Mar 02, 2009 at 06:30:27PM +0000, Robert Watson wrote: .. > >>Luigi Rizzo wrote: > >>>Hi, I am planning to split netinet/ip_fw2.c in a number of smaller files > >>>to make it more manageable, and while i do this I would also like to > >>>move the files related to ipfw2 (namely ip_fw*c) to a better place. Any > >>>objection to moving them to sys/netinet/ipfw2 ? Also, I can't help > >>>noticing that sys/netinet/ contains 36 files related to sctp -- wouldn't > >>>it be the case to move them (perhaps with the exception of the userland > >>>headers) to a separate subdirectory ? ... > I think massively rearranging things doesn't by us much in terms of beauty, > but does give us a lot in terms of hassle, given current assumptions of > alignment between the layout of /usr/include and the layout of > /usr/src/sys. We'd need to introduce new explicit mappings to install > include files in their old locations (which are required by applications), > etc. For a change with such a minor benefit, the hassle will be huge. I'm > fine with renaming the ipfw .c files and leaving in netinet, but let's not > get carried away. I suspect that the mention of symlinks (which is not mine and absolutely not what I want to do) triggered some alarms :) I have very clear the potential nightmare with careless moving of files, so I tried to make it clear that public headers are excluded: as you see i wrote "ip_fw*c" and "exception of the userland headers". To further clarify, my plan is the following: - leave ip_fw.h and ip_dummynet.h in /sys/netinet in case userland code is dependent on their location; - create /sys/netinet/ipfw/ to hold the kernel .c files related to ipfw and possibly dummynet (and also their private headers if any); I am not going to touch other people's stuff, though I repeat that sctp would clearly deserve a cleanup -- i doubt userland needs more than one or possibly two headers (one for the basic stuff, one for the fancy and possibly non-portable stuff). Tcp has similar issues especially for recent additions. More than the number of files in /sys/netinet/, i am worried by the amount of private headers that are exposed to userland for no good reason. In fact, some of them are contain: #ifndef _KERNEL #error "no user-serviceable parts inside" #endif Part of this is for historical reasons, but we should try to move to a better structure. Take e.g. tcp_var.h contains the stats (that some userland program may want to have) but also a ton of internal structures (e.g. those for SACK support) that have appeared very recently and have no reason to be there. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Tue Mar 3 23:33:27 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9491B1065676 for ; Tue, 3 Mar 2009 23:33:27 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3CF248FC0C for ; Tue, 3 Mar 2009 23:33:27 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 1C0522844E for ; Wed, 4 Mar 2009 07:33:26 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id A49B6EBAAEE; Wed, 4 Mar 2009 07:33:25 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id SypuQZt1A8ZX; Wed, 4 Mar 2009 07:33:20 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 7880BEBA63F; Wed, 4 Mar 2009 07:33:19 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=r9HNY4ffYezxS9GMlQNTZ8JKyw9h+Q7wfnkC2Yk18sR9qryUxNgmmIJKbdP+o0gJ1 WaNXo+tqg1GqudKZ1NF5g== Message-ID: <49ADBE3D.10508@delphij.net> Date: Tue, 03 Mar 2009 15:33:17 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.19 (X11/20090217) MIME-Version: 1.0 To: freebsd-arch@FreeBSD.org X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: SCCS IDs in old code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2009 23:33:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'd like to know if there would be any objections if things like: static char sccsid[] = "@(#)rec_utils.c 8.6 (Berkeley) 7/16/94" Be moved into the comment right after the copyright header? Personally I don't see much point keeping 'em just in order to make -DLIBC_SCCS work, since these code changes from time to time and the version number and dates are no longer relevant, perhaps, they should be better just kept in the comment for reference from historical code. Comments? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkmtvjwACgkQi+vbBBjt66CR+gCgh80Q1b1+x4BsKq4k6V/v28Io g0YAn3UWTtYShVL9ZPbZKJbUzTwDKlja =yTlj -----END PGP SIGNATURE----- From owner-freebsd-arch@FreeBSD.ORG Wed Mar 4 03:20:17 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB6CB106564A for ; Wed, 4 Mar 2009 03:20:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF168FC08 for ; Wed, 4 Mar 2009 03:20:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-107-120-227.carlnfd1.nsw.optusnet.com.au (c122-107-120-227.carlnfd1.nsw.optusnet.com.au [122.107.120.227]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n243JSoc010598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Mar 2009 14:19:33 +1100 Date: Wed, 4 Mar 2009 14:19:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: d@delphij.net In-Reply-To: <49ADBE3D.10508@delphij.net> Message-ID: <20090304141253.V17817@delplex.bde.org> References: <49ADBE3D.10508@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@FreeBSD.org Subject: Re: SCCS IDs in old code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 03:20:18 -0000 On Tue, 3 Mar 2009, Xin LI wrote: > I'd like to know if there would be any objections if things like: > > static char sccsid[] = "@(#)rec_utils.c 8.6 (Berkeley) 7/16/94" > > Be moved into the comment right after the copyright header? Personally Of course there would be objections. > I don't see much point keeping 'em just in order to make -DLIBC_SCCS > work, since these code changes from time to time and the version number > and dates are no longer relevant, perhaps, they should be better just > kept in the comment for reference from historical code. style(9) requires keeping vendor ids unedited and unmoved and uncommented-out and not attached to the FreeBSD id in `#if 0' blocks. rec_utils.c follows the no-edit no-move rules but not the other 2. Bruce From owner-freebsd-arch@FreeBSD.ORG Wed Mar 4 03:26:40 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B977310656C6 for ; Wed, 4 Mar 2009 03:26:40 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 7C90D8FC26 for ; Wed, 4 Mar 2009 03:26:40 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n243SoAs010577; Tue, 3 Mar 2009 22:28:50 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n243SoJo010576; Tue, 3 Mar 2009 22:28:50 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 3 Mar 2009 22:28:50 -0500 From: David Schultz To: d@delphij.net Message-ID: <20090304032850.GA8551@zim.MIT.EDU> Mail-Followup-To: d@delphij.net, freebsd-arch@FreeBSD.ORG References: <49ADBE3D.10508@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49ADBE3D.10508@delphij.net> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: SCCS IDs in old code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 03:26:41 -0000 On Tue, Mar 03, 2009, Xin LI wrote: > I'd like to know if there would be any objections if things like: > > static char sccsid[] = "@(#)rec_utils.c 8.6 (Berkeley) 7/16/94" > > Be moved into the comment right after the copyright header? Personally > I don't see much point keeping 'em just in order to make -DLIBC_SCCS > work, since these code changes from time to time and the version number > and dates are no longer relevant, perhaps, they should be better just > kept in the comment for reference from historical code. I don't think it matters much either way, but -DLIBC_SCCS hasn't compiled for a long time, so I doubt anyone will object. From owner-freebsd-arch@FreeBSD.ORG Wed Mar 4 23:31:48 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EBE9106564A for ; Wed, 4 Mar 2009 23:31:48 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 838638FC0A for ; Wed, 4 Mar 2009 23:31:48 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 4 Mar 2009 15:19:52 -0800 Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E0275F637@seaxch09.desktop.isilon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: knotes and force unmount Thread-Index: AcmdH7h0i1O7u+taTOGufwjpahE4rg== From: "Matthew Fleming" To: Subject: knotes and force unmount X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 23:31:48 -0000 At close() time knote_fdclose() will take care of any outstanding knotes for the file by looping over the list, calling kn_fop->f_detach and then knote_drop(). For a umount -f, there may still be open files; these will be handled in vgonel() by a call to VOP_CLOSE(). knotes are untouched in this case. If the filesystem is from a loadable module, then the knotes need to be cleaned up before the module is unloaded to prevent a callout into code that no longer exists, when the file is later closed. So it seems like there is code missing from vgonel() that should be doing this for the case where it calls VOP_CLOSE(). I realize this isn't a problem for ufs (never unloaded because it's used for /) and NFS (no events), but for any other filesystem this seems like a hole in the force unmount story. Is this interpretation correct? It would always be possible to add code to a filesystem's vop_close routine or its unmount routine, but architecturally this seems like something that should be handled at vgonel->VOP_CLOSE time, because it's a problem for any loadable filesystem with events. Thanks, matthew From owner-freebsd-arch@FreeBSD.ORG Thu Mar 5 05:44:45 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D2C3106566B for ; Thu, 5 Mar 2009 05:44:45 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by mx1.freebsd.org (Postfix) with ESMTP id 18D9F8FC19 for ; Thu, 5 Mar 2009 05:44:44 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by rv-out-0506.google.com with SMTP id f6so4218459rvb.43 for ; Wed, 04 Mar 2009 21:44:44 -0800 (PST) Received: by 10.141.176.4 with SMTP id d4mr409295rvp.5.1236230404702; Wed, 04 Mar 2009 21:20:04 -0800 (PST) Received: from ?10.0.1.198? (udp016664uds.hawaiiantel.net [72.235.41.117]) by mx.google.com with ESMTPS id b8sm10842904rvf.8.2009.03.04.21.20.02 (version=SSLv3 cipher=RC4-MD5); Wed, 04 Mar 2009 21:20:03 -0800 (PST) Date: Wed, 4 Mar 2009 19:16:46 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Matthew Fleming In-Reply-To: <06D5F9F6F655AD4C92E28B662F7F853E0275F637@seaxch09.desktop.isilon.com> Message-ID: References: <06D5F9F6F655AD4C92E28B662F7F853E0275F637@seaxch09.desktop.isilon.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: knotes and force unmount X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 05:44:45 -0000 On Wed, 4 Mar 2009, Matthew Fleming wrote: > At close() time knote_fdclose() will take care of any outstanding knotes > for the file by looping over the list, calling kn_fop->f_detach and then > knote_drop(). For a umount -f, there may still be open files; these > will be handled in vgonel() by a call to VOP_CLOSE(). knotes are > untouched in this case. > > If the filesystem is from a loadable module, then the knotes need to be > cleaned up before the module is unloaded to prevent a callout into code > that no longer exists, when the file is later closed. So it seems like > there is code missing from vgonel() that should be doing this for the > case where it calls VOP_CLOSE(). I realize this isn't a problem for ufs > (never unloaded because it's used for /) and NFS (no events), but for > any other filesystem this seems like a hole in the force unmount story. > > Is this interpretation correct? It would always be possible to add code > to a filesystem's vop_close routine or its unmount routine, but > architecturally this seems like something that should be handled at > vgonel->VOP_CLOSE time, because it's a problem for any loadable > filesystem with events. Hi Matthew, This is actually a problem for any VOP with "U U U" in the vnode_if.src specification. Forced unmounts are delayed by vnode locks held but several vops don't hold vnode locks and instead rely on other locking. We have the same problem with loadable syscalls. How can you tell when the code is no longer in use? The right answer would probably be to wait for every thread that is currently in a syscall to leave once before unloading completely. This would solve syscalls and your loadable module case. Although it would be complicated by nfs which doesn't use syscalls but does issue VOPs. I believe a general solution for syscalls/loadable modules would solve this case. Don't you think? I thought Isilon already did something for this? Or is this something you're only discovering since you've merged? If you're interested in working on this I can help you implement a general solution. Thanks, Jeff > > Thanks, > matthew > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@FreeBSD.ORG Thu Mar 5 16:32:28 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C910B10656BE for ; Thu, 5 Mar 2009 16:32:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8181E8FC19 for ; Thu, 5 Mar 2009 16:32:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 0146D46B03 for ; Thu, 5 Mar 2009 11:32:27 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n25GWMto005108 for ; Thu, 5 Mar 2009 11:32:22 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: arch@freebsd.org Date: Thu, 5 Mar 2009 10:41:10 -0500 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903051041.10678.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 05 Mar 2009 11:32:22 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9074/Thu Mar 5 10:21:02 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Subject: [PATCH] Set SYSDIR for modules built with kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 16:32:29 -0000 One of the things each kernel module build has to do is figure out where the source tree it belongs to lives. /usr/share/mk/bsd.kmod.mk uses a heuristic where it walks up N levels of the tree looking for a kernel source directory. If that fails it falls back to /sys or /usr/src/sys. One side effect of this (besides lots of directory lookups during a build as each kernel module build stage has to do this) is that if CURRENT adds an even deeper level of nesting (such as with the recent ata chipset modules) then you can't build a kernel with those modules until /usr/share/mk/bsd.kmod.mk on your build machine has been updated. This means you can't build an 8.0 kernel on 7.0 simply because ata chipset modules don't find the right headers. However, the SYSDIR is already known during a kernel build (we depend on this to make modules built in ports DTRT when they are rebuilt via buildkernel). I just changed the kernel build Makefile to always set SYSDIR. With this change, I was able to build an 8.0 kernel + modules on a 7.1-ish machine with an unpatched /usr/share/mk/bsd.kmod.mk. This should also have the side effect of reducing the number of pathname lookup operations done during a kernel build with modules. Thoughts? --- //depot/projects/smpng/sys/conf/kern.post.mk 2009/01/15 22:41:24 +++ //depot/user/jhb/lock/conf/kern.post.mk 2009/03/04 21:25:21 @@ -12,7 +12,8 @@ .if defined(DESTDIR) MKMODULESENV+= DESTDIR="${DESTDIR}" .endif -MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" +SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;} +MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}" .MAIN: all @@ -29,7 +30,6 @@ # Handle out of tree ports .if !defined(NO_MODULES) && defined(PORTS_MODULES) -SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;} PORTSMODULESENV=SYSDIR=${SYSDIR} .for __target in all install reinstall clean ${__target}: ports-${__target} -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Fri Mar 6 10:48:37 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E42106566B; Fri, 6 Mar 2009 10:48:37 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 960988FC14; Fri, 6 Mar 2009 10:48:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id d26so35182eyd.7 for ; Fri, 06 Mar 2009 02:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=Tbm8LnYU9w1Y94R/m1Z/EchdiyxaaZjH/vuvjoxP430=; b=IurrtF7ODycL5Lfo1EtRu5FHKLbWx5CvtVzgIzYqc+nPHLDJpL0z9hOGlABQPmSF+y Ie+oN81EZ3dZun45uUZfa1z8OeMACepRSinmGrg0PtOtJ3qXkC0NC1JuTX6RhQ4NAjDP 2K6uD+3N0Z4sLTeVkIeWrIZ893Wp7IMd2yx/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=f9aqxo9Lnv8I+8YNHGt3U3SAcbIk7zHSz+W+a5VSlnYXP+j37+ODJMRcV8g5vPfX4A 3kxzGhM2piMwFxjeSz/ZU4NzyXG3fw7SDtgKqbL07DJK3RyeIVT92KVd+fYCsaGS9du7 CcnoGOgJfU+tYwSHLBbWVau/2/icto5M9F6+M= Received: by 10.216.0.206 with SMTP id 56mr1180502web.102.1236336515643; Fri, 06 Mar 2009 02:48:35 -0800 (PST) Received: from epsilon.lan (bl6-147-236.dsl.telepac.pt [82.155.147.236]) by mx.google.com with ESMTPS id h6sm2075304nfh.15.2009.03.06.02.48.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 02:48:35 -0800 (PST) Message-Id: <7B12E246-F284-4436-BDAD-5263769E339E@gmail.com> From: Rui Paulo To: John Baldwin In-Reply-To: <200903051041.10678.jhb@freebsd.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3-331275001" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 6 Mar 2009 10:48:32 +0000 References: <200903051041.10678.jhb@freebsd.org> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: arch@freebsd.org Subject: Re: [PATCH] Set SYSDIR for modules built with kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 10:48:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3-331275001 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 5 Mar 2009, at 15:41, John Baldwin wrote: > One of the things each kernel module build has to do is figure out > where the > source tree it belongs to lives. /usr/share/mk/bsd.kmod.mk uses a > heuristic > where it walks up N levels of the tree looking for a kernel source > directory. > If that fails it falls back to /sys or /usr/src/sys. One side > effect of this > (besides lots of directory lookups during a build as each kernel > module build > stage has to do this) is that if CURRENT adds an even deeper level > of nesting > (such as with the recent ata chipset modules) then you can't build a > kernel > with those modules until /usr/share/mk/bsd.kmod.mk on your build > machine has > been updated. This means you can't build an 8.0 kernel on 7.0 > simply because > ata chipset modules don't find the right headers. > > However, the SYSDIR is already known during a kernel build (we > depend on this > to make modules built in ports DTRT when they are rebuilt via > buildkernel). > I just changed the kernel build Makefile to always set SYSDIR. With > this > change, I was able to build an 8.0 kernel + modules on a 7.1-ish > machine with > an unpatched /usr/share/mk/bsd.kmod.mk. This should also have the > side > effect of reducing the number of pathname lookup operations done > during a > kernel build with modules. > > Thoughts? I think this should go in. Thanks. -- Rui Paulo --Apple-Mail-3-331275001 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkmw/4AACgkQfD8M/ASTygJXbgCdEBz+J9Vh18DoTYsVCMX/jHkm 97sAnjD0A9+eJSxEc/UltRdqHwHCxZ2A =HWcQ -----END PGP SIGNATURE----- --Apple-Mail-3-331275001-- From owner-freebsd-arch@FreeBSD.ORG Fri Mar 6 12:40:59 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA10106566B for ; Fri, 6 Mar 2009 12:40:59 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id DB7C28FC0A for ; Fri, 6 Mar 2009 12:40:58 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LfZMG-0004qN-Va for freebsd-arch@freebsd.org; Fri, 06 Mar 2009 12:40:56 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 12:40:56 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 12:40:56 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Vadim Goncharov Date: Fri, 6 Mar 2009 12:40:47 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 25 Message-ID: References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> <20090302190157.GA33704@onelab2.iet.unipi.it> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Luigi Rizzo User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 12:40:59 -0000 Hi Luigi Rizzo! On Mon, 2 Mar 2009 20:01:57 +0100; Luigi Rizzo wrote about 'Re: spliting kernel ipfw source ? (also involves sctp)': >>>>>Hi, I am planning to split netinet/ip_fw2.c in a number of smaller files >>>>>to make it more manageable, and while i do this I would also like to >>>>>move the files related to ipfw2 (namely ip_fw*c) to a better place. Any >>>>>objection to moving them to sys/netinet/ipfw2 ? Also, I can't help [...] > To further clarify, my plan is the following: > - leave ip_fw.h and ip_dummynet.h in /sys/netinet in case > userland code is dependent on their location; > - create /sys/netinet/ipfw/ to hold the kernel .c files related to > ipfw and possibly dummynet (and also their private headers if any); Exactly that and nothing more? I'm currently working on extending ipfw for Foundation with userland interface will be changed (and I thinking about introducing modules), what else do you plan to do? -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-arch@FreeBSD.ORG Fri Mar 6 16:21:28 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C025A106566C for ; Fri, 6 Mar 2009 16:21:28 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 7A2A48FC13 for ; Fri, 6 Mar 2009 16:21:28 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A211073098; Fri, 6 Mar 2009 17:10:28 +0100 (CET) Date: Fri, 6 Mar 2009 17:10:28 +0100 From: Luigi Rizzo To: Vadim Goncharov Message-ID: <20090306161028.GA12322@onelab2.iet.unipi.it> References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> <20090302190157.GA33704@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-arch@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 16:21:29 -0000 On Fri, Mar 06, 2009 at 12:40:47PM +0000, Vadim Goncharov wrote: > Hi Luigi Rizzo! > > On Mon, 2 Mar 2009 20:01:57 +0100; Luigi Rizzo wrote about 'Re: spliting kernel ipfw source ? (also involves sctp)': > > >>>>>Hi, I am planning to split netinet/ip_fw2.c in a number of smaller files > >>>>>to make it more manageable, and while i do this I would also like to > >>>>>move the files related to ipfw2 (namely ip_fw*c) to a better place. Any > >>>>>objection to moving them to sys/netinet/ipfw2 ? Also, I can't help > > [...] > > > To further clarify, my plan is the following: > > > - leave ip_fw.h and ip_dummynet.h in /sys/netinet in case > > userland code is dependent on their location; > > - create /sys/netinet/ipfw/ to hold the kernel .c files related to > > ipfw and possibly dummynet (and also their private headers if any); > > Exactly that and nothing more? I'm currently working on extending ipfw for > Foundation with userland interface will be changed (and I thinking about > introducing modules), what else do you plan to do? Generally speaking, the kernel/userland interface will remain unchanged both at binary and source level, which means no backward incompatible changes in the sockopt numbers and messages, and no changes in the location and userland-visible parts of the headers. In practical terms, ip_fw.h might lose the definition of struct ip_fw_args, or the prototypes for the various kernel functions. The #ifdef _KERNEL part of ip_dummynet.h should also go to some other file. If you want to contact me, on the list or offline, to discuss what you want to do or what kind of 'modules' (kernel or userland ?) are you thinking about, i'd be more than happy to help. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Sat Mar 7 10:27:32 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 820F3106564A for ; Sat, 7 Mar 2009 10:27:32 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 468178FC13 for ; Sat, 7 Mar 2009 10:27:31 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n27AVc8K034491 for ; Sat, 7 Mar 2009 05:31:38 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n27AVcDf034490 for arch@FreeBSD.ORG; Sat, 7 Mar 2009 05:31:38 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sat, 7 Mar 2009 05:31:38 -0500 From: David Schultz To: arch@FreeBSD.ORG Message-ID: <20090307103138.GA34456@zim.MIT.EDU> Mail-Followup-To: arch@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Subject: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 10:27:32 -0000 I'd like the gcc in our tree to use the C99 semantics instead of GNU semantics for inline functions in C99 and GNU99 mode. The following patch implements this behavior. It is based on a snapshot of the gcc 4.3 branch from March 2007, prior to the GPLv3 switch. http://www.freebsd.org/~das/c99inline.diff I ran the inline function regression tests from the latest gcc snapshot and fixed two bugs. All the tests pass now, except that programs that bogusly try to instantiate an extern definition of an inline function inside another function cause an ICE. The object files produced by buildworld on amd64 in gnu89 mode are identical with and without this patch (excepting things like OpenSSL that include the compilation time in the binary), so it should be safe for the base system. (One small bugfix in lib/msun and one change in reiserfs are required to make universe without errors.) Ports may be affected if they are compiled with -std=c99 or -std=gnu99 and they're not actually prepared to handle it. The patch also enables some additional error checking (e.g., gcc now complains about inline functions that are declared but never defined), so that could lead to a few build errors. I expect that any port that fails as a result of this patch would fail under gcc 4.3.0 anyway. I'll try to coordinate with portmgr if it looks like there are major issues. What do people think about this? From owner-freebsd-arch@FreeBSD.ORG Sat Mar 7 11:19:45 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 282F11065675 for ; Sat, 7 Mar 2009 11:19:45 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id E43E78FC23 for ; Sat, 7 Mar 2009 11:19:44 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id C089B73098; Sat, 7 Mar 2009 12:24:49 +0100 (CET) Date: Sat, 7 Mar 2009 12:24:49 +0100 From: Luigi Rizzo To: arch@FreeBSD.ORG Message-ID: <20090307112449.GB45088@onelab2.iet.unipi.it> References: <20090307103138.GA34456@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090307103138.GA34456@zim.MIT.EDU> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 11:19:45 -0000 On Sat, Mar 07, 2009 at 05:31:38AM -0500, David Schultz wrote: > I'd like the gcc in our tree to use the C99 semantics instead of GNU > semantics for inline functions in C99 and GNU99 mode. The following > patch implements this behavior. It is based on a snapshot of the gcc > 4.3 branch from March 2007, prior to the GPLv3 switch. > > http://www.freebsd.org/~das/c99inline.diff ... > What do people think about this? would you be able to provide a short summary of how the C99 and GNU99 semantics differ, so that people will have a easier time figuring out how to handle the change ? Especially, is there anything that a developer should worry about, or except from some corner cases the switch will (and should) be completely transparent to the average developer without a specific interest in compilers ? I know what I am asking is probably in the diff you supplied, but it's a bit difficult to follow there thanks luigi From owner-freebsd-arch@FreeBSD.ORG Sat Mar 7 17:39:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8400106566B for ; Sat, 7 Mar 2009 17:39:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 9C5128FC0C for ; Sat, 7 Mar 2009 17:39:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n27Hd5GU006582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 7 Mar 2009 09:39:05 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49B2B139.6010104@freebsd.org> Date: Sat, 07 Mar 2009 09:39:05 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: arch@freebsd.org References: <20090307103138.GA34456@zim.MIT.EDU> In-Reply-To: <20090307103138.GA34456@zim.MIT.EDU> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Subject: Re: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 17:39:06 -0000 David Schultz wrote: > I'd like the gcc in our tree to use the C99 semantics instead of GNU > semantics for inline functions in C99 and GNU99 mode. The following > patch implements this behavior. It is based on a snapshot of the gcc > 4.3 branch from March 2007, prior to the GPLv3 switch. > Why? I can imagine it improving portability to other toolchains like LLVM, ICC, etc. I'm not opposed but seems like you should be clear. Sam From owner-freebsd-arch@FreeBSD.ORG Sat Mar 7 19:06:32 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCDDA106566B for ; Sat, 7 Mar 2009 19:06:32 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 991DC8FC15 for ; Sat, 7 Mar 2009 19:06:32 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 235EE9CB090 for ; Sat, 7 Mar 2009 20:06:26 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SDeGnBf7-y7u for ; Sat, 7 Mar 2009 20:06:20 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5AB099CB1B9 for ; Sat, 7 Mar 2009 20:06:20 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n27J6KZ3046742 for arch@FreeBSD.ORG; Sat, 7 Mar 2009 20:06:20 +0100 (CET) (envelope-from rdivacky) Date: Sat, 7 Mar 2009 20:06:20 +0100 From: Roman Divacky To: arch@FreeBSD.ORG Message-ID: <20090307190620.GA45956@freebsd.org> References: <20090307103138.GA34456@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090307103138.GA34456@zim.MIT.EDU> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 19:06:33 -0000 On Sat, Mar 07, 2009 at 05:31:38AM -0500, David Schultz wrote: > I'd like the gcc in our tree to use the C99 semantics instead of GNU > semantics for inline functions in C99 and GNU99 mode. The following > patch implements this behavior. It is based on a snapshot of the gcc > 4.3 branch from March 2007, prior to the GPLv3 switch. I definitely support this... thnx for working on it! From owner-freebsd-arch@FreeBSD.ORG Sat Mar 7 19:16:50 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65941106566B for ; Sat, 7 Mar 2009 19:16:50 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1288FC13 for ; Sat, 7 Mar 2009 19:16:50 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n27JL098036308; Sat, 7 Mar 2009 14:21:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n27JL05T036307; Sat, 7 Mar 2009 14:21:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sat, 7 Mar 2009 14:21:00 -0500 From: David Schultz To: Luigi Rizzo Message-ID: <20090307192100.GA36158@zim.MIT.EDU> Mail-Followup-To: Luigi Rizzo , arch@FreeBSD.ORG References: <20090307103138.GA34456@zim.MIT.EDU> <20090307112449.GB45088@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090307112449.GB45088@onelab2.iet.unipi.it> Cc: arch@FreeBSD.ORG Subject: Re: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 19:16:50 -0000 On Sat, Mar 07, 2009, Luigi Rizzo wrote: > On Sat, Mar 07, 2009 at 05:31:38AM -0500, David Schultz wrote: > > I'd like the gcc in our tree to use the C99 semantics instead of GNU > > semantics for inline functions in C99 and GNU99 mode. The following > > patch implements this behavior. It is based on a snapshot of the gcc > > 4.3 branch from March 2007, prior to the GPLv3 switch. > > > > http://www.freebsd.org/~das/c99inline.diff > ... > > What do people think about this? > > would you be able to provide a short summary of how the C99 and > GNU99 semantics differ, so that people will have a easier time > figuring out how to handle the change ? > > Especially, is there anything that a developer should worry about, > or except from some corner cases the switch will (and should) be > completely transparent to the average developer without a specific > interest in compilers ? > > I know what I am asking is probably in the diff you supplied, > but it's a bit difficult to follow there Good point; it isn't clear at all from the diffs. Basically it all has to do with the interpretation of `inline' versus `extern inline'. Historical gcc semantics are incompatible with C99, but this was fixed in gcc 4.3. This patch essentially backports that patch from a development snapshot of gcc 4.3 prior to the GPLv3 switch. This page summarizes the differences pretty well, but ignore the last section: http://www.greenend.org.uk/rjk/2003/03/inline.html The most important point for developers is that the one kind of inline where gcc and C99 agree is `static inline', so if you use that, you won't have to worry. Otherwise, the semantics you get depend on many things: - gcc prior to 4.1.3: You always get GNU inline rules. - gcc 4.1.3 to 4.2.1 (the one in the tree): In -std=gnu89 mode, you get GNU inline rules. In -std=gnu99 or -std=c99 mode, you get a warning that GNU inline rules aren't implemented. - gcc 4.3+ or gcc with this patch: In -std=gnu89 mode, you get GNU inline rules. In -std=gnu99 or -std=c99 mode, you get C99 rules. You can use __gnu89_inline (defined in sys/cdefs.h) or -fgnu-inline to force the GNU rules regardless, but you can't get the C99 rules with an unpatched pre-4.3 compiler. In gcc 4.2+, the macros __GNUC_{GNU,STDC}_INLINE__ tell you what you're getting. With this patch, you basically get the semantics you asked for instead of a warning that they're not implemented. If you weren't getting warnings with gcc 4.2 before, then nothing changes. Another minor consequence of this patch is that it enables a few new warnings and errors involving non-static inlines. For instance, if you have an extern inline function that references a static variable, such that the function might refer to a *different* version of the variable depending on whether it's inlined or not, gcc will now tell you you're trying to do something bogus. It will also complain if you declare a function inline but never define it.