From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 26 13:44:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0F2216A412 for ; Sun, 26 Nov 2006 13:44:22 +0000 (UTC) (envelope-from freebsd@yelloworb.com) Received: from mail.yelloworb.com (user12.85-195-15.netatonce.net [85.195.15.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 4627743D83 for ; Sun, 26 Nov 2006 13:43:21 +0000 (GMT) (envelope-from freebsd@yelloworb.com) Received: (qmail 51547 invoked by uid 1010); 26 Nov 2006 13:44:14 -0000 Received: from gammaverse.priv.yelloworb.com (HELO ?127.0.0.1?) (karl-petter@yelloworb.com@192.168.132.11) by mail.yelloworb.com with SMTP; 26 Nov 2006 13:44:14 -0000 Message-ID: <45699A22.4050109@yelloworb.com> Date: Sun, 26 Nov 2006 14:44:02 +0100 From: =?ISO-8859-1?Q?Karl-Petter_=C5kesson?= User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Driver for Agere 131x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 13:44:22 -0000 Hi, I wanted a third network card in my BSD machine and since I have a PCI-E 1x port free I thought it could be good to buy a card for that since I wouldnt plug much anything else in there. The local computer shop had a Agere card which costed about 25$ so I just bought it. Though when I got home and started to search for a driver I realized no driver existed for FreeBSD, atleast what I could find. There exists one for Linux which I have found some links to: http://dadams1969.googlepages.com/et131xkernelmodule http://sourceforge.net/projects/et131x/ I have no experience of writing a driver for BSD nor trying to port one though have extensive programming experience so my question is; Is it very hard to do a port from Linux? Anyone got any good tips or references on how to start? Agere has datasheets for chip which would make it easier as well to create a driver. http://www.agere.com/entnet/doks/DS06_153_ET1310_7-11-06FINAL.pdf /Kalle From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 26 20:14:51 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67C1A16A510; Sun, 26 Nov 2006 20:14:51 +0000 (UTC) (envelope-from matteo@freebsd.org) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 776274454F; Sun, 26 Nov 2006 19:54:18 +0000 (GMT) (envelope-from matteo@freebsd.org) Received: from kaiser.sig11.org (87.4.176.224) by vsmtp3.tin.it (7.2.072.1) id 4565722E0011485D; Sun, 26 Nov 2006 20:51:33 +0100 Received: from kaiser.sig11.org (rionda@localhost [127.0.0.1]) by kaiser.sig11.org (8.13.8/8.13.8) with ESMTP id kAQJpWtN003125; Sun, 26 Nov 2006 20:51:32 +0100 (CET) (envelope-from matteo@freebsd.org) Received: (from rionda@localhost) by kaiser.sig11.org (8.13.8/8.13.8/Submit) id kAQJpRJs003124; Sun, 26 Nov 2006 20:51:27 +0100 (CET) (envelope-from matteo@freebsd.org) X-Authentication-Warning: kaiser.sig11.org: rionda set sender to matteo@freebsd.org using -f Date: Sun, 26 Nov 2006 20:51:24 +0100 From: Matteo Riondato To: freesbie@gufi.org, varie@gufi.org, freebsd-small@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20061126195124.GA2636@kaiser.sig11.org> Mail-Followup-To: Matteo Riondato , freesbie@gufi.org, varie@gufi.org, freebsd-small@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Cc: Subject: Announce: FreeSBIE 2.0-RC1 is available X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 20:14:51 -0000 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable All, if you followed the development of FreeSBIE 2.0 a bit, you should remember that, back in Semptember, I said that FreeSBIE 2.0 would have been the last of a series of four ISO images. Three images were already published: FreeSBIE GMV back in August, FreeSBIE LVC in October, FreeSBIE 2.0-BETA in November. Well, circustamces make me release a fourth ISO image which is *not* FreeSBIE 2.0, but FreeSBIE 2.0-RC1 (Release Candidate 1). This is due to the number of bugs which had been fixed after 2.0-BETA was release.=20 If no major bugs are found, FreeSBIE 2.0 is going to be released not too long after FreeBSD 6.2-RELEASE has been released. Hopefully you will be able to put a FreeSBIE 2.0 CD-ROM under your Christmas tree. :) FreeSBIE 2.0-RC1 is based on the RELENG_6_2 branch of the FreeBSD source tree and on the RELEASE_6_2_0 branch of the ports tree. Testing the ISO image, finding bugs and reporting them back to me or to the freesbie@gufi.org mailing list are the foci for those who want to give this ISO image a try, and I hope many of you will. There is still a lot of free space on the ISO image, so feel free to suggest additional software to include. FreeSBIE 2.0-RC1 can be downloaded from our mirrors: ftp://ftp.freesbie.org/pub/Freesbie/2.0-RC1/ ftp://ftp2.freesbie.org/pub/FreeSBIE/2.0-RC1/ ftp://ftp.gr.freesbie.org/pub/FreeSBIE/2.0-RC1/ ftp://ftp.be.freesbie.org/pub/freesbie/2.0-RC1/ ftp://ftp2.ie.freesbie.org/pub/freesbie/2.0-RC1/ ftp://ftp.fr.freesbie.org/freesbie/2.0-RC1/ ftp://ftp8.de.freesbie.org/unix/FreeSBIE/2.0-RC1 MD5 checksum for the ISO image is: MD5 (FreeSBIE-2.0-RC1-20061123.iso) =3D 9dfced489f6fd083f10b14e23c25079 Thank you in advance for testing FreeSBIE 2.0-RC1 Best Regards --=20 Matteo Riondato FreeBSD Committer (http://www.freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) --SUOF0GtieIMvvwua Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFafA82Mp4pR7Fa+wRAuhBAKC1LdbrI0aVh/qzJTEBrySEINgP3ACfcawf XbZb8ijOrfj0cRr7b3IkC0w= =AAq0 -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 01:54:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D468516A40F; Mon, 27 Nov 2006 01:54:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 127C843D58; Mon, 27 Nov 2006 01:53:26 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kAR1s1AI033819; Sun, 26 Nov 2006 18:54:07 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <456A4536.2040904@samsco.org> Date: Sun, 26 Nov 2006 18:53:58 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: Danny Braniss References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org X-Mailman-Approved-At: Mon, 27 Nov 2006 02:02:33 +0000 Cc: freebsd-scsi@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: iSCSI/shutdown advice needed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 01:54:24 -0000 Danny Braniss wrote: > hi, > I'm trying to finish up the iSCSI initiator, > and need some advice. To shutdown the initiator, I > need to: > 1- close down the CAM-peripherals, (ie da) > 2- empty up all pending iSCSI transactions > 3- close the tcp connection > 2 & 3 I can handle, it's 1 that im stuck. > Q: how can I call the peripheral close function, or is there > some CAM command? > I tried > xpt_async(AC_LOST_DEVICE, isp->cam_path, NULL); > but this it far to drastic, and actually will cause panic > if the device is still mounted. > > danny > UFS doesn't handle devices going away unexpectedly. Fixing it involves massive changes to both UFS and the VM system. However, sending the AC_LOST_DEVICE is probably the right thing to do. Scott From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 10:03:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5D5D16A47B for ; Mon, 27 Nov 2006 10:03:27 +0000 (UTC) (envelope-from earl.lapus@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id D126843D53 for ; Mon, 27 Nov 2006 10:02:27 +0000 (GMT) (envelope-from earl.lapus@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so2054319nfc for ; Mon, 27 Nov 2006 02:03:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ZqG9BvNY2LykeWTuW6T+1qZzLsVH7JVABv9ys0oXXYBQAiFfw3yT4EAfQUZH0C6/bZNoq1qqGdNvIvFhvT4eBEnUZE2uLRh+VzsbUQgAtI1DwmPXHTfx/LUifTroGadmqcr9XUX7tDtUFnDORZT4txLhU/lzUqUZVBqoSgI6qmc= Received: by 10.78.128.11 with SMTP id a11mr13076311hud.1164621805901; Mon, 27 Nov 2006 02:03:25 -0800 (PST) Received: by 10.78.133.9 with HTTP; Mon, 27 Nov 2006 02:03:25 -0800 (PST) Message-ID: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> Date: Mon, 27 Nov 2006 18:03:25 +0800 From: "Earl Lapus" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 10:03:28 -0000 hi, I was browsing through some code and stumbled upon this: ... if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0)) { warnx("m1 must be zero for convex curve: %s", pa->qname); return (-1); } ... would it be safe to change it to: ... if (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) { warnx("m1 must be zero for convex curve: %s", pa->qname); return (-1); } ... -OR- is there something between those lines that I'm missing. The piece of code that I'm referring to is found in /usr/src/contrtib/pf/pfctl/pfctl_altq.c -- There are seven words in this sentence. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 12:11:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A12D16A50E for ; Mon, 27 Nov 2006 12:11:35 +0000 (UTC) (envelope-from quetzal@zone3000.net) Received: from mx1.sitevalley.com (sitevalley.com [209.67.60.43]) by mx1.FreeBSD.org (Postfix) with SMTP id 557A543DEA for ; Mon, 27 Nov 2006 12:07:10 +0000 (GMT) (envelope-from quetzal@zone3000.net) Received: from unknown (HELO localhost) (217.144.69.37) by 209.67.61.254 with SMTP; 27 Nov 2006 12:08:07 -0000 Date: Mon, 27 Nov 2006 14:07:40 +0200 From: Nikolay Pavlov To: freebsd-hackers@freebsd.org Message-ID: <20061127120740.GA12728@zone3000.net> Mail-Followup-To: Nikolay Pavlov , freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.1-RELEASE-p10 Subject: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 12:11:35 -0000 Hi. I am trying to extend fstat utility, so that it can use name cache to recreate full path at least for text. I have found vn_fullpath function usefull in this case. I am newbe in C, so it could be stupid question, but could someone explaine what is "struct thread *td" in argument list of this function. Is this the thread which opened the vnode initially or it is the thread which searches for the vnode? i.e. fstat thread. In any case how i can get this *td structure? -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ====================================================================== From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 12:52:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EF0816A412; Mon, 27 Nov 2006 12:52:54 +0000 (UTC) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68B6C43D75; Mon, 27 Nov 2006 12:49:23 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 7A0C3B833; Mon, 27 Nov 2006 14:50:22 +0200 (EET) Received: (nullmailer pid 5731 invoked by uid 1002); Mon, 27 Nov 2006 12:50:22 -0000 Date: Mon, 27 Nov 2006 14:50:22 +0200 From: Vasil Dimov To: Earl Lapus Message-ID: <20061127125022.GA5690@qlovarnika.bg.datamax> References: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> Cc: freebsd-hackers@freebsd.org, henning@openbsd.org, mlaier@freebsd.org Subject: Re: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 12:52:54 -0000 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2006 at 06:03:25PM +0800, Earl Lapus wrote: > hi, >=20 > I was browsing through some code and stumbled upon this: >=20 > ... > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0)) { > warnx("m1 must be zero for convex curve: %s", pa->qname); > return (-1); > } > ... >=20 >=20 > would it be safe to change it to: > ... > if (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) { > warnx("m1 must be zero for convex curve: %s", pa->qname); > return (-1); > } > ... >=20 > -OR- is there something between those lines that I'm missing. >=20 > The piece of code that I'm referring to is found in > /usr/src/contrtib/pf/pfctl/pfctl_altq.c /usr/src/contrib/pf/pfctl/pfctl_altq.c $OpenBSD: pfctl_altq.c,v 1.86 2005/02/28 14:04:51 henning Exp $ $FreeBSD: src/contrib/pf/pfctl/pfctl_altq.c,v 1.7 2005/05/03 16:55:20 mlaie= r Exp $ 704 if ((opts->rtsc_m1 > 0 && opts->rtsc_m2 =3D=3D 0) || 705 (opts->lssc_m1 > 0 && opts->lssc_m2 =3D=3D 0) || 706 (opts->ulsc_m1 > 0 && opts->ulsc_m2 =3D=3D 0)) { 707 warnx("m2 is zero for %s", pa->qname); 708 return (-1); 709 } 710 711 if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || 712 (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || 713 (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0)) { 714 warnx("m1 must be zero for convex curve: %s", pa->qname= ); 715 return (-1); 716 } Seems like a bug to me. Maybe rtsc should be changed to lssc and ulsc respectively on 712 and 713 line. --=20 Vasil Dimov gro.DSBeerF@dv % I used to think that the brain was the most wonderful organ in my body. Then I realized who was telling me this. -- Emo Phillips --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFFat8OFw6SP/bBpCARAlOtAKC/yYklb5tvgY58YHKXvNONy8KvVQCgjviS VETDB27RCb4KRZu5ki0FWzs= =QMRc -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 14:27:53 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9743D16A47B for ; Mon, 27 Nov 2006 14:27:53 +0000 (UTC) (envelope-from henning@openbsd.org) Received: from smtp.bsws.de (smtp.bsws.de [80.86.183.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98DA943E07 for ; Mon, 27 Nov 2006 14:22:22 +0000 (GMT) (envelope-from henning@openbsd.org) Received: (qmail 2851 invoked from network); 27 Nov 2006 14:23:13 -0000 Received: from nudo.bsws.de ([80.86.183.71]) (envelope-sender ) by smtp.bsws.de (qmail-ldap-1.03) with SMTP for ; 27 Nov 2006 14:23:13 -0000 Received: (qmail 27915 invoked by uid 1000); 27 Nov 2006 14:23:12 -0000 Message-ID: <20061127142312.17227.qmail@nudo.bsws.de> Date: Mon, 27 Nov 2006 15:23:12 +0100 From: Henning Brauer To: Vasil Dimov References: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> <20061127125022.GA5690@qlovarnika.bg.datamax> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline In-Reply-To: <20061127125022.GA5690@qlovarnika.bg.datamax> X-PGP-Key: 3A83DF32 User-Agent: Mutt/1.5.12-2006-07-14 X-Mailman-Approved-At: Mon, 27 Nov 2006 14:32:28 +0000 Cc: mlaier@FreeBSD.org, freebsd-hackers@FreeBSD.org, Earl Lapus , henning@openbsd.org, Ryan Thomas McBride Subject: Re: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 14:27:53 -0000 --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Vasil Dimov [2006-11-27 15:13]: > > I was browsing through some code and stumbled upon this: > > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0)) { > > warnx("m1 must be zero for convex curve: %s", pa->qname); > > return (-1); > > } > Seems like a bug to me. Maybe rtsc should be changed to lssc and ulsc > respectively on 712 and 713 line. indeed. 1.24 (henning 17-Dec-02): if ((opts->rtsc_m1 > 0 && opts->rts= c_m2 =3D=3D 0) || 1.24 (henning 17-Dec-02): (opts->lssc_m1 > 0 && opts->lss= c_m2 =3D=3D 0) || 1.24 (henning 17-Dec-02): (opts->ulsc_m1 > 0 && opts->uls= c_m2 =3D=3D 0)) { almost 4 years, and nobody noticed ;( Index: pfctl_altq.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/sbin/pfctl/pfctl_altq.c,v retrieving revision 1.90 diff -u -p -r1.90 pfctl_altq.c --- pfctl_altq.c 10 Nov 2006 06:07:11 -0000 1.90 +++ pfctl_altq.c 27 Nov 2006 14:19:45 -0000 @@ -680,8 +680,8 @@ eval_pfqueue_hfsc(struct pfctl *pf, stru } =20 if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0) || - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 !=3D 0)) { + (opts->lssc_m1 < opts->lssc_m2 && opts->lssc_m1 !=3D 0) || + (opts->ulsc_m1 < opts->ulsc_m2 && opts->ulsc_m1 !=3D 0)) { warnx("m1 must be zero for convex curve: %s", pa->qname); return (-1); } --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (OpenBSD) iD8DBQFFavTPqmHuiTqD3zIRAl5xAJoDbqczqJoxdXGcbfW9HcOs/BBsKwCcDYjb VLkyAHmrBL1Jc7Sip02t9A4= =N1+T -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 15:30:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F5FF16A4C2 for ; Mon, 27 Nov 2006 15:30:12 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id F20F64407E for ; Mon, 27 Nov 2006 15:19:09 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 7066A6270; Mon, 27 Nov 2006 18:20:04 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 687AD6264; Mon, 27 Nov 2006 18:20:04 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kARFK3Jp020370; Mon, 27 Nov 2006 18:20:03 +0300 (MSK) (envelope-from ru) Date: Mon, 27 Nov 2006 18:20:03 +0300 From: Ruslan Ermilov To: Nikolay Pavlov , freebsd-hackers@freebsd.org Message-ID: <20061127152003.GA20294@rambler-co.ru> References: <20061127120740.GA12728@zone3000.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <20061127120740.GA12728@zone3000.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 15:30:12 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote: > Hi. I am trying to extend fstat utility, so that it can use name cache > to recreate full path at least for text. I have found vn_fullpath > function usefull in this case. I am newbe in C, so it could be stupid > question, but could someone explaine what is "struct thread *td" in > argument list of this function. Is this the thread which opened the > vnode initially or it is the thread which searches for the vnode? i.e. > fstat thread. In any case how i can get this *td structure? >=20 There's a vn_fullpath(9) manpage which should answer this. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFawIjqRfpzJluFF4RAnzTAJ9X2RUcy0Gashjsi9g8n2Ak/lmVTQCgisPC d98KACoNAy5BedyAxTGH3no= =aZRS -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 15:40:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F16616A412 for ; Mon, 27 Nov 2006 15:40:36 +0000 (UTC) (envelope-from quetzal@zone3000.net) Received: from mx1.sitevalley.com (sitevalley.com [209.67.60.43]) by mx1.FreeBSD.org (Postfix) with SMTP id 5D0C143E1A for ; Mon, 27 Nov 2006 15:36:47 +0000 (GMT) (envelope-from quetzal@zone3000.net) Received: from unknown (HELO localhost) (217.144.69.37) by 209.67.61.254 with SMTP; 27 Nov 2006 15:37:39 -0000 Date: Mon, 27 Nov 2006 17:37:12 +0200 From: Nikolay Pavlov To: Ruslan Ermilov Message-ID: <20061127153712.GA14947@zone3000.net> Mail-Followup-To: Nikolay Pavlov , Ruslan Ermilov , freebsd-hackers@freebsd.org References: <20061127120740.GA12728@zone3000.net> <20061127152003.GA20294@rambler-co.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061127152003.GA20294@rambler-co.ru> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.1-RELEASE-p10 Cc: freebsd-hackers@freebsd.org Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 15:40:36 -0000 On Monday, 27 November 2006 at 18:20:03 +0300, Ruslan Ermilov wrote: > On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote: > > Hi. I am trying to extend fstat utility, so that it can use name cache > > to recreate full path at least for text. I have found vn_fullpath > > function usefull in this case. I am newbe in C, so it could be stupid > > question, but could someone explaine what is "struct thread *td" in > > argument list of this function. Is this the thread which opened the > > vnode initially or it is the thread which searches for the vnode? i.e. > > fstat thread. In any case how i can get this *td structure? > > > There's a vn_fullpath(9) manpage which should answer this. Yes i know about this man, but still not sure how to get *td structure. > > > Cheers, > -- > Ruslan Ermilov > ru@FreeBSD.org > FreeBSD committer -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ====================================================================== From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 16:07:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8D4116A403 for ; Mon, 27 Nov 2006 16:07:02 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id D272C44030 for ; Mon, 27 Nov 2006 15:55:09 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 324656058; Mon, 27 Nov 2006 18:56:06 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 10F17618C; Mon, 27 Nov 2006 18:56:06 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kARFu6OG020800; Mon, 27 Nov 2006 18:56:06 +0300 (MSK) (envelope-from ru) Date: Mon, 27 Nov 2006 18:56:06 +0300 From: Ruslan Ermilov To: Nikolay Pavlov , freebsd-hackers@freebsd.org Message-ID: <20061127155606.GC20294@rambler-co.ru> References: <20061127120740.GA12728@zone3000.net> <20061127152003.GA20294@rambler-co.ru> <20061127153712.GA14947@zone3000.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t0UkRYy7tHLRMCai" Content-Disposition: inline In-Reply-To: <20061127153712.GA14947@zone3000.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 16:07:02 -0000 --t0UkRYy7tHLRMCai Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2006 at 05:37:12PM +0200, Nikolay Pavlov wrote: > On Monday, 27 November 2006 at 18:20:03 +0300, Ruslan Ermilov wrote: > > On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote: > > > Hi. I am trying to extend fstat utility, so that it can use name cache > > > to recreate full path at least for text. I have found vn_fullpath > > > function usefull in this case. I am newbe in C, so it could be stupid > > > question, but could someone explaine what is "struct thread *td" in > > > argument list of this function. Is this the thread which opened the > > > vnode initially or it is the thread which searches for the vnode? i.e. > > > fstat thread. In any case how i can get this *td structure? > > >=20 > > There's a vn_fullpath(9) manpage which should answer this. >=20 > Yes i know about this man, but still not sure how to get *td structure. >=20 Depends on context. "curthread" perhaps. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --t0UkRYy7tHLRMCai Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFawqWqRfpzJluFF4RAhu1AKCLp2SLxjJUtOYK94PMZNdNnA5UpgCfc1gq Wxo4pSJTaojoQloFDdI8NEM= =p5/u -----END PGP SIGNATURE----- --t0UkRYy7tHLRMCai-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 16:19:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3734816A7D6 for ; Mon, 27 Nov 2006 16:19:27 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CC7E44266 for ; Mon, 27 Nov 2006 16:12:45 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Goj6d-0002PX-FF for freebsd-hackers@freebsd.org; Mon, 27 Nov 2006 17:13:19 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Nov 2006 17:13:19 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Nov 2006 17:13:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 27 Nov 2006 17:12:44 +0100 Lines: 5 Message-ID: References: <20061127120740.GA12728@zone3000.net> <20061127152003.GA20294@rambler-co.ru> <20061127153712.GA14947@zone3000.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.4 (X11/20060625) In-Reply-To: <20061127153712.GA14947@zone3000.net> Sender: news Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 16:19:27 -0000 Nikolay Pavlov wrote: > Yes i know about this man, but still not sure how to get *td structure. In kernel? There's a global variable curthread AFAIK. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 20:35:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61CD616A542 for ; Mon, 27 Nov 2006 20:35:29 +0000 (UTC) (envelope-from quetzal@zone3000.net) Received: from mx1.sitevalley.com (sitevalley.com [209.67.60.43]) by mx1.FreeBSD.org (Postfix) with SMTP id 84EFB45315 for ; Mon, 27 Nov 2006 20:01:55 +0000 (GMT) (envelope-from quetzal@zone3000.net) Received: from unknown (HELO localhost) (217.144.69.37) by 209.67.61.254 with SMTP; 27 Nov 2006 20:02:42 -0000 Date: Mon, 27 Nov 2006 22:02:15 +0200 From: Nikolay Pavlov To: Ivan Voras Message-ID: <20061127200215.GA17107@zone3000.net> Mail-Followup-To: Nikolay Pavlov , Ivan Voras , freebsd-hackers@freebsd.org References: <20061127120740.GA12728@zone3000.net> <20061127152003.GA20294@rambler-co.ru> <20061127153712.GA14947@zone3000.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.1-RELEASE-p10 Cc: freebsd-hackers@freebsd.org Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 20:35:29 -0000 On Monday, 27 November 2006 at 17:12:44 +0100, Ivan Voras wrote: > Nikolay Pavlov wrote: > > > Yes i know about this man, but still not sure how to get *td structure. > > In kernel? There's a global variable curthread AFAIK. I am not sure. If i understand the fstat code right, it uses kvm interface to extract kinfo_proc structures from kernel space. textvp vnode pointer could be found in this structureis, but to perform vn_fullpath lookup according to man 9 vn_fullpath i need also thread pointer. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ====================================================================== From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 05:37:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F161B16A6CD for ; Tue, 28 Nov 2006 05:37:21 +0000 (UTC) (envelope-from earl.lapus@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5484144FA3 for ; Tue, 28 Nov 2006 04:41:02 +0000 (GMT) (envelope-from earl.lapus@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1260595uge for ; Mon, 27 Nov 2006 20:40:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jnbWcZOw3oPBwTeZwEhaybHc8P5sUNX0g6kIc3s68eFYfNuQBCvakCxq1950Wqygkf/an2jniH18af/fcPjO9UbBTqkoxMREeWDPF4EHUumD4pS86vbTeaC4mN4JiHdW0z21XsNhbCU2AZ2Di31rQx/UrhlykaoFtyYPgYzSGXc= Received: by 10.78.21.7 with SMTP id 7mr301101huu.1164678052321; Mon, 27 Nov 2006 17:40:52 -0800 (PST) Received: by 10.78.133.9 with HTTP; Mon, 27 Nov 2006 17:40:52 -0800 (PST) Message-ID: <604f76120611271740g61c1a3a4pe8e9d37ab1df3f28@mail.gmail.com> Date: Tue, 28 Nov 2006 09:40:52 +0800 From: "Earl Lapus" To: "Henning Brauer" In-Reply-To: <20061127142312.17227.qmail@nudo.bsws.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> <20061127125022.GA5690@qlovarnika.bg.datamax> <20061127142312.17227.qmail@nudo.bsws.de> Cc: Ryan Thomas McBride , Vasil Dimov , mlaier@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 05:37:22 -0000 hi all, another quick question... I read that realtime must always be convex. That explains the checking. However, linkshare and upperlimit can be either concave or convex. If linkshare(lssc_xx) can be concave then we should allow lssc_m1 to be less than lssc_m2 even if lssc_m1 is greater than zero. And this also applies to upperlimit (ulsc_xx). Is this correct? On 11/27/06, Henning Brauer wrote: > * Vasil Dimov [2006-11-27 15:13]: > > > I was browsing through some code and stumbled upon this: > > > > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0)) { > > > warnx("m1 must be zero for convex curve: %s", pa->qname); > > > return (-1); > > > } > > > Seems like a bug to me. Maybe rtsc should be changed to lssc and ulsc > > respectively on 712 and 713 line. > > indeed. > 1.24 (henning 17-Dec-02): if ((opts->rtsc_m1 > 0 && opts->rtsc_m2 == 0) || > 1.24 (henning 17-Dec-02): (opts->lssc_m1 > 0 && opts->lssc_m2 == 0) || > 1.24 (henning 17-Dec-02): (opts->ulsc_m1 > 0 && opts->ulsc_m2 == 0)) { > > almost 4 years, and nobody noticed ;( > > Index: pfctl_altq.c > =================================================================== > RCS file: /cvs/src/sbin/pfctl/pfctl_altq.c,v > retrieving revision 1.90 > diff -u -p -r1.90 pfctl_altq.c > --- pfctl_altq.c 10 Nov 2006 06:07:11 -0000 1.90 > +++ pfctl_altq.c 27 Nov 2006 14:19:45 -0000 > @@ -680,8 +680,8 @@ eval_pfqueue_hfsc(struct pfctl *pf, stru > } > > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0)) { > + (opts->lssc_m1 < opts->lssc_m2 && opts->lssc_m1 != 0) || > + (opts->ulsc_m1 < opts->ulsc_m2 && opts->ulsc_m1 != 0)) { > warnx("m1 must be zero for convex curve: %s", pa->qname); > return (-1); > } > > > > -- There are seven words in this sentence. From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 12:29:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A03516A407 for ; Tue, 28 Nov 2006 12:29:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 792F743E26 for ; Tue, 28 Nov 2006 12:27:42 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id E882D46D78; Tue, 28 Nov 2006 07:27:26 -0500 (EST) Date: Tue, 28 Nov 2006 12:27:26 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Nikolay Pavlov In-Reply-To: <20061127120740.GA12728@zone3000.net> Message-ID: <20061128122407.B27930@fledge.watson.org> References: <20061127120740.GA12728@zone3000.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 12:29:45 -0000 On Mon, 27 Nov 2006, Nikolay Pavlov wrote: > Hi. I am trying to extend fstat utility, so that it can use name cache to > recreate full path at least for text. I have found vn_fullpath function > usefull in this case. I am newbe in C, so it could be stupid question, but > could someone explaine what is "struct thread *td" in argument list of this > function. Is this the thread which opened the vnode initially or it is the > thread which searches for the vnode? i.e. fstat thread. In any case how i > can get this *td structure? vn_fullpath(9) is a kernel API, not a user API, so can only be invoked from kernel space. There are unimplemented, undocumented prototypes in the system call table for __getpath_fromfd() and __getpath_fromaddr(), which are presumably intended (with adequate permissions) to allow converting file descriptor indexes into paths, etc. I think Peter dropped them in, but I'm not sure if he's posted patches. It's worth also remembering that paths are slightly confusing things, that really only exist at time-of-lookup. The path to an object may vary by process (due to chroot, etc), for example, or objects may no longer have paths (be unlinked). It's also the case that two objects might have the same "path" due to synthetic objects like /proc/curproc, overlayed mountpoints, etc. vn_fullpath(9) makes a "best effort" based on the contents of the name cache, but can fail to produce meaningful or any results. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 10:32:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4760916A492 for ; Tue, 28 Nov 2006 10:32:49 +0000 (UTC) (envelope-from henning@openbsd.org) Received: from smtp.bsws.de (smtp.bsws.de [80.86.183.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id A953943CC2 for ; Tue, 28 Nov 2006 10:32:25 +0000 (GMT) (envelope-from henning@openbsd.org) Received: (qmail 13495 invoked from network); 28 Nov 2006 10:32:09 -0000 Received: from nudo.bsws.de ([80.86.183.71]) (envelope-sender ) by smtp.bsws.de (qmail-ldap-1.03) with SMTP for ; 28 Nov 2006 10:32:09 -0000 Received: (qmail 10971 invoked by uid 1000); 28 Nov 2006 10:32:08 -0000 Message-ID: <20061128103208.27333.qmail@nudo.bsws.de> Date: Tue, 28 Nov 2006 11:32:07 +0100 From: Henning Brauer To: Earl Lapus References: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> <20061127125022.GA5690@qlovarnika.bg.datamax> <20061127142312.17227.qmail@nudo.bsws.de> <604f76120611271740g61c1a3a4pe8e9d37ab1df3f28@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <604f76120611271740g61c1a3a4pe8e9d37ab1df3f28@mail.gmail.com> X-PGP-Key: 3A83DF32 User-Agent: Mutt/1.5.12-2006-07-14 X-Mailman-Approved-At: Tue, 28 Nov 2006 12:41:59 +0000 Cc: Ryan Thomas McBride , Vasil Dimov , Henning Brauer , mlaier@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 10:32:49 -0000 * Earl Lapus [2006-11-28 02:41]: > I read that realtime must always be convex. That explains the checking. > However, linkshare and upperlimit can be either concave or convex. correct > If linkshare(lssc_xx) can be concave then we should allow lssc_m1 to be > less than lssc_m2 even if lssc_m1 is greater than zero. And this also > applies > to upperlimit (ulsc_xx). Is this correct? for a concave (m1 < m2), hfsc allows only m1 == 0 for simplicity. (had to check that with kenjiro :) From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 13:50:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AE6F16A4C2 for ; Tue, 28 Nov 2006 13:50:37 +0000 (UTC) (envelope-from Frank-Deignan@cfl.rr.com) Received: from ms-smtp-06.tampabay.rr.com (ms-smtp-06.tampabay.rr.com [65.32.5.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 926DB43CAE for ; Tue, 28 Nov 2006 13:48:09 +0000 (GMT) (envelope-from Frank-Deignan@cfl.rr.com) Received: from Deignan (194.200.205.68.cfl.res.rr.com [68.205.200.194]) by ms-smtp-06.tampabay.rr.com (8.13.6/8.13.6) with ESMTP id kASDm6se018445 for ; Tue, 28 Nov 2006 08:48:07 -0500 (EST) From: "Frank Deignan" To: Date: Tue, 28 Nov 2006 08:48:12 -0500 Message-ID: <002201c712f3$d8d921d0$6401a8c0@Deignan> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Importance: Normal X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Mailman-Approved-At: Tue, 28 Nov 2006 14:07:48 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Van Jacobson's network stack restructure X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 13:50:37 -0000 http://lists.freebsd.org/pipermail/freebsd-hackers/2006-February/015365.html Who's calling? :-) Frank From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 15:47:27 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C7F016A407; Tue, 28 Nov 2006 15:47:27 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAFB043C9F; Tue, 28 Nov 2006 15:46:25 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (cxinax@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kASFkKMF009716; Tue, 28 Nov 2006 16:46:26 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kASFkKFj009715; Tue, 28 Nov 2006 16:46:20 +0100 (CET) (envelope-from olli) Date: Tue, 28 Nov 2006 16:46:20 +0100 (CET) Message-Id: <200611281546.kASFkKFj009715@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, quetzal@zone3000.net, rwatson@FreeBSD.ORG In-Reply-To: <20061128122407.B27930@fledge.watson.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 28 Nov 2006 16:46:26 +0100 (CET) Cc: Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, quetzal@zone3000.net, rwatson@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 15:47:27 -0000 Robert Watson wrote: > Nikolay Pavlov wrote: > > > Hi. I am trying to extend fstat utility, so that it can use name cache to > > recreate full path at least for text. I have found vn_fullpath function > > usefull in this case. I am newbe in C, so it could be stupid question, but > > could someone explaine what is "struct thread *td" in argument list of this > > function. Is this the thread which opened the vnode initially or it is the > > thread which searches for the vnode? i.e. fstat thread. In any case how i > > can get this *td structure? > > vn_fullpath(9) is a kernel API, not a user API, so can only be invoked from > kernel space. There are unimplemented, undocumented prototypes in the system > call table for __getpath_fromfd() and __getpath_fromaddr(), which are > presumably intended (with adequate permissions) to allow converting file > descriptor indexes into paths, etc. I think Peter dropped them in, but I'm > not sure if he's posted patches. Nikolay, you might want to have a look at the source code of the "lsof" utility (ports/sysutils/lsof). It is able to display path names for file descriptors. Maybe you can borrow an idea from it. It might also be worth mentioning that our friends from the DragonFly BSD project (derived from FreeBSD 4) have added the ability to display path names to their version of the fstat utility. You can look at their cvsweb here: http://www.dragonflybsd.org/cvsweb/src/usr.bin/fstat/ However, I suspect that they have also made modifications to the kernel interfaces in order to support the fstat utility, so their improvements to that utility might not be applicable to FreeBSD. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "That's what I love about GUIs: They make simple tasks easier, and complex tasks impossible." -- John William Chambless From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 17:55:39 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE0EA16A403 for ; Tue, 28 Nov 2006 17:55:39 +0000 (UTC) (envelope-from quetzal@zone3000.net) Received: from mx1.sitevalley.com (sitevalley.com [209.67.60.43]) by mx1.FreeBSD.org (Postfix) with SMTP id 658D943C9D for ; Tue, 28 Nov 2006 17:55:35 +0000 (GMT) (envelope-from quetzal@zone3000.net) Received: from unknown (HELO localhost) (217.144.69.37) by 209.67.61.254 with SMTP; 28 Nov 2006 17:55:37 -0000 Date: Tue, 28 Nov 2006 19:55:09 +0200 From: Nikolay Pavlov To: freebsd-hackers@FreeBSD.ORG, rwatson@FreeBSD.ORG Message-ID: <20061128175509.GA24329@zone3000.net> Mail-Followup-To: Nikolay Pavlov , freebsd-hackers@FreeBSD.ORG, rwatson@FreeBSD.ORG References: <20061128122407.B27930@fledge.watson.org> <200611281546.kASFkKFj009715@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200611281546.kASFkKFj009715@lurza.secnetix.de> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.1-RELEASE-p10 Cc: Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 17:55:40 -0000 On Tuesday, 28 November 2006 at 16:46:20 +0100, Oliver Fromme wrote: > Robert Watson wrote: > > Nikolay Pavlov wrote: > > > > > Hi. I am trying to extend fstat utility, so that it can use name cache to > > > recreate full path at least for text. I have found vn_fullpath function > > > usefull in this case. I am newbe in C, so it could be stupid question, but > > > could someone explaine what is "struct thread *td" in argument list of this > > > function. Is this the thread which opened the vnode initially or it is the > > > thread which searches for the vnode? i.e. fstat thread. In any case how i > > > can get this *td structure? > > > > vn_fullpath(9) is a kernel API, not a user API, so can only be invoked from > > kernel space. There are unimplemented, undocumented prototypes in the system > > call table for __getpath_fromfd() and __getpath_fromaddr(), which are > > presumably intended (with adequate permissions) to allow converting file > > descriptor indexes into paths, etc. I think Peter dropped them in, but I'm > > not sure if he's posted patches. > > Nikolay, you might want to have a look at the source code > of the "lsof" utility (ports/sysutils/lsof). It is able > to display path names for file descriptors. Maybe you can > borrow an idea from it. That's iteresting. The lsof utility is able to display original file path for me even for text vnodes. > > It might also be worth mentioning that our friends from the > DragonFly BSD project (derived from FreeBSD 4) have added > the ability to display path names to their version of the > fstat utility. You can look at their cvsweb here: > http://www.dragonflybsd.org/cvsweb/src/usr.bin/fstat/ > > However, I suspect that they have also made modifications > to the kernel interfaces in order to support the fstat > utility, so their improvements to that utility might not > be applicable to FreeBSD. Yes. They namecache API was totaly rewritten. > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing > Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd > Any opinions expressed in this message may be personal to the author > and may not necessarily reflect the opinions of secnetix in any way. > > "That's what I love about GUIs: They make simple tasks easier, > and complex tasks impossible." > -- John William Chambless -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ====================================================================== From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 18:44:51 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A4B116A416 for ; Tue, 28 Nov 2006 18:44:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outL.internet-mail-service.net [216.240.47.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0598B43CA5 for ; Tue, 28 Nov 2006 18:44:46 +0000 (GMT) (envelope-from julian@elischer.org) Received: from shell.idiom.com (HELO idiom.com) (216.240.47.20) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 28 Nov 2006 10:31:49 -0800 Received: from [10.251.18.229] (nat.ironport.com [63.251.108.100]) by idiom.com (8.12.11/8.12.11) with ESMTP id kASIi4H6080261; Tue, 28 Nov 2006 10:44:05 -0800 (PST) (envelope-from julian@elischer.org) Message-ID: <456C8373.9010904@elischer.org> Date: Tue, 28 Nov 2006 10:44:03 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Frank Deignan References: <002201c712f3$d8d921d0$6401a8c0@Deignan> In-Reply-To: <002201c712f3$d8d921d0$6401a8c0@Deignan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mckusick@mckusick.com, freebsd-hackers@freebsd.org Subject: Re: Van Jacobson's network stack restructure X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 18:44:51 -0000 Frank Deignan wrote: > http://lists.freebsd.org/pipermail/freebsd-hackers/2006-February/015365.html > > Who's calling? :-) using the "everyone knows someone who is closer to the answer than they are" theory, I suggest we forward it to Kirk to forward to Van or Mike.. :-) (CC'd to Kirk (I think I remember the address)) > > Frank > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 18:47:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 182EA16A4B3; Tue, 28 Nov 2006 18:47:41 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9457A43CB9; Tue, 28 Nov 2006 18:47:34 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id C17BD192913; Tue, 28 Nov 2006 19:47:35 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id 6331E19290C; Tue, 28 Nov 2006 19:47:35 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id D6BA828505; Tue, 28 Nov 2006 19:47:32 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 6F3DB28503; Tue, 28 Nov 2006 19:47:32 +0100 (CET) Date: Tue, 28 Nov 2006 20:47:32 +0200 From: Vladimir Terziev To: freebsd-net@FreeBSD.ORG Message-Id: <20061128204732.3e8790fd.vlady@gbservices.biz> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org Subject: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 18:47:41 -0000 Hi, i have a machine with Pentium 4-D processor utilizing FreeBSD-6.1-RELEASE-p10/amd64. The machine is running SMP kernel. The machine has 2 on-board Broadcom BCM5721 NICs, which are handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are handeled by the ste(4) driver. Machine is targeted for a gateway/firewall and will handle a big amount of network traffic. It seems the bge(4) driver has severe performance problems (may be especially in my configuration). I tried test scp(1) to a remote machine, using one of the BCM5721 NICs. The average speed which has been reached was 200kBps. Just for comparison, when i tryed the same test scp(1), to the same remote machine, but using one of the D-Link DL10050 NICs, the average speed which has been reached was 10MBps. Could someone point me to a good performance tuning document for bge(4) handeled NICs, under SMP kernel or at all? Thanks in advance! Vladimir From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 19:53:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8667C16A417; Tue, 28 Nov 2006 19:53:13 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F04943CF4; Tue, 28 Nov 2006 19:47:04 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kASJktWm036475; Tue, 28 Nov 2006 11:46:56 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kASJkpqF036474; Tue, 28 Nov 2006 11:46:51 -0800 (PST) Date: Tue, 28 Nov 2006 11:46:51 -0800 (PST) From: Matthew Dillon Message-Id: <200611281946.kASJkpqF036474@apollo.backplane.com> To: freebsd-hackers@freebsd.org, quetzal@zone3000.net, rwatson@freebsd.org References: <200611281546.kASFkKFj009715@lurza.secnetix.de> Cc: Subject: Re: vn_fullpath question. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 19:53:13 -0000 :Nikolay, you might want to have a look at the source code :of the "lsof" utility (ports/sysutils/lsof). It is able :to display path names for file descriptors. Maybe you can :borrow an idea from it. : :It might also be worth mentioning that our friends from the :DragonFly BSD project (derived from FreeBSD 4) have added :the ability to display path names to their version of the :fstat utility. You can look at their cvsweb here: :http://www.dragonflybsd.org/cvsweb/src/usr.bin/fstat/ : :However, I suspect that they have also made modifications :to the kernel interfaces in order to support the fstat :utility, so their improvements to that utility might not :be applicable to FreeBSD. : :Best regards : Oliver I'm afraid we did. All file pointers now also store a fully referenced namecache pointer along with the vnode pointer. In fact, it is now a triplet: Vnode, mount pointer, namecache pointer. In DragonFly the mount pointer is now mandatory for all access through a file descriptor. The namecache pointer is mandatory for all directory descriptors (all directory traversals are namecache-centric in DragonFly, not vnode-centric, so the ncp is needed in case a program does a fchdir() call). Also, in DragonFly, the namecache is synchronized with file operations such as rename and delete, rather then globally invalidated. The ncp is actually moved and renamed on rename. This had the happy side effect of making it possible for the fstat utility to list the actual file path used to open the file or directory. I don't think any of it can be applied to FreeBSD, unless you want to spend two man-months (or more) redoing your namecache. It was a horrendous amount of work. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 21:15:26 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAAF516A417 for ; Tue, 28 Nov 2006 21:15:26 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 309E143CBC for ; Tue, 28 Nov 2006 21:13:37 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASLDf7o001613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 13:13:41 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASLDf2P026582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 13:13:41 -0800 Message-ID: <456CA68E.7090207@u.washington.edu> Date: Tue, 28 Nov 2006 13:13:50 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.130433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: Single UDP sockets : duplex capable? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 21:15:27 -0000 Hello, Just wondering, abstractly.. ------------------------- | A -[socket (UDP)]-> B | ------------------------- A creates a UDP socket (call it 's1') to talk to B. Can B use the same socket ('s2') to talk to A using read(2) or recv(2), or does A have to accept(2) traffic from B using a different socket? The programming language I'm using is C (not C++). Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 21:25:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 818A816A504 for ; Tue, 28 Nov 2006 21:25:19 +0000 (UTC) (envelope-from devon.odell@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id F16AD43D2F for ; Tue, 28 Nov 2006 21:24:27 +0000 (GMT) (envelope-from devon.odell@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1466660uge for ; Tue, 28 Nov 2006 13:24:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VN3ug+76ITnEX52lEaxcoIgIJCCO3vnyn7gFjvJQw+K22ashiQuDDwmvB0FwxApJrN0pUAhzIesuS201KF5SC8pvbXyTMiX3nY+v7MIVxZk3qWnmbMWRbRlMZMqpIWqVYjjzcKvLmXYHKJx5sgw9pKrhQy+3/jGuk5ZPWcmRRpQ= Received: by 10.66.219.11 with SMTP id r11mr2318076ugg.1164749049057; Tue, 28 Nov 2006 13:24:09 -0800 (PST) Received: by 10.67.86.10 with HTTP; Tue, 28 Nov 2006 13:24:08 -0800 (PST) Message-ID: <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> Date: Tue, 28 Nov 2006 16:24:08 -0500 From: "Devon H. O'Dell" To: "Garrett Cooper" In-Reply-To: <456CA68E.7090207@u.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <456CA68E.7090207@u.washington.edu> Cc: freebsd-hackers@freebsd.org Subject: Re: Single UDP sockets : duplex capable? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 21:25:19 -0000 2006/11/28, Garrett Cooper : > Hello, > > Just wondering, abstractly.. Both sides can read from and write to the socket file descriptor. You'll need to develop a protocol to determine when either given side is expecting to receive or to send data (if both sides sit around in read(2), you're not going to get much done) :) --dho > ------------------------- > | A -[socket (UDP)]-> B | > ------------------------- > > A creates a UDP socket (call it 's1') to talk to B. > > Can B use the same socket ('s2') to talk to A using read(2) or > recv(2), or does A have to accept(2) traffic from B using a different > socket? > > The programming language I'm using is C (not C++). > > Thanks, > -Garrett > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 21:33:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAF3216A417 for ; Tue, 28 Nov 2006 21:33:37 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAC5D43CA4 for ; Tue, 28 Nov 2006 21:33:20 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASLWt68030312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 13:32:55 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASLWsls029770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 13:32:55 -0800 Message-ID: <456CAB12.9070507@u.washington.edu> Date: Tue, 28 Nov 2006 13:33:06 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.131932 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_NAME_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: pthreads : questions about concurrency and lifetime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 21:33:37 -0000 Hello once again, Just wondering about pthreads now. I know that the lifetime (scope) of a regular procedural function in C is simple.. it's from the top of the function body to the bottom of the function body (assuming no infinite loops are injected). Example: (void*) function(void*) {/* lifetime of function is here. */ } However looking over pthread(3), there are a number of different functions for killing threads and exiting child threads, in order terminate child threads (and maybe to get back to the main thread of execution in a program). So my question is, once the end of a function body is reached that was made using pthread_create(), does the thread exit and 'destroy' itself or do I need to do 'manual' cleanup, i.e. run pthread_detach(3), pthread_exit(3), or pthread_kill(3)? Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 22:02:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78C8416A40F for ; Tue, 28 Nov 2006 22:02:13 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp2.utsp.utwente.nl [130.89.2.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E47F43CAA for ; Tue, 28 Nov 2006 22:02:07 +0000 (GMT) (envelope-from pieter@degoeje.nl) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id kASM28ox003282 for ; Tue, 28 Nov 2006 23:02:09 +0100 From: Pieter de Goeje To: freebsd-hackers@freebsd.org Date: Tue, 28 Nov 2006 23:02:08 +0100 User-Agent: KMail/1.9.4 References: <456CAB12.9070507@u.washington.edu> In-Reply-To: <456CAB12.9070507@u.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611282302.08439.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Subject: Re: pthreads : questions about concurrency and lifetime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 22:02:13 -0000 On Tuesday 28 November 2006 22:33, Garrett Cooper wrote: > Hello once again, > Just wondering about pthreads now. I know that the lifetime (scope) > of a regular procedural function in C is simple.. it's from the top of > the function body to the bottom of the function body (assuming no > infinite loops are injected). Example: > > (void*) function(void*) {/* lifetime of function is here. */ } > > However looking over pthread(3), there are a number of different > functions for killing threads and exiting child threads, in order > terminate child threads (and maybe to get back to the main thread of > execution in a program). > > So my question is, once the end of a function body is reached that was > made using pthread_create(), does the thread exit and 'destroy' itself > or do I need to do 'manual' cleanup, i.e. run pthread_detach(3), > pthread_exit(3), or pthread_kill(3)? There are three ways to cleanup a thread: 1) pthread_detach(3) 2) pthread_join(3) 3) creating a thread with PTHREAD_CREATE_DETACHED attribute set, see pthread_attr_setdetachstate(3) Calling pthread_detach(3) directly after you created the thread is an easy way to create an "uncontrolled" thread. Effectively the same as #3. The thread will cleanup automatically after the thread function returns. -- Pieter de Goeje From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 22:38:44 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B283916A412 for ; Tue, 28 Nov 2006 22:38:44 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08C6443CB6 for ; Tue, 28 Nov 2006 22:38:31 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMcala012254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 14:38:36 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMcZBE008933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 14:38:35 -0800 Message-ID: <456CBA81.5040302@u.washington.edu> Date: Tue, 28 Nov 2006 14:38:57 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG References: <456CA68E.7090207@u.washington.edu> <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> In-Reply-To: <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.142432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: Re: Single UDP sockets : duplex capable? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 22:38:44 -0000 Devon H. O'Dell wrote: > 2006/11/28, Garrett Cooper : >> Hello, >> >> Just wondering, abstractly.. > > Both sides can read from and write to the socket file descriptor. > You'll need to develop a protocol to determine when either given side > is expecting to receive or to send data (if both sides sit around in > read(2), you're not going to get much done) :) > > --dho > >> ------------------------- >> | A -[socket (UDP)]-> B | >> ------------------------- >> >> A creates a UDP socket (call it 's1') to talk to B. >> >> Can B use the same socket ('s2') to talk to A using read(2) or >> recv(2), or does A have to accept(2) traffic from B using a different >> socket? >> >> The programming language I'm using is C (not C++). >> >> Thanks, >> -Garrett Ok. While my intuition of networking hinted that, I didn't want to make an assumption and bite myself in the ass, so as to speak. Thank you very much again for the clarification! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 22:41:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB5DD16A407 for ; Tue, 28 Nov 2006 22:41:20 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85D1343CB7 for ; Tue, 28 Nov 2006 22:40:46 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMepFY002570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 14:40:51 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMepMh009367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 14:40:51 -0800 Message-ID: <456CBB09.10804@u.washington.edu> Date: Tue, 28 Nov 2006 14:41:13 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <456CAB12.9070507@u.washington.edu> <200611282302.08439.pieter@degoeje.nl> In-Reply-To: <200611282302.08439.pieter@degoeje.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.142933 X-Uwash-Spam: Gauge=XI, Probability=11%, Report='ADULT_MED_1 1, __ADULT_ANY 0, __ADULT_PHRASE_8_LO 0, __CP_NAME_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: pthreads : questions about concurrency and lifetime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 22:41:20 -0000 Pieter de Goeje wrote: > On Tuesday 28 November 2006 22:33, Garrett Cooper wrote: > >> Hello once again, >> Just wondering about pthreads now. I know that the lifetime (scope) >> of a regular procedural function in C is simple.. it's from the top of >> the function body to the bottom of the function body (assuming no >> infinite loops are injected). Example: >> >> (void*) function(void*) {/* lifetime of function is here. */ } >> >> However looking over pthread(3), there are a number of different >> functions for killing threads and exiting child threads, in order >> terminate child threads (and maybe to get back to the main thread of >> execution in a program). >> >> So my question is, once the end of a function body is reached that was >> made using pthread_create(), does the thread exit and 'destroy' itself >> or do I need to do 'manual' cleanup, i.e. run pthread_detach(3), >> pthread_exit(3), or pthread_kill(3)? >> > > There are three ways to cleanup a thread: > 1) pthread_detach(3) > 2) pthread_join(3) > 3) creating a thread with PTHREAD_CREATE_DETACHED attribute set, see > pthread_attr_setdetachstate(3) > > Calling pthread_detach(3) directly after you created the thread is an easy way > to create an "uncontrolled" thread. Effectively the same as #3. The thread > will cleanup automatically after the thread function returns. > > -- Pieter de Goeje > So that means no, after a function's definition is reached the thread/resources stay in a semi-'alive' (maybe 'zombified') state?, or does the kernel cleanup / reclaim all of the resources tied up with the thread? -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 23:00:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0C5616A412 for ; Tue, 28 Nov 2006 23:00:42 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp2.utsp.utwente.nl [130.89.2.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22FBF43C9D for ; Tue, 28 Nov 2006 23:00:36 +0000 (GMT) (envelope-from pieter@degoeje.nl) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id kASN0box012331; Wed, 29 Nov 2006 00:00:37 +0100 From: Pieter de Goeje To: freebsd-hackers@freebsd.org Date: Wed, 29 Nov 2006 00:00:37 +0100 User-Agent: KMail/1.9.4 References: <456CAB12.9070507@u.washington.edu> <200611282302.08439.pieter@degoeje.nl> <456CBB09.10804@u.washington.edu> In-Reply-To: <456CBB09.10804@u.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611290000.37322.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Garrett Cooper Subject: Re: pthreads : questions about concurrency and lifetime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 23:00:42 -0000 On Tuesday 28 November 2006 23:41, Garrett Cooper wrote: > So that means no, after a function's definition is reached the > thread/resources stay in a semi-'alive' (maybe 'zombified') state?, or > does the kernel cleanup / reclaim all of the resources tied up with the > thread? > -Garrett If you detach the thread, it will properly clean up after it self, after the thread has finished running. -- Pieter From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 00:07:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F274D16A40F for ; Wed, 29 Nov 2006 00:07:22 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5190F43CA0 for ; Wed, 29 Nov 2006 00:07:17 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141]) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kAT07MCk016538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 16:07:22 -0800 X-Auth-Received: from [128.208.1.159] (fubar.cs.washington.edu [128.208.1.159]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kAT07LFC018791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 16:07:21 -0800 Message-ID: <456CCF39.9090808@u.washington.edu> Date: Tue, 28 Nov 2006 16:07:21 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (X11/20061108) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <456CAB12.9070507@u.washington.edu> <200611282302.08439.pieter@degoeje.nl> <456CBB09.10804@u.washington.edu> <200611290000.37322.pieter@degoeje.nl> In-Reply-To: <200611290000.37322.pieter@degoeje.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.155432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: pthreads : questions about concurrency and lifetime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 00:07:23 -0000 Pieter de Goeje wrote: > On Tuesday 28 November 2006 23:41, Garrett Cooper wrote: > >> So that means no, after a function's definition is reached the >> thread/resources stay in a semi-'alive' (maybe 'zombified') state?, or >> does the kernel cleanup / reclaim all of the resources tied up with the >> thread? >> -Garrett >> > If you detach the thread, it will properly clean up after it self, after the > thread has finished running. > > -- Pieter > Awesome; that's the answer I was looking for. Thanks again! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 07:33:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D041816A403 for ; Wed, 29 Nov 2006 07:33:59 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2816243E82 for ; Wed, 29 Nov 2006 07:31:28 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAT5fWMG020554; Wed, 29 Nov 2006 08:41:32 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAT5fUwN020553; Wed, 29 Nov 2006 08:41:31 +0300 (MSK) (envelope-from yar) Date: Wed, 29 Nov 2006 08:41:30 +0300 From: Yar Tikhiy To: "Devon H. O'Dell" Message-ID: <20061129054130.GH96853@comp.chem.msu.su> References: <456CA68E.7090207@u.washington.edu> <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: Single UDP sockets : duplex capable? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 07:33:59 -0000 On Tue, Nov 28, 2006 at 04:24:08PM -0500, Devon H. O'Dell wrote: > 2006/11/28, Garrett Cooper : > >Hello, > > > > Just wondering, abstractly.. > > Both sides can read from and write to the socket file descriptor. > You'll need to develop a protocol to determine when either given side > is expecting to receive or to send data (if both sides sit around in > read(2), you're not going to get much done) :) ... and if you want asynchronous conversation, i.e., data coming anytime, consider using non-blocking sockets with select(2), poll(2), or kqueue(2). The particular choice depends upon the requirements on the portability and performance of the application. If you target at as much systems as possible, using a ready-made wrapper library such as libevent can be an option. > > ------------------------- > >| A -[socket (UDP)]-> B | > > ------------------------- > > > > A creates a UDP socket (call it 's1') to talk to B. > > > > Can B use the same socket ('s2') to talk to A using read(2) or > >recv(2), or does A have to accept(2) traffic from B using a different > >socket? > > > > The programming language I'm using is C (not C++). -- Yar From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 07:19:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F4D316A47B for ; Wed, 29 Nov 2006 07:19:27 +0000 (UTC) (envelope-from w0lfie@clear.net.nz) Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C04243CB8 for ; Wed, 29 Nov 2006 07:18:56 +0000 (GMT) (envelope-from w0lfie@clear.net.nz) Received: from clear.net.nz (lb1-srcnat.clear.net.nz [203.97.32.236]) by smtp4.clear.net.nz (CLEAR Net Mail) with SMTP id <0J9H00GFC8RWE020@smtp4.clear.net.nz> for freebsd-hackers@freebsd.org; Wed, 29 Nov 2006 18:33:32 +1300 (NZDT) Date: Wed, 29 Nov 2006 18:33:32 +1300 From: w0lfie Sender: w0lfie@clear.net.nz To: freebsd-hackers@freebsd.org Message-id: <456d1bac.304.51fa.24811@clear.net.nz> X-Mailer: CLEAR Net WebMail; webmail.clear.net.nz; user: w0lfie; ip: 121.73.22.121 Priority: normal X-Mailman-Approved-At: Wed, 29 Nov 2006 12:38:36 +0000 Subject: USB keyboard problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: w0lfie@clear.net.nz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 07:19:27 -0000 Heya, I have a usb keyboard (Genius slimstar pro) and am having the same problems as others are experiencing. When the kb is first loaded, the two modifiers ctrl and shift are "stuck" on. This results in keys like d exiting your terminal. If you hit ctrl and shift on another kb (I have an at kb hooked up as well) it resets these modifiers. Once this has been done, a majority of the keys (a-z, 1-0 etc...) work as they should. None of the modifier keys work though. After digging through and playing with the ukbd code, I have found that when you hit any of the modifier keys, it sends the two keycodes 0xe0 and 0xe1 as pressed keys to ukbd_interrupt() and sends nothing when you release the key. I have tested this keyboard in OpenBSD, Linux and Windows all with success. I have also tried this without the kbdmux and get the same results. Any help or insight into this problem would really be appreciated as I'm quite stuck on where to go to from here. Cheers, Sam. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 13:09:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52A716A416; Wed, 29 Nov 2006 13:09:55 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.200.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF9143CAE; Wed, 29 Nov 2006 13:09:53 +0000 (GMT) (envelope-from josh@tcbug.org) Received: from gimpy (c-24-118-173-219.hsd1.mn.comcast.net[24.118.173.219]) by comcast.net (sccrmhc13) with ESMTP id <2006112913095401300lrghse>; Wed, 29 Nov 2006 13:09:54 +0000 From: Josh Paetzel To: freebsd-hackers@freebsd.org Date: Wed, 29 Nov 2006 07:09:33 -0600 User-Agent: KMail/1.9.4 References: <20061128204732.3e8790fd.vlady@gbservices.biz> In-Reply-To: <20061128204732.3e8790fd.vlady@gbservices.biz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611290709.34059.josh@tcbug.org> Cc: Vladimir Terziev , freebsd-net@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 13:09:56 -0000 On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > Hi, > > i have a machine with Pentium 4-D processor utilizing > FreeBSD-6.1-RELEASE-p10/amd64. > > The machine is running SMP kernel. > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > handeled by the ste(4) driver. Machine is targeted for a > gateway/firewall and will handle a big amount of network traffic. > > It seems the bge(4) driver has severe performance problems (may be > especially in my configuration). I tried test scp(1) to a remote > machine, using one of the BCM5721 NICs. The average speed which has > been reached was 200kBps. > > Just for comparison, when i tryed the same test scp(1), to the > same remote machine, but using one of the D-Link DL10050 NICs, the > average speed which has been reached was 10MBps. > > Could someone point me to a good performance tuning document for > bge(4) handeled NICs, under SMP kernel or at all? > > Thanks in advance! > > Vladimir So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so you're going to run into bus saturation long before you're able to max out the throughput on the NICs. Which isn't to say that 200 kBps isn't a problem, but perhaps you are dealing with a bad cable or switchport. -- Thanks, Josh Paetzel From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 13:50:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21F5E16A566 for ; Wed, 29 Nov 2006 13:50:02 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83AE243C9D for ; Wed, 29 Nov 2006 13:49:58 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 29 Nov 2006 14:49:59 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id for ; Wed, 29 Nov 2006 14:49:58 +0100 Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 29 Nov 2006 14:49:58 +0100 Received: from britannica.bec.de (storm.stura.uni-rostock.de [139.30.252.72]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0J9H00ENSVRA0X@mail.uni-rostock.de> for freebsd-hackers@freebsd.org; Wed, 29 Nov 2006 14:49:58 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id 5AE713878; Wed, 29 Nov 2006 14:23:40 +0100 (CET) Date: Wed, 29 Nov 2006 14:23:40 +0100 From: Joerg Sonnenberger In-reply-to: <20061128204732.3e8790fd.vlady@gbservices.biz> To: freebsd-hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org Message-id: <20061129132340.GC6806@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <20061128204732.3e8790fd.vlady@gbservices.biz> X-OriginalArrivalTime: 29 Nov 2006 13:49:58.0655 (UTC) FILETIME=[425DF8F0:01C713BD] Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 13:50:02 -0000 On Tue, Nov 28, 2006 at 08:47:32PM +0200, Vladimir Terziev wrote: > It seems the bge(4) driver has severe performance problems (may be > especially in my configuration). > I tried test scp(1) to a remote machine, using one of the BCM5721 NICs. > The average speed which has been reached was 200kBps. Can you try forcing the interface back to 100mbit, half duplex? I've seen issues with a switch before resulting in exactly that kind of performance. Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 16:29:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB53616A4C2; Wed, 29 Nov 2006 16:29:19 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD2FB43CC8; Wed, 29 Nov 2006 16:26:04 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 5FBBC19284B; Wed, 29 Nov 2006 17:25:37 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id F1E39192847; Wed, 29 Nov 2006 17:25:36 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id B9AC628517; Wed, 29 Nov 2006 17:25:34 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 7AE3028505; Wed, 29 Nov 2006 17:25:34 +0100 (CET) Date: Wed, 29 Nov 2006 18:25:34 +0200 From: Vladimir Terziev To: Josh Paetzel Message-Id: <20061129182534.5300947f.vlady@gbservices.biz> In-Reply-To: <200611290709.34059.josh@tcbug.org> References: <20061128204732.3e8790fd.vlady@gbservices.biz> <200611290709.34059.josh@tcbug.org> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org, freebsd-net@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 16:29:19 -0000 The cable and the switch port, both were one and the same in the test with Broadcom NIC and in the test with D-Link NIC. So, the reason is not in them for sure. I didn't mention in my initial e-mail, that since the swtich is 100Mbps, the Broadcom NIC was forced to work on 100mbit, full-duplex. For some reason, when using autodect, the Broadcom NIC negotiates 100mbit, half-duplex. Vladimir On Wed, 29 Nov 2006 07:09:33 -0600 Josh Paetzel wrote: > On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > > Hi, > > > > i have a machine with Pentium 4-D processor utilizing > > FreeBSD-6.1-RELEASE-p10/amd64. > > > > The machine is running SMP kernel. > > > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > > handeled by the ste(4) driver. Machine is targeted for a > > gateway/firewall and will handle a big amount of network traffic. > > > > It seems the bge(4) driver has severe performance problems (may be > > especially in my configuration). I tried test scp(1) to a remote > > machine, using one of the BCM5721 NICs. The average speed which has > > been reached was 200kBps. > > > > Just for comparison, when i tryed the same test scp(1), to the > > same remote machine, but using one of the D-Link DL10050 NICs, the > > average speed which has been reached was 10MBps. > > > > Could someone point me to a good performance tuning document for > > bge(4) handeled NICs, under SMP kernel or at all? > > > > Thanks in advance! > > > > Vladimir > > So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so > you're going to run into bus saturation long before you're able to > max out the throughput on the NICs. > > Which isn't to say that 200 kBps isn't a problem, but perhaps you are > dealing with a bad cable or switchport. > > -- > Thanks, > > Josh Paetzel From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 16:29:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1229216A56A for ; Wed, 29 Nov 2006 16:29:46 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF5E443D8C for ; Wed, 29 Nov 2006 16:28:15 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 1CCE919291C; Wed, 29 Nov 2006 17:28:09 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id A2359192905; Wed, 29 Nov 2006 17:28:08 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id BFD8628521; Wed, 29 Nov 2006 17:28:05 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 86EDB28503; Wed, 29 Nov 2006 17:28:05 +0100 (CET) Date: Wed, 29 Nov 2006 18:28:05 +0200 From: Vladimir Terziev To: Joerg Sonnenberger Message-Id: <20061129182805.c34769cc.vlady@gbservices.biz> In-Reply-To: <20061129132340.GC6806@britannica.bec.de> References: <20061128204732.3e8790fd.vlady@gbservices.biz> <20061129132340.GC6806@britannica.bec.de> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 16:29:46 -0000 Hm, interesting. I noticed that the auto-negotiation between the switch and the Broadcom NIC leaded to 100mbit, half-duplex. That's why i forced the Broadcom NIC to 100mbit, full-duplex. Vladimir On Wed, 29 Nov 2006 14:23:40 +0100 Joerg Sonnenberger wrote: > On Tue, Nov 28, 2006 at 08:47:32PM +0200, Vladimir Terziev wrote: > > It seems the bge(4) driver has severe performance problems (may be > > especially in my configuration). > > I tried test scp(1) to a remote machine, using one of the BCM5721 NICs. > > The average speed which has been reached was 200kBps. > > Can you try forcing the interface back to 100mbit, half duplex? I've > seen issues with a switch before resulting in exactly that kind of > performance. > > Joerg > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 16:45:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8014516A5D8 for ; Wed, 29 Nov 2006 16:45:28 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93A7F43DCA for ; Wed, 29 Nov 2006 16:43:12 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003267633.msg for ; Wed, 29 Nov 2006 16:42:44 +0000 Message-ID: <024401c713d5$62a830e0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Vladimir Terziev" , "Joerg Sonnenberger" References: <20061128204732.3e8790fd.vlady@gbservices.biz><20061129132340.GC6806@britannica.bec.de> <20061129182805.c34769cc.vlady@gbservices.biz> Date: Wed, 29 Nov 2006 16:42:33 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Wed, 29 Nov 2006 16:42:44 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 29 Nov 2006 16:42:46 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 16:45:28 -0000 Vladimir Terziev wrote: > Hm, interesting. I noticed that the auto-negotiation between the > switch and the Broadcom NIC leaded to 100mbit, half-duplex. That's > why i forced the Broadcom NIC to 100mbit, full-duplex. If you force settings ensure you force both ends or your almost garanteed to see issues. Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 16:49:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0EA316A416 for ; Wed, 29 Nov 2006 16:49:59 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28E0843CAD for ; Wed, 29 Nov 2006 16:49:29 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 243B1192A7D; Wed, 29 Nov 2006 17:49:32 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id AA588192A7C; Wed, 29 Nov 2006 17:49:31 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id C135128504; Wed, 29 Nov 2006 17:49:29 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 8881228503; Wed, 29 Nov 2006 17:49:29 +0100 (CET) Date: Wed, 29 Nov 2006 18:49:29 +0200 From: Vladimir Terziev To: "Steven Hartland" Message-Id: <20061129184929.4234fb71.vlady@gbservices.biz> In-Reply-To: <024401c713d5$62a830e0$b3db87d4@multiplay.co.uk> References: <20061128204732.3e8790fd.vlady@gbservices.biz> <20061129132340.GC6806@britannica.bec.de> <20061129182805.c34769cc.vlady@gbservices.biz> <024401c713d5$62a830e0$b3db87d4@multiplay.co.uk> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org, Joerg Sonnenberger Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 16:50:00 -0000 My switch is "stupid" one, so i can manage only the NIC end. Vladimir On Wed, 29 Nov 2006 16:42:33 -0000 "Steven Hartland" wrote: > Vladimir Terziev wrote: > > Hm, interesting. I noticed that the auto-negotiation between the > > switch and the Broadcom NIC leaded to 100mbit, half-duplex. That's > > why i forced the Broadcom NIC to 100mbit, full-duplex. > > If you force settings ensure you force both ends or your almost > garanteed to see issues. > > Steve > > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. > > In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 > or return the E.mail to postmaster@multiplay.co.uk. > From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 17:18:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8A1C16A508 for ; Wed, 29 Nov 2006 17:18:36 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11DF343CA7 for ; Wed, 29 Nov 2006 17:07:12 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003267709.msg for ; Wed, 29 Nov 2006 17:06:39 +0000 Message-ID: <028601c713d8$ba8f84e0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Vladimir Terziev" References: <20061128204732.3e8790fd.vlady@gbservices.biz><20061129132340.GC6806@britannica.bec.de><20061129182805.c34769cc.vlady@gbservices.biz><024401c713d5$62a830e0$b3db87d4@multiplay.co.uk> <20061129184929.4234fb71.vlady@gbservices.biz> Date: Wed, 29 Nov 2006 17:06:29 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Wed, 29 Nov 2006 17:06:39 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 29 Nov 2006 17:06:39 +0000 Cc: freebsd-hackers@freebsd.org, Joerg Sonnenberger Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 17:18:37 -0000 Vladimir Terziev wrote: > My switch is "stupid" one, so i can manage only the NIC end. If thats the case your switch is likely to be running at HD while you've set the NIC to FD hence the problem. Both auto or both hardcoded otherwise badness. Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 17:19:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9122F16A5F4 for ; Wed, 29 Nov 2006 17:19:54 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19ACA43EFE for ; Wed, 29 Nov 2006 17:15:29 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id BF2EA192940; Wed, 29 Nov 2006 18:15:31 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id 6902B192A75; Wed, 29 Nov 2006 17:42:40 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id C588A28504; Wed, 29 Nov 2006 17:42:37 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 8041E28503; Wed, 29 Nov 2006 17:42:37 +0100 (CET) Date: Wed, 29 Nov 2006 18:42:37 +0200 From: Vladimir Terziev To: Joerg Sonnenberger Message-Id: <20061129184237.9feece67.vlady@gbservices.biz> In-Reply-To: <20061129132340.GC6806@britannica.bec.de> References: <20061128204732.3e8790fd.vlady@gbservices.biz> <20061129132340.GC6806@britannica.bec.de> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 17:19:54 -0000 Thanks for the advice! I've retuned back the Broadcom NIC to autoselect mode and now the transfer speed is 7-8MBps which is very great improvement compared to 200kBps. The registered D-Link speed, of 10Mbps, is still ahead but now the things look different. Vladimir On Wed, 29 Nov 2006 14:23:40 +0100 Joerg Sonnenberger wrote: > On Tue, Nov 28, 2006 at 08:47:32PM +0200, Vladimir Terziev wrote: > > It seems the bge(4) driver has severe performance problems (may be > > especially in my configuration). > > I tried test scp(1) to a remote machine, using one of the BCM5721 NICs. > > The average speed which has been reached was 200kBps. > > Can you try forcing the interface back to 100mbit, half duplex? I've > seen issues with a switch before resulting in exactly that kind of > performance. > > Joerg > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 21:11:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CEEBF16A407 for ; Wed, 29 Nov 2006 21:11:18 +0000 (UTC) (envelope-from w0lfie@clear.net.nz) Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id C070143CB4 for ; Wed, 29 Nov 2006 21:10:54 +0000 (GMT) (envelope-from w0lfie@clear.net.nz) Received: from clear.net.nz (lb1-srcnat.clear.net.nz [203.97.32.236]) by smtp4.clear.net.nz (CLEAR Net Mail) with SMTP id <0J9I0026RG638610@smtp4.clear.net.nz> for freebsd-hackers@freebsd.org; Thu, 30 Nov 2006 10:10:52 +1300 (NZDT) Date: Thu, 30 Nov 2006 10:10:51 +1300 From: w0lfie Sender: w0lfie@clear.net.nz To: freebsd-hackers@freebsd.org Message-id: <456df75b.35a.4d51.31890@clear.net.nz> X-Mailer: CLEAR Net WebMail; webmail.clear.net.nz; user: w0lfie; ip: 210.55.18.198 Priority: normal Subject: Re: USB keyboard problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: w0lfie@clear.net.nz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 21:11:18 -0000 Something I forgot to add... The keyboard_t struct kbd is passed to the ukbd_interrupt function. Within this struct, there is a ukbd_state struct that includes ks_ndata and ks_odata (new and current data?). Which part of the system actually fills in the ks_ndata struct? Is this filled in externally to the ukbd driver? Such as the usb hid driver? What I am getting at is my problem may not be within the ukbd driver but within the mechanism that fills in ks_ndata. If this is the case, I should be looking at that piece of code rather than the ukbd driver. Sam. ----- Original Message Follows ----- > Heya, > > I have a usb keyboard (Genius slimstar pro) and am having > the same problems as others are experiencing. When the kb > is first loaded, the two modifiers ctrl and shift are > "stuck" on. This results in keys like d exiting your > terminal. If you hit ctrl and shift on another kb (I have > an at kb hooked up as well) it resets these modifiers. > Once this has been done, a majority of the keys (a-z, 1-0 > etc...) work as they should. None of the modifier keys > work though. > > After digging through and playing with the ukbd code, I > have found that when you hit any of the modifier keys, it > sends the two keycodes 0xe0 and 0xe1 as pressed keys to > ukbd_interrupt() and sends nothing when you release the > key. > > I have tested this keyboard in OpenBSD, Linux and Windows > all with success. I have also tried this without the > kbdmux and get the same results. > > Any help or insight into this problem would really be > appreciated as I'm quite stuck on where to go to from > here. > > Cheers, > > Sam. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 21:29:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0314616A47B for ; Wed, 29 Nov 2006 21:29:06 +0000 (UTC) (envelope-from apanqasem@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id A16CB43CC8 for ; Wed, 29 Nov 2006 21:28:50 +0000 (GMT) (envelope-from apanqasem@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so2257905wxc for ; Wed, 29 Nov 2006 13:28:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=obg90HP7G4zLKZpWJEPz3gTKj10AonCFQJVlbBIH7aQH/77moSfDU5cyalv+GnbMn0aXIu1dDMMiqHYVHYWsqzNrXopUZUGvUZCOAXTjku5fDsEdPuVK7sNsDotoQlJBOs0H/UZRUpM32K0SDgzEPTL11DggJKeYoWBuJPDD/SY= Received: by 10.70.32.10 with SMTP id f10mr4728304wxf.1164835733536; Wed, 29 Nov 2006 13:28:53 -0800 (PST) Received: from ?128.42.2.60? ( [128.42.2.60]) by mx.google.com with ESMTP id h14sm28218130wxd.2006.11.29.13.28.53; Wed, 29 Nov 2006 13:28:53 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.2) To: freebsd-hackers@freebsd.org Message-Id: <7CDADF43-C278-471F-8F13-FBFA1EBCDF44@gmail.com> From: Apan Qasem Date: Wed, 29 Nov 2006 15:29:27 -0600 X-Mailer: Apple Mail (2.752.2) X-Mailman-Approved-At: Wed, 29 Nov 2006 22:23:25 +0000 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Page Coloring in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 21:29:06 -0000 Does the FreeBSD kernel employ a page coloring algorithm? If so, where can I find information on the heuristics used to color pages? I have looked at Matthew Dillon's description at http:// people.freebsd.org/~nik/article.html-text I was hoping to find something more detailed. Thanks. - Apan From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 29 23:19:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DCCA16A504 for ; Wed, 29 Nov 2006 23:19:00 +0000 (UTC) (envelope-from tbyte@otel.net) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F8CF43C9D for ; Wed, 29 Nov 2006 23:18:55 +0000 (GMT) (envelope-from tbyte@otel.net) Received: from warhead.otel.net ([212.36.8.210]) by mail.otel.net with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1GpYhc-000Hxr-Rq for freebsd-hackers@freebsd.org; Thu, 30 Nov 2006 01:18:57 +0200 From: Iasen Kostoff To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary="=-PAH/twysuwDrzpoEvaGo" Date: Thu, 30 Nov 2006 01:18:56 +0200 Message-Id: <1164842336.1066.6.camel@WarHeaD.OTEL.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 FreeBSD GNOME Team Port Subject: Driver not unset properly after kldunload X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 23:19:00 -0000 --=-PAH/twysuwDrzpoEvaGo Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, It seems that after I load and then unload a driver its name stays linked to the device e.g: nfe0@pci0:10:0: class=0x068000 card=0x81411043 chip=0x005710de rev=0xa3 hdr=0x00 but of course if_nfe is neither compiled in kernel nor is loaded as module anymore. I digged around in kernel and saw this in device_detach(): if (!(dev->flags & DF_FIXEDCLASS)) devclass_delete_device(dev->devclass, dev); dev->state = DS_NOTPRESENT; device_set_driver(dev, NULL); device_set_desc(dev, NULL); device_sysctl_fini(dev); I've put some device_printf()s around and then looked at devclass_delete_device(). It destroys (frees) a lot of the info about the device and so the device_printf() prints device name as "unknown" (NULL). That seems to be a problem for at least device_set_driver(dev, NULL) - it doesn't unset the driver. I'm not so sure about the other 2 but I guess it's same there. So when I changed the order of this funcs everything worked fine (at least it looks like it worked fine :) I'm not absolutely sure that this won't broke something else). I've attached a patch for review. (I've filled a PR http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/104777) --=-PAH/twysuwDrzpoEvaGo Content-Disposition: attachment; filename=subr_bus.c.diff Content-Type: text/x-patch; name=subr_bus.c.diff; charset=us-ascii Content-Transfer-Encoding: 7bit --- subr_bus.c.bak Sun Oct 22 18:42:11 2006 +++ subr_bus.c Mon Oct 23 00:27:22 2006 @@ -2417,13 +2417,14 @@ if (dev->parent) BUS_CHILD_DETACHED(dev->parent, dev); + device_set_driver(dev, NULL); + device_set_desc(dev, NULL); + device_sysctl_fini(dev); + if (!(dev->flags & DF_FIXEDCLASS)) devclass_delete_device(dev->devclass, dev); dev->state = DS_NOTPRESENT; - device_set_driver(dev, NULL); - device_set_desc(dev, NULL); - device_sysctl_fini(dev); return (0); } --=-PAH/twysuwDrzpoEvaGo-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 30 06:08:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7527116A407 for ; Thu, 30 Nov 2006 06:08:34 +0000 (UTC) (envelope-from brucem@mail.cruzio.com) Received: from cruzio.com (dsl-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 120B043CA5 for ; Thu, 30 Nov 2006 06:08:27 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id kAU7CU2w000439; Wed, 29 Nov 2006 23:12:30 -0800 (PST) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id kAU7CUSe000438; Wed, 29 Nov 2006 23:12:30 -0800 (PST) (envelope-from brucem) Date: Wed, 29 Nov 2006 23:12:30 -0800 (PST) From: "Bruce R. Montague" Message-Id: <200611300712.kAU7CUSe000438@mail.cruzio.com> To: Frank-Deignan@cfl.rr.com Cc: freebsd-hackers@freebsd.org Subject: Re: Van Jacobson's network stack restructure X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 06:08:34 -0000 Hi, Frank. re: > http://lists.freebsd.org/pipermail/freebsd-hackers/2006-February/015365.html > > Who's calling? :-) > > Frank The original email to which you link above occurred in a discussion regarding the performance, architecture, evolution (or somesuch) of the FreeBSD network stack. The FreeBSD network stack is arguably about the most direct descendent of the TCP/IP stack that was done (forked from a BBN stack, I guess) at UC Berkeley. One reason the UCB (and FreeBSD) stack is of interest is because it essentially became the "reference implementation" for the modern TCP/IPv4 implementation. In university networking classes, noting that the first TCP link outside of a single lab was between Stanford and London (and thus that the "Internet" has always been "International") makes a good story. Unfortunately it is hard to answer the invariable follow-up questions. I found very little info available the last time I looked (a few years ago). But maybe I missed the obvious. Did you do the UCL PDP-9 implementation on the first link? Was it a stand-alone program? What did it do? Kind of a ping? A test or performance program to debug things? What was the "network device" like? Did this program evolve, or was the PDP-9 just too small? Was your TCP written in Babbage? Was Babbage an assembler or a "structured assembly" language with control flow and expressions? Is there any published doc on this language (or programming environment)? How did you work with the Stanford folks? Was the work with the protocol done to a "wire spec", or did you look at their implementation? Did you work with their BCPL version of TCP, or hand-port BCPL to Babbage assembly code? etc. etc... Was anything written up and published? Where? (I did try to contact UCL, to no avail.) Alas, all to often today if it's not electronically indexed it's as if it didn't exist. Was this info classified at the time? (I saw somewhere that the big push for a portable standard digital network link to Britain was that Norway happened to have an existing seismic-monitoring network close to a particularly interesting Arctic test site... is this true?) Sorry to go on at length with so many questions. There was some nice information about a new study of the Antikythera mechanism today, surely the mysterious PDP-9 and it's Babbage programming environment can yield a few clues! :) Please correct me anyone if I've got something wrong. - bruce From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 30 20:01:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 205E716A40F for ; Thu, 30 Nov 2006 20:01:36 +0000 (UTC) (envelope-from cwolsen@domainatlantic.com) Received: from mta3.srv.hcvlny.cv.net (mta3.srv.hcvlny.cv.net [167.206.4.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BCC143E25 for ; Thu, 30 Nov 2006 19:55:32 +0000 (GMT) (envelope-from cwolsen@domainatlantic.com) Received: from [192.168.1.100] (ool-18ba877a.dyn.optonline.net [24.186.135.122]) by mta3.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTP id <0J9K00KGB7BRMV72@mta3.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Thu, 30 Nov 2006 14:55:03 -0500 (EST) Date: Thu, 30 Nov 2006 19:54:47 +0000 From: Christopher Olsen To: freebsd-hackers@freebsd.org Message-id: <200611301954.47319.cwolsen@domainatlantic.com> Organization: Domain Atlantic MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: KMail/1.9.4 Subject: PRINTF, STDOUT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 20:01:36 -0000 Hello, I've been tracing the printf function from the FreeBSD 6.x libc... I'm trying to figure out what mechanism transfers the data from the processes FILE to the system so it's written out to the screen... >From my findings I get to a function __sfvwrite(FILE,buf) {} however this just copies into the FILE's buffer and there are no systems between this point and returning back from the printf call -Christopher From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 30 20:31:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8557B16A407 for ; Thu, 30 Nov 2006 20:31:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C458943E86 for ; Thu, 30 Nov 2006 20:28:54 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.8/8.13.8/NETPLEX) with ESMTP id kAUKSkaJ016819; Thu, 30 Nov 2006 15:28:46 -0500 (EST) Date: Thu, 30 Nov 2006 15:28:46 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Christopher Olsen In-Reply-To: <200611301954.47319.cwolsen@domainatlantic.com> Message-ID: References: <200611301954.47319.cwolsen@domainatlantic.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-2.0.2 (mail.ntplx.net [204.213.176.10]); Thu, 30 Nov 2006 15:28:46 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org Subject: Re: PRINTF, STDOUT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 20:31:25 -0000 On Thu, 30 Nov 2006, Christopher Olsen wrote: > Hello, > > I've been tracing the printf function from the FreeBSD 6.x libc... I'm trying > to figure out what mechanism transfers the data from the processes FILE to > the system so it's written out to the screen... > >> From my findings I get to a function __sfvwrite(FILE,buf) {} > > however this just copies into the FILE's buffer and there are no systems > between this point and returning back from the printf call __sfvwrite() -> __fflush() -> __sflush -> _swrite() -> (via fp->_write) __swrite() -> _write() Note that _write() is a weak reference to __sys_write() which is the actual system call. -- Dan From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 05:30:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD84516C333 for ; Fri, 1 Dec 2006 05:28:11 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8202043CAB for ; Fri, 1 Dec 2006 05:27:58 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so3270210nfc for ; Thu, 30 Nov 2006 21:28:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=RwvuXRtxvaqK7YJsEUiOyC2jXxLsqCIf3GPt/Bx9flgxbi2ft4Topx2P1XlXupCEiO3FZSZRzG0bML3VokdAz1rHwZbN8gkbxYMKHMhxGqdmELg6iOwmL1pDSH/jERkHOJU5JthuVzwoFCpmlNa63xSgUsyLxs/RdRJcezrMbXI= Received: by 10.82.126.5 with SMTP id y5mr982818buc.1164950889303; Thu, 30 Nov 2006 21:28:09 -0800 (PST) Received: by 10.82.171.6 with HTTP; Thu, 30 Nov 2006 21:28:09 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 10:58:09 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <44A87163.1020203@elischer.org> MIME-Version: 1.0 References: <200607021305.aa75873@nowhere.iedowse.com> <44A87163.1020203@elischer.org> X-Google-Sender-Auth: 97226a1a98ffaf1c Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 05:30:47 -0000 Hello, I would like to unsubscribe myself from all freebsd mailing lists. I have sent an unsubscribe to freebsd-hackers-unsubscribe, but did not get any response to verify. Since the admin is on the mailing list, I would appreciate if you can delete my name and/or email me the procedure to follow. thanks -kamal On 7/3/06, Julian Elischer wrote: > > Ian Dowse wrote: > > >In message <200607021138.11945.hselasky@c2i.net>, Hans Petter Selasky > writes: > > > > > >>But there is one problem, that has been overlooked, and that is High > speed > >>isochronous transfers, which are not supported by the existing USB > system. I > >>don't think that the EHCI specification was designed for scatter and > gather, > >>when you consider this: > >> > >>8 transfers of 0xC00 bytes has to fit on 7 pages. If this is going to > work, > >>and I am right, one page has to contain two transfers. (see page 43 of > >>ehci-r10.pdf) > >> > >> > > > >I haven't looked into the details, but the text in section 3.3.3 > >seems to suggest that EHCI is designed to not require physically > >contiguous allocations here either, so the same approach of using > >bus_dmamap_load() should work: > > > > This data structure requires the associated data buffer to be > > contiguous (relative to virtual memory), but allows the physical > > memory pages to be non-contiguous. Seven page pointers are provided > > to support the expression of 8 isochronous transfers. The seven > > pointers allow for 3 (transactions) * 1024 (maximum packet size) > > * 8 (transaction records) (24576 bytes) to be moved with this > > data structure, regardless of the alignment offset of the first > > page. > > > > > > yes, as long as the beffers are contiguous in some virtual space then > the maximum number of pages they > can need is 7. > (they actually fit into 6 but they may start part way through the first > page and may therefore overflow into a 7th). > > >Ian > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > " > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 09:35:04 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 031B916A415 for ; Fri, 1 Dec 2006 09:35:04 +0000 (UTC) (envelope-from eldar@tusur.ru) Received: from ms.tusur.ru (ms.tusur.ru [217.79.57.135]) by mx1.FreeBSD.org (Postfix) with SMTP id 718AC43CA6 for ; Fri, 1 Dec 2006 09:34:48 +0000 (GMT) (envelope-from eldar@tusur.ru) Received: from ms.tusur.ru (ms [217.79.57.135]) by ms.tusur.ru (Postfix) with ESMTP id 137FD1DF012 for ; Fri, 1 Dec 2006 15:34:56 +0600 (TSK) Received: from [192.168.1.2] (pppoe-69.50.110.89-adsl.spbnit.ru [89.110.50.69]) by ms.tusur.ru (Postfix) with ESMTP id 886D71DE44C for ; Fri, 1 Dec 2006 15:34:55 +0600 (TSK) Message-ID: <456FF73B.8020305@tusur.ru> Date: Fri, 01 Dec 2006 12:34:51 +0300 From: "Eldar T. Zaitov" User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: 200609181750.58145.jhb@freebsd.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Virus-Scanned: ms.tusur.ru Subject: jail2 patchset 14 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 09:35:04 -0000 Have tried Jail2 patchset #14 on 6.2-PRERELEASE, everything compiles and works ok, but resolve. gethostbyname always returns NULL, but host/dig works ok. here's an example: virtual# host mail.ru mail.ru has address 194.67.57.26 mail.ru mail is handled by 10 mxs.mail.ru. virtual# ping mail.ru ping: cannot resolve mail.ru: Host name lookup failure here is some truss output of 'ping mail.ru': kqueue() = 4 (0x4) socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) connect(5,{ AF_INET ***.62.171.***:53 },16) ERR#22 'Invalid argument' close(5) = 0 (0x0) socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) connect(5,{ AF_INET ***.62.171.***:53 },16) ERR#22 'Invalid argument' close(5) = 0 (0x0) close(4) = 0 (0x0) where ***.62.171.***:53 is nameserver; *** is masked ip nodes; may be I've forgotten something? thank you. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 10:43:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1F8916A403 for ; Fri, 1 Dec 2006 10:43:23 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id D523143C9D for ; Fri, 1 Dec 2006 10:43:09 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003272254.msg for ; Fri, 01 Dec 2006 10:43:16 +0000 Message-ID: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: Date: Fri, 1 Dec 2006 10:43:02 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Fri, 01 Dec 2006 10:43:16 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 01 Dec 2006 10:43:17 +0000 Subject: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 10:43:23 -0000 We've got a jail here which we cant stop with either killall jexec or jkill all return success but jls still reports the jail as running. The machines running several other jails which I cant restart at this time so I ended up starting the jail again jls now reports: jls JID IP Address Hostname Path 9 10.10.0.5 jail6 /usr/local/jails/jail6 7 10.10.0.5 jail6 /usr/local/jails/jail6 6 10.10.0.4 jail5 /usr/local/jails/jail5 5 10.10.0.39 jail4 /usr/local/jails/jail4 3 10.10.0.6 jail3 /usr/local/jails/jail3 2 10.10.0.8 jail2 /usr/local/jails/jail2 1 10.10.0.7 jail1 /usr/local/jails/jail1 Host machine is running FreeBSD-6.1-P10 Any ideas some sort of kernel data corruption? Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 10:47:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A164616A403 for ; Fri, 1 Dec 2006 10:47:36 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D63043CA2 for ; Fri, 1 Dec 2006 10:47:22 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost.int.ru [127.0.0.1] (may be forged)) by mp2.macomnet.net (8.13.7/8.13.8) with ESMTP id kB1AlXue047407; Fri, 1 Dec 2006 13:47:34 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Fri, 1 Dec 2006 13:47:33 +0300 (MSK) From: Maxim Konovalov To: Steven Hartland In-Reply-To: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> Message-ID: <20061201134640.Y47360@mp2.macomnet.net> References: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org Subject: Re: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 10:47:36 -0000 On Fri, 1 Dec 2006, 10:43-0000, Steven Hartland wrote: > We've got a jail here which we cant stop with either killall > jexec or jkill all return success but jls still reports > the jail as running. > > The machines running several other jails which I cant restart > at this time so I ended up starting the jail again jls > now reports: > jls > JID IP Address Hostname Path > 9 10.10.0.5 jail6 /usr/local/jails/jail6 > 7 10.10.0.5 jail6 /usr/local/jails/jail6 > 6 10.10.0.4 jail5 /usr/local/jails/jail5 > 5 10.10.0.39 jail4 /usr/local/jails/jail4 > 3 10.10.0.6 jail3 /usr/local/jails/jail3 > 2 10.10.0.8 jail2 /usr/local/jails/jail2 > 1 10.10.0.7 jail1 /usr/local/jails/jail1 > > Host machine is running FreeBSD-6.1-P10 > > Any ideas some sort of kernel data corruption? Known bug, discussed several times. IIRC leaked struct ucred. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 10:50:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 687F616A416 for ; Fri, 1 Dec 2006 10:50:17 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DDC643C9D for ; Fri, 1 Dec 2006 10:50:03 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id D7A2720022B; Fri, 1 Dec 2006 11:50:14 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id AAD8220020B; Fri, 1 Dec 2006 11:50:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 2D05B444885; Fri, 1 Dec 2006 10:49:59 +0000 (UTC) Date: Fri, 1 Dec 2006 10:49:58 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Steven Hartland In-Reply-To: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> Message-ID: <20061201104809.P91892@maildrop.int.zabbadoz.net> References: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Cc: freebsd-hackers@freebsd.org Subject: Re: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 10:50:17 -0000 On Fri, 1 Dec 2006, Steven Hartland wrote: Hi, > We've got a jail here which we cant stop with either killall > jexec or jkill all return success but jls still reports > the jail as running. > > The machines running several other jails which I cant restart > at this time so I ended up starting the jail again jls > now reports: > jls > JID IP Address Hostname Path > 9 10.10.0.5 jail6 /usr/local/jails/jail6 > 7 10.10.0.5 jail6 /usr/local/jails/jail6 > 6 10.10.0.4 jail5 /usr/local/jails/jail5 > 5 10.10.0.39 jail4 /usr/local/jails/jail4 > 3 10.10.0.6 jail3 /usr/local/jails/jail3 > 2 10.10.0.8 jail2 /usr/local/jails/jail2 > 1 10.10.0.7 jail1 /usr/local/jails/jail1 > > Host machine is running FreeBSD-6.1-P10 > > Any ideas some sort of kernel data corruption? no the jails should really be gone (you should not find any sockets or processes for them after some seconds) - at least it should be that way... See http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/89528 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 11:15:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDB6C16A403 for ; Fri, 1 Dec 2006 11:15:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBE7D43CA8 for ; Fri, 1 Dec 2006 11:15:33 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id BACAC46DC7; Fri, 1 Dec 2006 06:15:46 -0500 (EST) Date: Fri, 1 Dec 2006 11:15:46 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bjoern A. Zeeb" In-Reply-To: <20061201104809.P91892@maildrop.int.zabbadoz.net> Message-ID: <20061201111209.M79653@fledge.watson.org> References: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk> <20061201104809.P91892@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Steven Hartland Subject: Re: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 11:15:47 -0000 On Fri, 1 Dec 2006, Bjoern A. Zeeb wrote: > On Fri, 1 Dec 2006, Steven Hartland wrote: > >> We've got a jail here which we cant stop with either killall jexec or jkill >> all return success but jls still reports the jail as running. >> >> The machines running several other jails which I cant restart at this time >> so I ended up starting the jail again jls now reports: jls >> JID IP Address Hostname Path >> 9 10.10.0.5 jail6 /usr/local/jails/jail6 >> 7 10.10.0.5 jail6 /usr/local/jails/jail6 >> 6 10.10.0.4 jail5 /usr/local/jails/jail5 >> 5 10.10.0.39 jail4 /usr/local/jails/jail4 >> 3 10.10.0.6 jail3 /usr/local/jails/jail3 >> 2 10.10.0.8 jail2 /usr/local/jails/jail2 >> 1 10.10.0.7 jail1 /usr/local/jails/jail1 >> >> Host machine is running FreeBSD-6.1-P10 >> >> Any ideas some sort of kernel data corruption? > > no the jails should really be gone (you should not find any sockets or > processes for them after some seconds) - at least it should be that way... > > See http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/89528 Not all cases of straggling jails are leaks -- does netstat -n show that all the TIME_WAIT TCP connections in the jail have been GC'd? Because security state may be used in the network stack for TCP packet transmission/reception, the ucred remains referenced until the last socket/pcb associated with it are free'd. I've been wondering if we should add a jail process counter, and hide jails in jls if the counter is zero (with a -a argument or such to show them). One idea I've been kicking around is adding a zombie state for jails, in which some straggling references exist, but (a) there are no processes in the jail, and (b) no new processes are allowed to enter the jail. The significance of (b) is that we could vrele() the vnode reference hung off the jail; there's been at least one report that this vnode reference causes issues, as the file system it's from can't be unmounted until the last jail reference evaporates. In essence, this would move to having two reference counts on the prison: a "strong" reference that has to do with having process members, and a "weak" reference that has to do with ucreds pointing at the prison. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 11:42:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 240D116A403; Fri, 1 Dec 2006 11:42:24 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0A2243CA5; Fri, 1 Dec 2006 11:42:09 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003272420.msg; Fri, 01 Dec 2006 11:41:18 +0000 Message-ID: <011c01c7153d$9c5e1bb0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Robert Watson" , "Bjoern A. Zeeb" References: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk><20061201104809.P91892@maildrop.int.zabbadoz.net> <20061201111209.M79653@fledge.watson.org> Date: Fri, 1 Dec 2006 11:41:08 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Fri, 01 Dec 2006 11:41:19 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Fri, 01 Dec 2006 11:41:19 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 11:42:24 -0000 Robert Watson wrote: > Not all cases of straggling jails are leaks -- does netstat -n show > that all the TIME_WAIT TCP connections in the jail have been GC'd? > Because security state may be used in the network stack for TCP > packet transmission/reception, the ucred remains referenced until the > last socket/pcb associated with it are free'd. I've been wondering > if we should add a jail process counter, and hide jails in jls if the > counter is zero (with a -a argument or such to show them). One idea > I've been kicking around is adding a zombie state for jails, in which > some straggling references exist, but (a) there are no processes in > the jail, and (b) no new processes are allowed to enter the jail. > The significance of (b) is that we could vrele() the vnode reference > hung off the jail; there's been at least one report that this vnode > reference causes issues, as the file system it's from can't be > unmounted until the last jail reference evaporates. This appears to not be the case here as there where no references to the address in netstat and no processes remaining. So it does seem there is some sort of leak still remaining there someone where. At one point I did have two "zombie" jails ( of the same jail ) but the second one was due to a socket reference which then just disappeared a minute or so later. > In essence, this would move to having two reference counts on the > prison: a "strong" reference that has to do with having process > members, and a "weak" reference that has to do with ucreds pointing > at the prison. The proposal sounds like a good idea but I'm sure there's an argument that would say thats just hiding the real underlieing issue? Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 12:43:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B575816A40F for ; Fri, 1 Dec 2006 12:43:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBD6E43CB8 for ; Fri, 1 Dec 2006 12:43:28 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 062CD46E88; Fri, 1 Dec 2006 07:43:42 -0500 (EST) Date: Fri, 1 Dec 2006 12:43:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Steven Hartland In-Reply-To: <011c01c7153d$9c5e1bb0$b3db87d4@multiplay.co.uk> Message-ID: <20061201124226.O79653@fledge.watson.org> References: <00c001c71535$7e7d7670$b3db87d4@multiplay.co.uk><20061201104809.P91892@maildrop.int.zabbadoz.net> <20061201111209.M79653@fledge.watson.org> <011c01c7153d$9c5e1bb0$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Bjoern A. Zeeb" , freebsd-hackers@freebsd.org Subject: Re: Unable to stop a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 12:43:46 -0000 On Fri, 1 Dec 2006, Steven Hartland wrote: >> In essence, this would move to having two reference counts on the prison: a >> "strong" reference that has to do with having process members, and a "weak" >> reference that has to do with ucreds pointing at the prison. > > The proposal sounds like a good idea but I'm sure there's an argument that > would say thats just hiding the real underlieing issue? Well, there are two things going on here: (1) Jails that last a long time due to being referenced by data structures that last a long time. I.e., time-wait TCP connections. (2) Leaks in credentials or jails resulting in jails that never go away. What I describe is intended to address the former issue, which is one that exists for a reason. The latter issues are clearly bugs and just need to be fixed. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 10:01:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A5AA16A403 for ; Fri, 1 Dec 2006 10:01:59 +0000 (UTC) (envelope-from perl@ipchains.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DD4443CA2 for ; Fri, 1 Dec 2006 10:01:45 +0000 (GMT) (envelope-from perl@ipchains.ru) Received: from [80.68.244.38] (account odambaev@rbc.ru [80.68.244.38] verified) by hermes.hw.ru (CommuniGate Pro SMTP 5.0.10) with ESMTPA id 148743174; Fri, 01 Dec 2006 13:01:55 +0300 Message-ID: <456FFD22.3050809@ipchains.ru> Date: Fri, 01 Dec 2006 13:00:02 +0300 From: Oleg Dambaev User-Agent: Thunderbird 1.5.0.5 (X11/20060831) MIME-Version: 1.0 To: "Eldar T. Zaitov" References: 200609181750.58145.jhb@freebsd.org <456FF73B.8020305@tusur.ru> In-Reply-To: <456FF73B.8020305@tusur.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 01 Dec 2006 12:45:18 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: jail2 patchset 14 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 10:01:59 -0000 Eldar T. Zaitov wrote: > Have tried Jail2 patchset #14 on 6.2-PRERELEASE, everything compiles and > works ok, but resolve. > gethostbyname always returns NULL, but host/dig works ok. > here's an example: > > virtual# host mail.ru > mail.ru has address 194.67.57.26 > mail.ru mail is handled by 10 mxs.mail.ru. > virtual# ping mail.ru > ping: cannot resolve mail.ru: Host name lookup failure > > here is some truss output of 'ping mail.ru': > kqueue() = 4 (0x4) > socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) > connect(5,{ AF_INET ***.62.171.***:53 },16) ERR#22 'Invalid argument' > close(5) = 0 (0x0) > socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) > connect(5,{ AF_INET ***.62.171.***:53 },16) ERR#22 'Invalid argument' > close(5) = 0 (0x0) > close(4) = 0 (0x0) > > where > ***.62.171.***:53 is nameserver; > *** is masked ip nodes; > > may be I've forgotten something? > thank you. Hope this would help you: sysctl security.jail.allow_raw_sockets=1 man 8 jail GL From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 13:38:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E544C16A403; Fri, 1 Dec 2006 13:38:36 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE1943CAC; Fri, 1 Dec 2006 13:38:21 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id 0D54C244C19; Fri, 1 Dec 2006 22:38:34 +0900 (JST) Message-ID: <4570305A.4010908@freebsd.org> Date: Fri, 01 Dec 2006 22:38:34 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.8 (X11/20061118) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, freebsd-fs@freebsd.org, rodrigc@crodrigues.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: daichi@freebsd.org, ozawa@ongs.co.jp Subject: [ANN] unionfs patchset-17 release, lock mechanism changed for robust working X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 13:38:37 -0000 Hi Guys! It is my pleasure and honor to announce the availability of the unionfs patchset-17. p17 have some significant improvements around the lock mechanism for robust and stable working. Patchset-17: For 7-current http://people.freebsd.org/~daichi/unionfs/unionfs-p17.diff For 6.x sorry, it is for current only. Changes in unionfs-p17.diff - Fs takes illegal access without lock of lower layer vnode if the both upper/lower layers have both vnode. To fix this problem, we change the lock mechanism to get locks for both upper/lower layer always. - Kernel gets a dead-lock easily within above upper/lower-layer-always-lock-mechanism. To avoide above dead-lock, we changed vfs_lookup.c. By that change, it always locks vnodes parent first and children second. You could see the same lock-order-control implementation around cache_lookup. - It takes the both open/close operations per kernel thread. - It takes readdir-treat-status-management per kernel thread. - It reopens vnode if needed when coping to upper layer on advlock. - mount_unionfs(8) changes option style fitting for fstab(5) style. (by rodrigc) - manual of mount_unionfs(8) was changed. (by rodrigc) The documents of those unionfs patches: http://people.freebsd.org/~daichi/unionfs/ (English) http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese) After release of p16, some folks gave us some panic reports that indicate our implementations has a critical problem around the lock mechanism. After our long researches and discussions, we have tried to re-implement our unionfs lock mechanism. And it is done :) For unionfs lovers (including FreeSBIE developers, ports cluster managers, heavy memory-fs users, or folks use unionfs), could you try p17 please? If p17 solves that panics, we guess it is unionfs merge time for current branch. Thanks P.S. Current English document of web has some Japanese contents. We need a translator ;-) -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 1 19:50:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AACF16A40F for ; Fri, 1 Dec 2006 19:50:48 +0000 (UTC) (envelope-from ralph.zitz@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 411E143CBA for ; Fri, 1 Dec 2006 19:50:18 +0000 (GMT) (envelope-from ralph.zitz@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so2269328uge for ; Fri, 01 Dec 2006 11:50:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=MS8q4lx0lxgSWn0Nn0DibED9p2DVMGIlBXuGa/Hui7Mb3BWiVC/27ccCrO3hLSxHu6CQw7GTf6HkG2Bc9AaV2FCGf7xAy1TDGqHAHFrY4ZaWz68cxsqX5U1X5cgo3Ixob9/Ic92lZ32NfnsPJy0pI4bciMJSvql3w1bNQpIBQ2M= Received: by 10.67.97.7 with SMTP id z7mr7804273ugl.1165002622072; Fri, 01 Dec 2006 11:50:22 -0800 (PST) Received: by 10.67.24.9 with HTTP; Fri, 1 Dec 2006 11:50:22 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 20:50:22 +0100 From: "Ralph Zitz" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Nvidia on amd64 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 19:50:48 -0000 Hello, A while ago there was a post about features missing in FreeBSD in order to allow for the Nvidia driver to work correctly on the amd64 platform. I'm curious if anyone has any information about the progress in this area? Regards, Ralph. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 02:17:52 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D67016A407 for ; Sat, 2 Dec 2006 02:17:52 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.FreeBSD.org (Postfix) with SMTP id B358043C9D for ; Sat, 2 Dec 2006 02:17:34 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 89337 invoked from network); 2 Dec 2006 02:17:51 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 2 Dec 2006 02:17:51 -0000 X-pair-Authenticated: 209.68.2.70 Date: Fri, 1 Dec 2006 20:17:45 -0600 (CST) From: Mike Silbersack To: Joerg Sonnenberger In-Reply-To: <20061121141958.GB721@britannica.bec.de> Message-ID: <20061201200031.C28845@odysseus.silby.com> References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> <20061121115555.Y50450@fledge.watson.org> <20061121141958.GB721@britannica.bec.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 02:17:52 -0000 On Tue, 21 Nov 2006, Joerg Sonnenberger wrote: > The code is integrated in GCC 4.1, patching if needed at all is quite > contained. But we're still running gcc 3.4.6, and won't be moving to gcc 4.1 on 6.x. The gcc 3.4.6 patch is the one we're reluctant to have to support. > The ABI impact is limited to the stack guard cookie, the initialisation > function and the failure handler. Three different solutions can be used: > (1) The code can be part of a separate library (libssp). > (2) The code can be part of libc (DragonFly, OpenBSD and glibc do this). > (3) Like (2), but the cookie is part of the Thread Control Block, e.g. > accessible via %gs. This is done on newer glibc systems and has the > advantage of avoiding PIC references. Can you point me to more information on which systems implement #3? > The original benchmarks done with Propolice by IBM suggest typical > degrations in the area of 2%-5%, depending on how many functions are > called and not inlined and how many of them need to get the protection. > The site of Etoh has more details. One specific question about performance that came up was how much compiling libc with SSP enabled would impact the performance of applications. I also brought up the topic of whether we might consider using the flag to enable SSP for all functions, rather than just the ones which use strings. We need to gather more empirical data on how many recent buffer overflows have been on non-string arrays. Or is the default SSP option to protect all functions using arrays of any type rather than just arrays of strings? Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 02:45:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8B9516A412 for ; Sat, 2 Dec 2006 02:45:32 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E17743C9D for ; Sat, 2 Dec 2006 02:45:14 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB22jVGl031258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Dec 2006 18:45:31 -0800 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB22jVIa001244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 1 Dec 2006 18:45:31 -0800 Message-ID: <4570E8CA.8010609@u.washington.edu> Date: Fri, 01 Dec 2006 18:45:30 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <200607021305.aa75873@nowhere.iedowse.com> <44A87163.1020203@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.1.183432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: unsubscribing from freebsd lists (was "Re: contiguous memory allocation problem") X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 02:45:32 -0000 Kamal R. Prasad wrote: > Hello, > > I would like to unsubscribe myself from all freebsd mailing lists. I have > sent an unsubscribe to freebsd-hackers-unsubscribe, but did not get any > response to verify. Since the admin is on the mailing list, I would > appreciate if you can delete my name and/or email me the procedure to > follow. > > thanks > -kamal > > > > On 7/3/06, Julian Elischer wrote: >> >> Ian Dowse wrote: >> >> >In message <200607021138.11945.hselasky@c2i.net>, Hans Petter Selasky >> writes: >> > >> > >> >>But there is one problem, that has been overlooked, and that is High >> speed >> >>isochronous transfers, which are not supported by the existing USB >> system. I >> >>don't think that the EHCI specification was designed for scatter and >> gather, >> >>when you consider this: >> >> >> >>8 transfers of 0xC00 bytes has to fit on 7 pages. If this is going to >> work, >> >>and I am right, one page has to contain two transfers. (see page 43 of >> >>ehci-r10.pdf) >> >> >> >> >> > >> >I haven't looked into the details, but the text in section 3.3.3 >> >seems to suggest that EHCI is designed to not require physically >> >contiguous allocations here either, so the same approach of using >> >bus_dmamap_load() should work: >> > >> > This data structure requires the associated data buffer to be >> > contiguous (relative to virtual memory), but allows the physical >> > memory pages to be non-contiguous. Seven page pointers are provided >> > to support the expression of 8 isochronous transfers. The seven >> > pointers allow for 3 (transactions) * 1024 (maximum packet size) >> > * 8 (transaction records) (24576 bytes) to be moved with this >> > data structure, regardless of the alignment offset of the first >> > page. >> > >> > >> >> yes, as long as the beffers are contiguous in some virtual space then >> the maximum number of pages they >> can need is 7. >> (they actually fit into 6 but they may start part way through the first >> page and may therefore overflow into a 7th). >> >> >Ian Go to: . Open up each list, enter in your email address near the bottom, press unsubscribe, and you should get an unsubscribe confirmation email-unless your spam blocker or something similar is deleting the confirmation emails. Either that, or you could login with your username and password and delete your subscription that way as well. Again, this has to be done for each mailing list you're subscribed to (or maybe there was a general method from the web interface, but I forget..). Best of luck, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 09:46:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45A0616A40F for ; Sat, 2 Dec 2006 09:46:20 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 267EC43CBD for ; Sat, 2 Dec 2006 09:45:58 +0000 (GMT) (envelope-from antinvidia@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so3594061nfc for ; Sat, 02 Dec 2006 01:46:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=iyl0FRkJrfH1C7SNegrY+QR+T9J7KWN/9l7d3t/bYzueOY6a2TR/GlO1JI46hmzPniJg53I8aiZCGYbf5Z/63teyVNONKTd123ZcH31BpmBjEO/fYhc6Y6hkhIt7cV/wHjwWo43MVNhRBHKUhy5c9g2HTQfCl+/W20DvrmYP7Fc= Received: by 10.78.50.5 with SMTP id x5mr5686940hux.1165052777046; Sat, 02 Dec 2006 01:46:17 -0800 (PST) Received: by 10.78.167.2 with HTTP; Sat, 2 Dec 2006 01:46:16 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2006 09:46:16 +0000 From: MQ To: "Vladimir Terziev" In-Reply-To: <20061129182534.5300947f.vlady@gbservices.biz> MIME-Version: 1.0 References: <20061128204732.3e8790fd.vlady@gbservices.biz> <200611290709.34059.josh@tcbug.org> <20061129182534.5300947f.vlady@gbservices.biz> X-Mailman-Approved-At: Sat, 02 Dec 2006 12:32:00 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Josh Paetzel , freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 09:46:20 -0000 2006/11/29, Vladimir Terziev : > > > The cable and the switch port, both were one and the same in the > test with Broadcom NIC and in the test with D-Link NIC. So, the reason is > not in them for sure. > > I didn't mention in my initial e-mail, that since the swtich is > 100Mbps, the Broadcom NIC was forced to work on 100mbit, full-duplex. For > some reason, when using autodect, the Broadcom NIC negotiates 100mbit, > half-duplex. > > Vladimir > > On Wed, 29 Nov 2006 07:09:33 -0600 > Josh Paetzel wrote: > > > On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > > > Hi, > > > > > > i have a machine with Pentium 4-D processor utilizing > > > FreeBSD-6.1-RELEASE-p10/amd64. > > > > > > The machine is running SMP kernel. > > > > > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > > > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > > > handeled by the ste(4) driver. Machine is targeted for a > > > gateway/firewall and will handle a big amount of network traffic. > > > > > > It seems the bge(4) driver has severe performance problems (may be > > > especially in my configuration). I tried test scp(1) to a remote > > > machine, using one of the BCM5721 NICs. The average speed which has > > > been reached was 200kBps. > > > > > > Just for comparison, when i tryed the same test scp(1), to the > > > same remote machine, but using one of the D-Link DL10050 NICs, the > > > average speed which has been reached was 10MBps. > > > > > > Could someone point me to a good performance tuning document for > > > bge(4) handeled NICs, under SMP kernel or at all? > > > > > > Thanks in advance! > > > > > > Vladimir > > > > So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so > > you're going to run into bus saturation long before you're able to > > max out the throughput on the NICs. > > > > Which isn't to say that 200 kBps isn't a problem, but perhaps you are > > dealing with a bad cable or switchport. > > > > -- > > Thanks, > > > > Josh Paetzel > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > Yes, maybe the current bge(4) has some problems with the media type. When connecting a 5780 to another 5701, it completely refused to work. But when I use the 5701 to work with Intel 82547, it works great. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 16:32:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9BBE16A407 for ; Sat, 2 Dec 2006 16:32:13 +0000 (UTC) (envelope-from stanislav.ochotnicky@kmit.sk) Received: from alibaba.kmit.sk (alibaba.kmit.sk [194.160.28.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 180E243CA2 for ; Sat, 2 Dec 2006 16:31:52 +0000 (GMT) (envelope-from stanislav.ochotnicky@kmit.sk) Received: from localhost (localhost.localdomain [127.0.0.1]) by alibaba.kmit.sk (Postfix) with ESMTP id 7D62D7F96 for ; Sat, 2 Dec 2006 17:32:12 +0100 (CET) Received: from [10.10.0.6] (gw.kmit.sk [194.160.28.62]) by alibaba.kmit.sk (Postfix) with ESMTP id E42A27F94 for ; Sat, 2 Dec 2006 17:32:11 +0100 (CET) Message-ID: <4571AA86.1060303@kmit.sk> Date: Sat, 02 Dec 2006 17:32:06 +0100 From: Stanislav Ochotnicky MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Subject: tracing AND intercepting syscalls? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 16:32:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi I'm doing some research concerning tracing and intercepting of syscalls. Ideally this would be done in userspace. It doesn't have to be system-wide. It would be enough if I could fork/exec new process, and somehow be noticed every time it makes syscall, with ability to alter arguments/return values. I (more or less) need similar interface like linux ptrace when called with PTRACE_SYSCALL. systrace utility does the same thing in OpenBSD/linux. I've been through some mailing lists and their archives, read FreeBSD developers guide,TrustedBSD's MAC framework intro, man pages, asked on IRC and god knows what else and couldn't find a solution. Here's what I have found out so far about interfaces that resemble what I need: ptrace: unable to trace syscalls, only singlestep, this would be too slow imho, not mentioning problems with identifying syscalls. /proc interface: more or less like ptrace, better with modifying memory of process etc. but also unable to trace syscalls ktrace: almost there, able to trace syscalls, but it only writes them to file, and thus i cannot intercept them. trustedbsd's MAC framework: i've read manual, looked at source etc. And I couldn't find a way to stop at every syscall certain process has made. There is mac_syscall() function but as far as I could tell, it only registers new syscall. All in all, it seems that it should have some way to do this, maybe I just couldn't find it. If kernel module/change is needed I would appreciate push in right direction. Any help would be appreciated. Thanks in advance Stanislav Ochotnicky -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFcaqGul7h5FTXf/MRCDDDAJ4jkBkfkb09PJhM83ZXUI27HH81YgCfeBC+ 6YbAsDWcCbvWDmPGiU655RU= =sZgU -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 19:48:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E3F616A40F for ; Sat, 2 Dec 2006 19:48:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2710643CA3 for ; Sat, 2 Dec 2006 19:48:22 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kB2JmfP2099124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Dec 2006 21:48:41 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kB2Jmexc064162; Sat, 2 Dec 2006 21:48:40 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kB2JmeMi064161; Sat, 2 Dec 2006 21:48:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 2 Dec 2006 21:48:40 +0200 From: Kostik Belousov To: Stanislav Ochotnicky Message-ID: <20061202194840.GD35681@deviant.kiev.zoral.com.ua> References: <4571AA86.1060303@kmit.sk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pZs/OQEoSSbxGlYw" Content-Disposition: inline In-Reply-To: <4571AA86.1060303@kmit.sk> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL, UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: tracing AND intercepting syscalls? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 19:48:46 -0000 --pZs/OQEoSSbxGlYw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 02, 2006 at 05:32:06PM +0100, Stanislav Ochotnicky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > Hi >=20 > I'm doing some research concerning tracing and intercepting of syscalls. > Ideally this would be done in userspace. It doesn't have to be > system-wide. It would be enough if I could fork/exec new process, and > somehow be noticed every time it makes syscall, with ability to alter > arguments/return values. I (more or less) need similar interface like > linux ptrace when called with PTRACE_SYSCALL. systrace utility does the > same thing in OpenBSD/linux. I've been through some mailing lists and > their archives, read FreeBSD developers guide,TrustedBSD's MAC framework > intro, man pages, asked on IRC and god knows what else and couldn't find > a solution. Here's what I have found out so far about interfaces that > resemble what I need: >=20 > ptrace: unable to trace syscalls, only singlestep, this would be too > slow imho, not mentioning problems with identifying syscalls. >=20 Did you look at PT_SYSCALL, PT_TO_SCE and PT_TO_SCX ptrace(2) facilities ? > /proc interface: more or less like ptrace, better with modifying memory > of process etc. but also unable to trace syscalls Read the man pages and code of the truss(1) and strace(1) utilities. Truss is available in base system, strace is in the ports. >=20 > ktrace: almost there, able to trace syscalls, but it only writes them to > file, and thus i cannot intercept them. >=20 > trustedbsd's MAC framework: i've read manual, looked at source etc. And > I couldn't find a way to stop at every syscall certain process has made. > There is mac_syscall() function but as far as I could tell, it only > registers new syscall. All in all, it seems that it should have some way > to do this, maybe I just couldn't find it. >=20 > If kernel module/change is needed I would appreciate push in right > direction. --pZs/OQEoSSbxGlYw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFcdiXC3+MBN1Mb4gRAkAMAJ93SvYCHPbI4WJCna8WhsAdZ0If8wCfabyR eDaE3BrA1QqJeR91Ot19fkE= =tdbZ -----END PGP SIGNATURE----- --pZs/OQEoSSbxGlYw-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 22:30:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A96C16A407 for ; Sat, 2 Dec 2006 22:30:16 +0000 (UTC) (envelope-from deathjestr@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id D540943CA2 for ; Sat, 2 Dec 2006 22:29:52 +0000 (GMT) (envelope-from deathjestr@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so3084412wxc for ; Sat, 02 Dec 2006 14:30:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a/Y31m4TPW4KyVH8jluNrssxA+d73z5AVGkSg8DQ02XKRoajra5Pyx00d9vDKLGo7wdYtlVzJXwOCrT7COvxbgAvGiSFBh5oUC9z/5a7901X7hp52Anr2scZ6H0s4PhhHn/ljQBeoPgvaFH6h+H0NKOG1Q3hgK74tSAT8YzQGbY= Received: by 10.90.113.20 with SMTP id l20mr6641807agc.1165098614484; Sat, 02 Dec 2006 14:30:14 -0800 (PST) Received: by 10.90.96.5 with HTTP; Sat, 2 Dec 2006 14:30:14 -0800 (PST) Message-ID: <44b564930612021430y3a11deccy21d1d98ab49435dd@mail.gmail.com> Date: Sat, 2 Dec 2006 17:30:14 -0500 From: "Michael M. Press" To: freebsd-hackers@freebsd.org In-Reply-To: <456df75b.35a.4d51.31890@clear.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <456df75b.35a.4d51.31890@clear.net.nz> Subject: Re: USB keyboard problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 22:30:16 -0000 > I have a usb keyboard (Genius slimstar pro) and am having > the same problems as others are experiencing. When the kb > is first loaded, the two modifiers ctrl and shift are > "stuck" on. This results in keys like d exiting your > terminal. If you hit ctrl and shift on another kb (I have > an at kb hooked up as well) it resets these modifiers. > Once this has been done, a majority of the keys (a-z, 1-0 > etc...) work as they should. None of the modifier keys > work though. I think I found a way to duplicate this problem with a "working" USB keyboard. I have a Memorex MX2710 that I have never had any problems with on FreeBSD. If I: 1. Hold down left control and left shift on the keyboard 2. Unplug the keyboard from the running system 3. Release left control and left shift 4. Plug the keyboard back in ...I seem to have similar issues (hitting d sends ctrl-D, etc.). I'm running 6.2 prerelease from October 29. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 23:36:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF35116A407 for ; Sat, 2 Dec 2006 23:36:03 +0000 (UTC) (envelope-from bsd.devil@gmail.com) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54BC343CA3 for ; Sat, 2 Dec 2006 23:35:40 +0000 (GMT) (envelope-from bsd.devil@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so1650650nzh for ; Sat, 02 Dec 2006 15:36:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=hf3qAxioqY8fs6+P3fw+SANNA9hz8Ay/GsCxZ/GMvfwmcON6JfXf9DKCSqLahlhkE55tcx9SgwenR2KDdP4Y+P9RXxPtVEEXgr3V3I9oi4vpfWNWl3CnRi3Z81ftOZzCvHWDufzJZsIpPNChUPwIrEhKuBcfh229mRX81oEsYNc= Received: by 10.64.243.10 with SMTP id q10mr10173651qbh.1165102562501; Sat, 02 Dec 2006 15:36:02 -0800 (PST) Received: by 10.65.249.17 with HTTP; Sat, 2 Dec 2006 15:36:02 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2006 18:36:02 -0500 From: "Vishal Patil" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Tools for FreeBSD development X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 23:36:03 -0000 I have recently moved over from Linux to FreeBSD and would like to know if there is something similar to UML (User Mode Linux) for doing kernel development for FreeBSD. Reading different mailing lists, wikis etc it seems that "qemu" seems to be the best option. Is this tool used by most of the FreeBSD developers? Thanks. - Vishal From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 23:38:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C51C16A417 for ; Sat, 2 Dec 2006 23:38:35 +0000 (UTC) (envelope-from bsd.devil@gmail.com) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D0BC43CA3 for ; Sat, 2 Dec 2006 23:38:11 +0000 (GMT) (envelope-from bsd.devil@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so1650746nzh for ; Sat, 02 Dec 2006 15:38:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Wm7gU4b2wpt9jr/ye+hy0/t5x5fJAsEGfgwym2RSmulv2/jMCjrsO5FAUOVAe/v4DEdLuOwBM1F9dc6oAr+/WFvkv2C2cZC4UNCHgd2ePmM/us1DI6rXPS+LeiZoZIv0m1paBrvF68bxXjnpQhpAY3XjVHzX6kcC8H4k7pRb+K8= Received: by 10.65.235.7 with SMTP id m7mr10193269qbr.1165102713922; Sat, 02 Dec 2006 15:38:33 -0800 (PST) Received: by 10.65.249.17 with HTTP; Sat, 2 Dec 2006 15:38:33 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2006 18:38:33 -0500 From: "Vishal Patil" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: BootCache for FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 23:38:35 -0000 Is anyone working on the idea of implementing BootCache for FreeBSD? MacOS has this idea implemented http://www.osxbook.com/book/bonus/misc/optimizations and I was wondering if FreeBSD had such an implementation. I think it would be especially usefull for laptops and desktops with slow drives that run FreeBSD. - Vishal From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 2 23:28:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 127DB16A407 for ; Sat, 2 Dec 2006 23:28:59 +0000 (UTC) (envelope-from bsd.devil@gmail.com) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.233]) by mx1.FreeBSD.org (Postfix) with ESMTP id 581FF43CA3 for ; Sat, 2 Dec 2006 23:28:35 +0000 (GMT) (envelope-from bsd.devil@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so1650363nzh for ; Sat, 02 Dec 2006 15:28:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=TzMDxNjlgUdZRUA4UcqwQI2kTzvaNjG2aHsKu0QTERwrJ/bgeHkTvNnMHNrLklb71V5QSc7By3ozP3zU5S8VWTCbai99QCtIdP2sinJ9AWwOoKpQjqjBvxN1lcjh1LcaQmDB6nOMLsDUmZjlhiiRoAps+I0VnWqvxApefz3S6m4= Received: by 10.65.122.20 with SMTP id z20mr9421506qbm.1165102137554; Sat, 02 Dec 2006 15:28:57 -0800 (PST) Received: by 10.65.249.17 with HTTP; Sat, 2 Dec 2006 15:28:57 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2006 18:28:57 -0500 From: "Vishal Patil" To: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org. In-Reply-To: MIME-Version: 1.0 References: X-Mailman-Approved-At: Sat, 02 Dec 2006 23:56:47 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Tools for FreeBSD development X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 23:28:59 -0000 I have recently moved over from Linux to FreeBSD and would like to if there is something similar to UML (User Mode Linux) for doing kernel development for FreeBSD. Reading different mailing lists, wikis etc it seems that "qemu" seems to be the best option. Is this tool used by most of the FreeBSD developers? Thanks. - Vishal