From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 01:01: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD0F016A41F for ; Sun, 1 Jan 2006 01:01:54 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from smartmx-04.inode.at (smartmx-04.inode.at [213.229.60.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55AC443D45 for ; Sun, 1 Jan 2006 01:01:54 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from [85.124.24.193] (port=52001 helo=[192.168.1.11]) by smartmx-04.inode.at with esmtp (Exim 4.50) id 1Esrbd-0007gH-DE; Sun, 01 Jan 2006 02:01:53 +0100 Message-ID: <43B72A00.2010503@inode.at> Date: Sun, 01 Jan 2006 02:01:52 +0100 From: Armin Pirkovitsch User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Martin Cracauer References: <43B6C134.6060802@inode.at> <20051231135851.A65762@cons.org> In-Reply-To: <20051231135851.A65762@cons.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 01 Jan 2006 01:01:54 -0000 Martin Cracauer wrote: > Armin Pirkovitsch wrote on Sat, Dec 31, 2005 at 06:34:44PM +0100: > >>Hi! >> >> I have some troubles with my notebook and any version of FreeBSD >>(starting with 6 since my sata controller wasn't supported earlier). >>It looks like as it would end up in a deadlock which means i have no >>access to the debugger nor to any other kind of tracing methods. >>Even with KTR, WITTNESS and DIAGNOSTIC enabled in the kerenl I get no >>message what went wrong or what might have caused the trouble. >>These fullstops always turn up when i compile and install programs (or >>sometimes during the installation of FreeBSD itself) >>Hardware: >>Intel Pentium-M 760 (Centrino, 2GHz) >>VIA VT 6421 SATA Controller >>80GB Samsung SATA HD >> >>I guess one of those parts creates the trouble, but I have no idea how >>to trace it... >>Is there a way to run the whole thing in some kind of debugger? >>Or is there a diffrent way to locate the problem? > > > It's more likely to be a general instability from broken hardware. > > Use prime95 (ports/math/mprime) to test your processor and thermal > stability (36 hours or so), and memtest86 (seperately). I guess I should have mentioned that other systems work fine and run stable (and memtest returns no errors) (Linux was up several days compiling stuff like OO etc) -- Armin Pirkovitsch a.pirko@inode.at From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 01:46: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E722716A41F for ; Sun, 1 Jan 2006 01:46:47 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8FBC43D7B for ; Sun, 1 Jan 2006 01:46:34 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so213568wxc for ; Sat, 31 Dec 2005 17:46: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:cc:in-reply-to:mime-version:content-type:references; b=CouN2wF92Uv9cuu0oUHc+wGi4GqpoUuaFpl/DlRvvN4XuOKqs5C7n7k7jAv8c+rOx1DsHvl3cYLiHnNpy4kTnppAP4+v37XjyjPbFqUituQIIm9KgDHQWvkGmonWqBH0t4pjLPQLPdMJ6iIP0v5Y4FptjQE6/adYRDYzGYjjeqU= Received: by 10.70.7.19 with SMTP id 19mr11202045wxg; Sat, 31 Dec 2005 17:46:34 -0800 (PST) Received: by 10.70.39.18 with HTTP; Sat, 31 Dec 2005 17:46:34 -0800 (PST) Message-ID: <1fa17f810512311746u1b07731dx1326c936910424c8@mail.gmail.com> Date: Sun, 1 Jan 2006 09:46:34 +0800 From: prime To: ari edelkind In-Reply-To: <20051231191024.GF15481@episec.com> MIME-Version: 1.0 References: <1fa17f810512310901lbabc8ddj630fcf2a79691ba1@mail.gmail.com> <20051231191024.GF15481@episec.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Problem about libnet on FreeBSD 6.0 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, 01 Jan 2006 01:46:48 -0000 On 1/1/06, ari edelkind wrote: > > Did you read my post? > Or are you not on the list? I sent my response directly to the list, > not including you specifically. > > ari > > guomingyan@gmail.com wrote: > > [...] > > In my opinion,struct ether_addr is defined both in > > and libnet-headers.h,and we need > > include these two header files at the same time. > > > > And here is my include lines > [...] > I am on the list,and I don't receive your post. I think you can send post specifically to me and cc to the list :-). Thanks. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 02:11:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80E0616A41F for ; Sun, 1 Jan 2006 02:11:57 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B1CE43D5C for ; Sun, 1 Jan 2006 02:11:57 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 75880 invoked by uid 1024); 1 Jan 2006 02:11:56 -0000 Date: Sat, 31 Dec 2005 21:11:56 -0500 From: ari edelkind To: prime Message-ID: <20060101021156.GF33131@episec.com> Mail-Followup-To: ari edelkind , prime , freebsd-hackers@freebsd.org References: <1fa17f810512310901lbabc8ddj630fcf2a79691ba1@mail.gmail.com> <20051231191024.GF15481@episec.com> <1fa17f810512311746u1b07731dx1326c936910424c8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fa17f810512311746u1b07731dx1326c936910424c8@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Problem about libnet on FreeBSD 6.0 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, 01 Jan 2006 02:11:57 -0000 guomingyan@gmail.com wrote: > > Did you read my post? > > Or are you not on the list? I sent my response directly to the list, > > not including you specifically. [...] > I am on the list,and I don't receive your post. > I think you can send post specifically to me and cc > to the list :-). > Thanks. In the future, please respond to personal mails personally. Neither my direct e-mail address nor this mail were intended for public viewing. The post to which i was referring is: http://lists.freebsd.org/pipermail/freebsd-hackers/2005-December/014986.html ari From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 03:37: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CE3D16A41F for ; Sun, 1 Jan 2006 03:37:22 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from skippyii.compar.com (old.compar.com [216.208.38.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3687343D53 for ; Sun, 1 Jan 2006 03:37:20 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from hermes (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [70.28.254.189]) by skippyii.compar.com (8.13.1/8.13.1) with ESMTP id k013cGib035086; Sat, 31 Dec 2005 22:38:17 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <007e01c60e84$bdfe0110$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "ari edelkind" , "prime" References: <1fa17f810512310901lbabc8ddj630fcf2a79691ba1@mail.gmail.com><20051231191024.GF15481@episec.com><1fa17f810512311746u1b07731dx1326c936910424c8@mail.gmail.com> <20060101021156.GF33131@episec.com> Date: Sat, 31 Dec 2005 22:37:49 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Cc: freebsd-hackers@freebsd.org Subject: Re: Problem about libnet on FreeBSD 6.0 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, 01 Jan 2006 03:37:22 -0000 > guomingyan@gmail.com wrote: > > > > Did you read my post? > > > Or are you not on the list? I sent my response directly to the list, > > > not including you specifically. > [...] > > I am on the list,and I don't receive your post. > > I think you can send post specifically to me and cc > > to the list :-). > > Thanks. > > In the future, please respond to personal mails personally. Neither my > direct e-mail address nor this mail were intended for public viewing. > > The post to which i was referring is: > http://lists.freebsd.org/pipermail/freebsd-hackers/2005-December/014986.html The problem is that libnet defines ether_addr without regard for the fact that it's defined in our system headers. This is a bug in libnet, not FreeBSD. In particular, libnet/libnet-headers.h has this code, which is very Linux-centric and works around the duplicate definition problem on Linux, but doesn't help anyone on other platforms. 391 #if (!__GLIBC__) 392 struct ether_addr 393 { 394 u_char ether_addr_octet[6]; 395 }; 396 #endif The problem has been properly fixed in the current development version of libnet (net/libnet-devel), by renaming the ether_addr structure to libnet_ether_addr. The net/libnet port should be marked BROKEN because of this issue (I've opened a PR) and folks should use libnet-devel instead, until the net/libnet port is updated to a newer version. The net/libnet maintainer has been notified of this problem. Regards, -- Matt Emmerton From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 06:19: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B62F16A41F for ; Sun, 1 Jan 2006 06:19:23 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8D2843D48 for ; Sun, 1 Jan 2006 06:19:22 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.3/8.12.9) with ESMTP id k016JLBF076086; Sun, 1 Jan 2006 07:19:21 +0100 (CET) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.13.3/8.12.9/Submit) id k016JLHq076085; Sun, 1 Jan 2006 01:19:21 -0500 (EST) (envelope-from cracauer) Date: Sun, 1 Jan 2006 01:19:20 -0500 From: Martin Cracauer To: Armin Pirkovitsch Message-ID: <20060101011920.A76058@cons.org> References: <43B6C134.6060802@inode.at> <20051231135851.A65762@cons.org> <43B72A00.2010503@inode.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <43B72A00.2010503@inode.at>; from a.pirko@inode.at on Sun, Jan 01, 2006 at 02:01:52AM +0100 Cc: freebsd-hackers@freebsd.org, Martin Cracauer Subject: Re: Deadlock FreeBSD 6 / 7 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, 01 Jan 2006 06:19:23 -0000 > > It's more likely to be a general instability from broken hardware. > > > > Use prime95 (ports/math/mprime) to test your processor and thermal > > stability (36 hours or so), and memtest86 (seperately). > > I guess I should have mentioned that other systems work fine and run > stable (and memtest returns no errors) > (Linux was up several days compiling stuff like OO etc) Still, we have seen that several times before, machine stable in Linux, not in FreeBSD and vice versa. Using prime95/mprime ist the best way to ensure this. Run it for 36 hours in the torture test mode. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/ From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 07:21: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D222F16A41F for ; Sun, 1 Jan 2006 07:21:51 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ACF543D45 for ; Sun, 1 Jan 2006 07:21:51 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so230529wxc for ; Sat, 31 Dec 2005 23:21:50 -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=qqTsGNV7yx98E3RMcEcbFu6uVZ4Fw0ljeng+cyt/uBq7P9Z9ZxTgtsNcWAMpTgHL3ziA6LUetZMPoJ0BV+fobu2dnhp5boAWABsUIY0Zs558etNwBAzr0LrzNjls3rddCFn6U3w00sNW+9UZwgEQdELZRGGtayYNoO5gc0rFgG0= Received: by 10.70.26.8 with SMTP id 8mr11262783wxz; Sat, 31 Dec 2005 23:21:51 -0800 (PST) Received: by 10.70.39.18 with HTTP; Sat, 31 Dec 2005 23:21:50 -0800 (PST) Message-ID: <1fa17f810512312321n619291a0l59473e11af5cb147@mail.gmail.com> Date: Sun, 1 Jan 2006 15:21:50 +0800 From: prime To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: An idea of remove MUTEX_WAKE_ALL 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, 01 Jan 2006 07:21:51 -0000 Hi hackers, I have an idea about remove the kernel option MUTEX_WAKE_ALL. When we unlock the mutex(in _mtx_unlock_sleep),we can directly give the lock to the first thread waiting on the turnstile.And a thread gets the mutex after he returned from turnstile_wait so he can simply jump out the _obtain_lock loop in _mtx_lock_sleep. This makes a mutex always be owned by a thread when there are threads waiting on the turnstile,so priority inheritance can work now. This idea need only a few changes in kern/kern_mutex.c .But when NO_ADAPTIVE_MUTEXS not set,it makes threads that spinning on other CPU to get the mutex have to spin for a long time,and this makes the short term mutex more expensive(maybe should use spin mutex instead). What do think about the idea? Thanks. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 09:22:50 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FBDC16A41F for ; Sun, 1 Jan 2006 09:22:50 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id B75B343D55 for ; Sun, 1 Jan 2006 09:22:49 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 81234 invoked by uid 1024); 1 Jan 2006 09:22:49 -0000 Date: Sun, 1 Jan 2006 04:22:49 -0500 From: ari edelkind To: freebsd-hackers@freebsd.org Message-ID: <20060101092249.GH15481@episec.com> Mail-Followup-To: ari edelkind , freebsd-hackers@freebsd.org References: <20060101021156.GF33131@episec.com> <007e01c60e84$bdfe0110$1200a8c0@gsicomp.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007e01c60e84$bdfe0110$1200a8c0@gsicomp.on.ca> Subject: Re: Problem about libnet on FreeBSD 6.0 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, 01 Jan 2006 09:22:50 -0000 matt@gsicomp.on.ca wrote: > > http://lists.freebsd.org/pipermail/freebsd-hackers/2005-December/014986.html > > The problem is that libnet defines ether_addr without regard for the fact > that it's defined in our system headers. This is a bug in libnet, not > FreeBSD. No one claimed otherwise -- hence the 'BROKEN_LIBNET' tag in my post. > In particular, libnet/libnet-headers.h has this code, which is very > Linux-centric and works around the duplicate definition problem on Linux, > but doesn't help anyone on other platforms. > > 391 #if (!__GLIBC__) This is typical for libnet, and it has run into compatibility problems of this sort in the past on systems other than freebsd. Search for "edelkind libnet" or "redefinition libnet" on google for some of these. ari From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 16:49: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C032B16A41F for ; Sun, 1 Jan 2006 16:49:23 +0000 (GMT) (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 7621443D5A for ; Sun, 1 Jan 2006 16:49:23 +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 D1AE846B7F; Sun, 1 Jan 2006 11:49:22 -0500 (EST) Date: Sun, 1 Jan 2006 16:49:22 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Armin Pirkovitsch In-Reply-To: <43B6C134.6060802@inode.at> Message-ID: <20060101163522.Y74401@fledge.watson.org> References: <43B6C134.6060802@inode.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 01 Jan 2006 16:49:24 -0000 On Sat, 31 Dec 2005, Armin Pirkovitsch wrote: > I have some troubles with my notebook and any version of FreeBSD (starting > with 6 since my sata controller wasn't supported earlier). It looks like as > it would end up in a deadlock which means i have no access to the debugger > nor to any other kind of tracing methods. Even with KTR, WITTNESS and > DIAGNOSTIC enabled in the kerenl I get no message what went wrong or what > might have caused the trouble. These fullstops always turn up when i compile > and install programs (or sometimes during the installation of FreeBSD > itself) Hardware: Intel Pentium-M 760 (Centrino, 2GHz) VIA VT 6421 SATA > Controller 80GB Samsung SATA HD > > I guess one of those parts creates the trouble, but I have no idea how to > trace it... Is there a way to run the whole thing in some kind of debugger? > Or is there a diffrent way to locate the problem? The usual first step to debug a deadlock, if WITNESS or INVARIANTS doesn't trigger dropping you into the debugger, is to break into the debugger using a console or serial break. To do this, you need to compile: options BREAK_TO_DEBUGGER options DDB into your kernel. On syscons (not in X11), you can hit Ctrl-Alt-Escape to try to get to the debugger, or send a serial break. The serial break is often more reliable, and the nice thing about running DDB on a serial console from a second machine is that you can easily copy/paste debug output. Once you're in the debugger, you can list the threads, locks held, trace stacks, and so on. If you can't get into the debugger using a serial break, then usually the next thing you have to try is using an NMI. Unfortunately, most hardware doesn't ship with an NMI button, although some server hardware vendors now provide them. In the vast majority of cases, a serial break will get to the debugger, and in many cases, so will a console break. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 22:44:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1776916A41F for ; Sun, 1 Jan 2006 22:44:09 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from smartmx-04.inode.at (smartmx-04.inode.at [213.229.60.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id A05D643D55 for ; Sun, 1 Jan 2006 22:44:08 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from [85.124.24.193] (port=55579 helo=[192.168.1.11]) by smartmx-04.inode.at with esmtp (Exim 4.50) id 1EtBvr-0007hZ-Jc; Sun, 01 Jan 2006 23:44:07 +0100 Message-ID: <43B85B36.6040603@inode.at> Date: Sun, 01 Jan 2006 23:44:06 +0100 From: Armin Pirkovitsch User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Martin Cracauer References: <43B6C134.6060802@inode.at> <20051231135851.A65762@cons.org> <43B72A00.2010503@inode.at> <20060101011920.A76058@cons.org> In-Reply-To: <20060101011920.A76058@cons.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 01 Jan 2006 22:44:09 -0000 Martin Cracauer wrote: >>>It's more likely to be a general instability from broken hardware. >>> >>>Use prime95 (ports/math/mprime) to test your processor and thermal >>>stability (36 hours or so), and memtest86 (seperately). >> >>I guess I should have mentioned that other systems work fine and run >>stable (and memtest returns no errors) >>(Linux was up several days compiling stuff like OO etc) > > > Still, we have seen that several times before, machine stable in > Linux, not in FreeBSD and vice versa. > > Using prime95/mprime ist the best way to ensure this. Run it for 36 > hours in the torture test mode. 10 hours returned no error nor a warning (I'm pretty impatient...) -- Armin Pirkovitsch a.pirko@inode.at From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 22:48: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 101E216A420; Sun, 1 Jan 2006 22:48:24 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from smartmx-04.inode.at (smartmx-04.inode.at [213.229.60.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87AA943D62; Sun, 1 Jan 2006 22:48:20 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from [85.124.24.193] (port=58728 helo=[192.168.1.11]) by smartmx-04.inode.at with esmtp (Exim 4.50) id 1EtBzv-0001EA-NC; Sun, 01 Jan 2006 23:48:19 +0100 Message-ID: <43B85C33.90000@inode.at> Date: Sun, 01 Jan 2006 23:48:19 +0100 From: Armin Pirkovitsch User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <43B6C134.6060802@inode.at> <20060101163522.Y74401@fledge.watson.org> In-Reply-To: <20060101163522.Y74401@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 01 Jan 2006 22:48:24 -0000 Robert Watson wrote: > > On Sat, 31 Dec 2005, Armin Pirkovitsch wrote: > >> I have some troubles with my notebook and any version of FreeBSD >> (starting with 6 since my sata controller wasn't supported earlier). >> It looks like as it would end up in a deadlock which means i have no >> access to the debugger nor to any other kind of tracing methods. Even >> with KTR, WITTNESS and DIAGNOSTIC enabled in the kerenl I get no >> message what went wrong or what might have caused the trouble. These >> fullstops always turn up when i compile and install programs (or >> sometimes during the installation of FreeBSD itself) Hardware: Intel >> Pentium-M 760 (Centrino, 2GHz) VIA VT 6421 SATA Controller 80GB >> Samsung SATA HD >> >> I guess one of those parts creates the trouble, but I have no idea how >> to trace it... Is there a way to run the whole thing in some kind of >> debugger? Or is there a diffrent way to locate the problem? > > > The usual first step to debug a deadlock, if WITNESS or INVARIANTS > doesn't trigger dropping you into the debugger, is to break into the > debugger using a console or serial break. To do this, you need to compile: > > options BREAK_TO_DEBUGGER > options DDB > > into your kernel. On syscons (not in X11), you can hit Ctrl-Alt-Escape > to try to get to the debugger, or send a serial break. The serial break > is often more reliable, and the nice thing about running DDB on a serial > console from a second machine is that you can easily copy/paste debug > output. Once you're in the debugger, you can list the threads, locks > held, trace stacks, and so on. > > If you can't get into the debugger using a serial break, then usually > the next thing you have to try is using an NMI. Unfortunately, most > hardware doesn't ship with an NMI button, although some server hardware > vendors now provide them. In the vast majority of cases, a serial break > will get to the debugger, and in many cases, so will a console break. I added options BREAK_TO_DEBUGGER and used make buildkernel and make installkernel.debug and was not able to reconstruct the crash. I guess the debug stuff slowed it down enough to not come to the bug... (even installworld worked fine, which usually kills it) So this is what I feared - the debug stuff changes the timing by slowing it down which makes it pretty hard to reconstruct the crash... Is there any other way? (btw. it's a notebook, so there is no old serial bus) -- Armin Pirkovitsch a.pirko@inode.at From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 06:06:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CCD816A41F for ; Mon, 2 Jan 2006 06:06:11 +0000 (GMT) (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 E18D243D49 for ; Mon, 2 Jan 2006 06:06:10 +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 930DE46BAB; Mon, 2 Jan 2006 01:06:09 -0500 (EST) Date: Mon, 2 Jan 2006 06:06:09 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Armin Pirkovitsch In-Reply-To: <43B85C33.90000@inode.at> Message-ID: <20060102060259.X2892@fledge.watson.org> References: <43B6C134.6060802@inode.at> <20060101163522.Y74401@fledge.watson.org> <43B85C33.90000@inode.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 02 Jan 2006 06:06:11 -0000 On Sun, 1 Jan 2006, Armin Pirkovitsch wrote: > Robert Watson wrote: >>> I guess one of those parts creates the trouble, but I have no idea how to >>> trace it... Is there a way to run the whole thing in some kind of >>> debugger? Or is there a diffrent way to locate the problem? >> >> The usual first step to debug a deadlock, if WITNESS or INVARIANTS doesn't >> trigger dropping you into the debugger, is to break into the debugger using >> a console or serial break. To do this, you need to compile: > > I added options BREAK_TO_DEBUGGER and used make buildkernel and make > installkernel.debug and was not able to reconstruct the crash. I guess the > debug stuff slowed it down enough to not come to the bug... (even > installworld worked fine, which usually kills it) So this is what I feared - > the debug stuff changes the timing by slowing it down which makes it pretty > hard to reconstruct the crash... Is there any other way? (btw. it's a > notebook, so there is no old serial bus) Try compiling in only options DDB and BREAK_TO_DEBUGGER. Even without the fully debugging features on, it may be enough to give us some initial insight into the source of the problem. Does your notebook have firewire support? Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 06:12: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6262E16A41F for ; Mon, 2 Jan 2006 06:12:51 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from skippyii.compar.com (cistore.compar.com [216.208.38.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79BA243D48 for ; Mon, 2 Jan 2006 06:12:50 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from hermes (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [70.28.254.189]) by skippyii.compar.com (8.13.1/8.13.1) with ESMTP id k026EA5b074067 for ; Mon, 2 Jan 2006 01:14:10 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <001801c60f63$b004ee90$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: Date: Mon, 2 Jan 2006 01:13:44 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Compiling kernel/modules without INET? 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, 02 Jan 2006 06:12:51 -0000 Howdy, One of my new years resolutions was to become a bit more masochistic, so I set out to see if I could build a kernel (and modules) without "options INET" on HEAD. This works flawlessly for the kernel part, but there are tons of issues when building modules -- various problems encountered during "make depend" and "make". So far there appear to be four different classes of errors: 1) Failures during "make depend" due to #error directives hit when INET is not defined. 2) #includes which are always needed but are only pulled in (implicitly) when INET is defined 3) Small blocks of code (variable declarations and tests) which are not wrapped with #ifdef INET (or other #defines), or simply wrapped with the wrong #ifdef 4) Larger messes such as GRE's hard-coded dependence on INET; SLIP/PPP's dependence on packet compress code, etc. I have what I think are valid fixes for the first 3 issues, but I know I'm just making a mess of things to resolve the last issue. Before I spit and polish these patches for public consumption, I want to know if this is even a worthy project. I know there are benefits simply because we should "do the right thing", but I'm sure I'm wading into murky waters. Any guidance would be appreciated. Regards, -- Matt Emmerton From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 07:49:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60D2916A41F for ; Mon, 2 Jan 2006 07:49:38 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: from mailgate.cesmail.net (mailgate.cesmail.net [216.154.195.36]) by mx1.FreeBSD.org (Postfix) with SMTP id 8382843D48 for ; Mon, 2 Jan 2006 07:49:37 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: (qmail 20542 invoked from network); 2 Jan 2006 07:49:36 -0000 Received: from unknown (HELO epsilon.cesmail.net) (192.168.1.40) by mailgate.cesmail.net with SMTP; 2 Jan 2006 07:49:36 -0000 Received: (qmail 15076 invoked by uid 99); 2 Jan 2006 07:49:36 -0000 Received: from interne-05-23.anon.t-online.fr (interne-05-23.anon.t-online.fr [213.44.125.23]) by webmail.spamcop.net (Horde) with HTTP for ; Mon, 2 Jan 2006 08:49:36 +0100 Message-ID: <20060102084936.ibffupwgcs4skw4g@webmail.spamcop.net> Date: Mon, 2 Jan 2006 08:49:36 +0100 From: Gilbert Fernandes To: freebsd-hackers@freebsd.org References: <43B6C134.6060802@inode.at> <20051231135851.A65762@cons.org> <43B72A00.2010503@inode.at> <20060101011920.A76058@cons.org> <43B85B36.6040603@inode.at> In-Reply-To: <43B85B36.6040603@inode.at> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs Subject: Re: Deadlock FreeBSD 6 / 7 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, 02 Jan 2006 07:49:38 -0000 > >>>Use prime95 (ports/math/mprime) to test your processor and thermal > >>>stability (36 hours or so), and memtest86 (seperately). Please use memtest86+ and not memtest86. -- unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 07:51: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F253D16A41F; Mon, 2 Jan 2006 07:51:44 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ABC143D55; Mon, 2 Jan 2006 07:51:44 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1EtKTm-0002vl-Ku; Mon, 02 Jan 2006 09:51:42 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Dario Freni In-reply-to: Your message of Thu, 29 Dec 2005 17:07:34 +0100 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 02 Jan 2006 09:51:42 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, daichi@freebsd.org Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 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, 02 Jan 2006 07:51:45 -0000 > Masanori OZAWA wrote: > [...] > > Nice work! This is just a "works for me". In only find some issues with > permissions that were already present in the previous implementation of > unionfs. Some of them are partially corrected in the "useful" copymode. > I mailed the details to the author. the following will hang the kernel: root is mounted nfs, /etc is unionfs'ed so: from /etc/rc.initdiskless: ... # Create a generic memory disk # mount_md() { /sbin/mdmfs -i 4096 -s $1 -M md $2 } kldload unionfs mount_md 4096 /.etc mount_unionfs /.etc /etc ... and now: cd /etc mv some-file somefile and now the system is stuck. this behaviour is also present in the unpatched unionfs, but would be nice if it can be fixed. danny ps: see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/84107 From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 10:48: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B58C16A41F; Mon, 2 Jan 2006 10:48:16 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from smartmx-07.inode.at (smartmx-07.inode.at [213.229.60.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E44B43D62; Mon, 2 Jan 2006 10:48:14 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from [85.124.28.145] (port=63566 helo=[192.168.1.11]) by smartmx-07.inode.at with esmtp (Exim 4.50) id 1EtNEb-0005DC-Br; Mon, 02 Jan 2006 11:48:13 +0100 Message-ID: <43B904EC.8010700@inode.at> Date: Mon, 02 Jan 2006 11:48:12 +0100 From: Armin Pirkovitsch User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <43B6C134.6060802@inode.at> <20060101163522.Y74401@fledge.watson.org> <43B85C33.90000@inode.at> <20060102060259.X2892@fledge.watson.org> In-Reply-To: <20060102060259.X2892@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 02 Jan 2006 10:48:16 -0000 Robert Watson wrote: > > On Sun, 1 Jan 2006, Armin Pirkovitsch wrote: > >> Robert Watson wrote: >> >>>> I guess one of those parts creates the trouble, but I have no idea >>>> how to trace it... Is there a way to run the whole thing in some >>>> kind of debugger? Or is there a diffrent way to locate the problem? >>> >>> >>> The usual first step to debug a deadlock, if WITNESS or INVARIANTS >>> doesn't trigger dropping you into the debugger, is to break into the >>> debugger using a console or serial break. To do this, you need to >>> compile: >> >> >> I added options BREAK_TO_DEBUGGER and used make buildkernel and make >> installkernel.debug and was not able to reconstruct the crash. I guess >> the debug stuff slowed it down enough to not come to the bug... (even >> installworld worked fine, which usually kills it) So this is what I >> feared - the debug stuff changes the timing by slowing it down which >> makes it pretty hard to reconstruct the crash... Is there any other >> way? (btw. it's a notebook, so there is no old serial bus) > > > Try compiling in only options DDB and BREAK_TO_DEBUGGER. Even without > the fully debugging features on, it may be enough to give us some > initial insight into the source of the problem. without installkernel.debug (just installkernel) I was able to reconstruct the crash, but again was not able to enter the debugger. > Does your notebook have firewire support? Yes it has and one my other machines has too if that is any help? -- Armin Pirkovitsch a.pirko@inode.at From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 2 10:54: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4E4416A41F for ; Mon, 2 Jan 2006 10:54:27 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from smartmx-05.inode.at (smartmx-05.inode.at [213.229.60.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BD3043D6D for ; Mon, 2 Jan 2006 10:54:25 +0000 (GMT) (envelope-from a.pirko@inode.at) Received: from [85.124.28.145] (port=61788 helo=[192.168.1.11]) by smartmx-05.inode.at with esmtp (Exim 4.50) id 1EtNKa-0004uf-Sj; Mon, 02 Jan 2006 11:54:24 +0100 Message-ID: <43B9065F.6000800@inode.at> Date: Mon, 02 Jan 2006 11:54:23 +0100 From: Armin Pirkovitsch User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gilbert Fernandes References: <43B6C134.6060802@inode.at> <20051231135851.A65762@cons.org> <43B72A00.2010503@inode.at> <20060101011920.A76058@cons.org> <43B85B36.6040603@inode.at> <20060102084936.ibffupwgcs4skw4g@webmail.spamcop.net> In-Reply-To: <20060102084936.ibffupwgcs4skw4g@webmail.spamcop.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Deadlock FreeBSD 6 / 7 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, 02 Jan 2006 10:54:28 -0000 Gilbert Fernandes wrote: >>>>>Use prime95 (ports/math/mprime) to test your processor and thermal >>>>>stability (36 hours or so), and memtest86 (seperately). > > > Please use memtest86+ and not memtest86. That's what I used in the first place. -- Armin Pirkovitsch a.pirko@inode.at From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 12:47: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61C8216A41F for ; Tue, 3 Jan 2006 12:47:28 +0000 (GMT) (envelope-from tsmm@list.ru) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id A715943D5D for ; Tue, 3 Jan 2006 12:47:27 +0000 (GMT) (envelope-from tsmm@list.ru) Received: from [80.241.45.10] (port=51753 helo=list.ru) by mx1.mail.ru with esmtp id 1EtlZV-000D9r-00 for freebsd-hackers@freebsd.org; Tue, 03 Jan 2006 15:47:26 +0300 From: TSaplin Mikhail To: freebsd-hackers@freebsd.org Date: Tue, 3 Jan 2006 18:47:22 +0600 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601031847.22199.tsmm@list.ru> Subject: devfs 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, 03 Jan 2006 12:47:28 -0000 Hi all i have a problem with devfs device hiding. My system is FreeBSD 6.0 (i386 and amd64, compiled from last sunday source (RELENG_6)) After mounting defs: #mount -t devfs devfs /tmp/proba first devfs command: # devfs -m /tmp/proba rule add type disk hide devfs rule: ioctl DEVFSIO_RADD: Input/output error the second command hangs: # devfs -m /tmp/proba rule add type disk hide command doesnt responds on HUP and TERM signals From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 1 09:43:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 365D216A41F for ; Sun, 1 Jan 2006 09:43:56 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: from mailgate.cesmail.net (mailgate.cesmail.net [216.154.195.36]) by mx1.FreeBSD.org (Postfix) with SMTP id 7F66043D49 for ; Sun, 1 Jan 2006 09:43:55 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: (qmail 27566 invoked from network); 1 Jan 2006 09:43:54 -0000 Received: from unknown (HELO epsilon.cesmail.net) (192.168.1.40) by mailgate.cesmail.net with SMTP; 1 Jan 2006 09:43:54 -0000 Received: (qmail 16123 invoked by uid 99); 1 Jan 2006 09:43:54 -0000 Received: from interne-05-23.anon.t-online.fr (interne-05-23.anon.t-online.fr [213.44.125.23]) by webmail.spamcop.net (Horde) with HTTP for ; Sun, 1 Jan 2006 10:43:54 +0100 Message-ID: <20060101104354.2dydvkwcw8skgk04@webmail.spamcop.net> Date: Sun, 1 Jan 2006 10:43:54 +0100 From: Gilbert Fernandes To: freebsd-hackers@freebsd.org References: <1fa17f810512310901lbabc8ddj630fcf2a79691ba1@mail.gmail.com><20051231191024.GF15481@episec.com><1fa17f810512311746u1b07731dx1326c936910424c8@mail.gmail.com> <20060101021156.GF33131@episec.com> <007e01c60e84$bdfe0110$1200a8c0@gsicomp.on.ca> In-Reply-To: <007e01c60e84$bdfe0110$1200a8c0@gsicomp.on.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Mailman-Approved-At: Tue, 03 Jan 2006 17:17:29 +0000 Subject: Re: Problem about libnet on FreeBSD 6.0 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, 01 Jan 2006 09:43:56 -0000 > The problem is that libnet defines ether_addr without regard for the fact > that it's defined in our system headers. This is a bug in libnet, not > FreeBSD. Very interesting information :) Thanks for your reply (and happy new year !) -- unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 18:06: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4393216A41F for ; Tue, 3 Jan 2006 18:06:02 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D81643D53 for ; Tue, 3 Jan 2006 18:05:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5182136 for multiple; Tue, 03 Jan 2006 13:03:50 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k03I5bO1094388; Tue, 3 Jan 2006 13:05:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 3 Jan 2006 12:52:41 -0500 User-Agent: KMail/1.8.2 References: <1fa17f810512312321n619291a0l59473e11af5cb147@mail.gmail.com> In-Reply-To: <1fa17f810512312321n619291a0l59473e11af5cb147@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601031252.42657.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1225/Mon Jan 2 12:54:07 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: prime Subject: Re: An idea of remove MUTEX_WAKE_ALL 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, 03 Jan 2006 18:06:02 -0000 On Sunday 01 January 2006 02:21 am, prime wrote: > Hi hackers, > I have an idea about remove the kernel option MUTEX_WAKE_ALL. > When we unlock the mutex(in _mtx_unlock_sleep),we can directly > give the lock to the first thread waiting on the turnstile.And a > thread gets the mutex after he returned from turnstile_wait so he > can simply jump out the _obtain_lock loop in _mtx_lock_sleep. > This makes a mutex always be owned by a thread when there are threads > waiting on the turnstile,so priority inheritance can work now. > This idea need only a few changes in kern/kern_mutex.c .But when > NO_ADAPTIVE_MUTEXS not set,it makes threads that spinning on other CPU > to get the mutex have to spin for a long time,and this makes the short > term mutex more expensive(maybe should use spin mutex instead). > > What do think about the idea? Thanks. Sun actually found that the performance was better when you did MUTEX_WAKE_ALL because once you woke up N threads, if they don't all resume at once then they will acquire the lock in sequence and the lock acquires and releaes will all be simple ones rather than all being the complicated contested case. There are more details in _Solaris Internals_. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 19:26:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7677D16A41F; Tue, 3 Jan 2006 19:26:08 +0000 (GMT) (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 20FB043D58; Tue, 3 Jan 2006 19:26:00 +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.5/8.13.5/NETPLEX) with ESMTP id k03JPvhT006786; Tue, 3 Jan 2006 14:25:57 -0500 (EST) Date: Tue, 3 Jan 2006 14:25:57 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: John Baldwin In-Reply-To: <200601031252.42657.jhb@freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org, prime Subject: Re: An idea of remove MUTEX_WAKE_ALL 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: Tue, 03 Jan 2006 19:26:08 -0000 On Tue, 3 Jan 2006, John Baldwin wrote: > On Sunday 01 January 2006 02:21 am, prime wrote: > > Hi hackers, > > I have an idea about remove the kernel option MUTEX_WAKE_ALL. > > When we unlock the mutex(in _mtx_unlock_sleep),we can directly > > give the lock to the first thread waiting on the turnstile.And a > > thread gets the mutex after he returned from turnstile_wait so he > > can simply jump out the _obtain_lock loop in _mtx_lock_sleep. > > This makes a mutex always be owned by a thread when there are threads > > waiting on the turnstile,so priority inheritance can work now. > > This idea need only a few changes in kern/kern_mutex.c .But when > > NO_ADAPTIVE_MUTEXS not set,it makes threads that spinning on other CPU > > to get the mutex have to spin for a long time,and this makes the short > > term mutex more expensive(maybe should use spin mutex instead). > > > > What do think about the idea? Thanks. > > Sun actually found that the performance was better when you did MUTEX_WAKE_ALL > because once you woke up N threads, if they don't all resume at once then > they will acquire the lock in sequence and the lock acquires and releaes will > all be simple ones rather than all being the complicated contested case. > There are more details in _Solaris Internals_. Yes, but doesn't this partly rely on having the threads spin(*) for a bit if the current lock owner is running on another CPU? Do we currently do that? (*) No, I am not referring to spin mutexes. -- DE From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 19:56:50 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05CE016A41F; Tue, 3 Jan 2006 19:56:50 +0000 (GMT) (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 F23B743D46; Tue, 3 Jan 2006 19:56:45 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k03JuhuR074867; Tue, 3 Jan 2006 12:56:44 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43BAD6FB.9090006@samsco.org> Date: Tue, 03 Jan 2006 12:56:43 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, prime Subject: Re: An idea of remove MUTEX_WAKE_ALL 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, 03 Jan 2006 19:56:50 -0000 Daniel Eischen wrote: > On Tue, 3 Jan 2006, John Baldwin wrote: > > >>On Sunday 01 January 2006 02:21 am, prime wrote: >> >>>Hi hackers, >>> I have an idea about remove the kernel option MUTEX_WAKE_ALL. >>> When we unlock the mutex(in _mtx_unlock_sleep),we can directly >>>give the lock to the first thread waiting on the turnstile.And a >>>thread gets the mutex after he returned from turnstile_wait so he >>>can simply jump out the _obtain_lock loop in _mtx_lock_sleep. >>>This makes a mutex always be owned by a thread when there are threads >>>waiting on the turnstile,so priority inheritance can work now. >>> This idea need only a few changes in kern/kern_mutex.c .But when >>>NO_ADAPTIVE_MUTEXS not set,it makes threads that spinning on other CPU >>>to get the mutex have to spin for a long time,and this makes the short >>>term mutex more expensive(maybe should use spin mutex instead). >>> >>>What do think about the idea? Thanks. >> >>Sun actually found that the performance was better when you did MUTEX_WAKE_ALL >>because once you woke up N threads, if they don't all resume at once then >>they will acquire the lock in sequence and the lock acquires and releaes will >>all be simple ones rather than all being the complicated contested case. >>There are more details in _Solaris Internals_. > > > Yes, but doesn't this partly rely on having the threads spin(*) > for a bit if the current lock owner is running on another CPU? > Do we currently do that? > > (*) No, I am not referring to spin mutexes. > Adaptive mutexes are enabled by default and have been for at least a year. Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 20:07: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5895A16A41F; Tue, 3 Jan 2006 20:07:35 +0000 (GMT) (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 ADB2943D53; Tue, 3 Jan 2006 20:07:34 +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.5/8.13.5/NETPLEX) with ESMTP id k03K7XHp026654; Tue, 3 Jan 2006 15:07:33 -0500 (EST) Date: Tue, 3 Jan 2006 15:07:33 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Scott Long In-Reply-To: <43BAD6FB.9090006@samsco.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org, prime Subject: Re: An idea of remove MUTEX_WAKE_ALL 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: Tue, 03 Jan 2006 20:07:35 -0000 On Tue, 3 Jan 2006, Scott Long wrote: > > for a bit if the current lock owner is running on another CPU? > > Do we currently do that? > > > > (*) No, I am not referring to spin mutexes. > > > > Adaptive mutexes are enabled by default and have been for at least a > year. Ahh, then that's what they (Adaptive) do. -- DE From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 20:18: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E25B516A41F; Tue, 3 Jan 2006 20:18:34 +0000 (GMT) (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 EFDF243D83; Tue, 3 Jan 2006 20:18:29 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k03KIQuK075017; Tue, 3 Jan 2006 13:18:26 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43BADC12.4020204@samsco.org> Date: Tue, 03 Jan 2006 13:18:26 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, prime Subject: Re: An idea of remove MUTEX_WAKE_ALL 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, 03 Jan 2006 20:18:35 -0000 Daniel Eischen wrote: > On Tue, 3 Jan 2006, Scott Long wrote: > > >>>for a bit if the current lock owner is running on another CPU? >>>Do we currently do that? >>> >>>(*) No, I am not referring to spin mutexes. >>> >> >>Adaptive mutexes are enabled by default and have been for at least a >>year. > > > Ahh, then that's what they (Adaptive) do. > Well, it's a bit different from Solaris, I believe. They do not sleep after a certain number of contested spins, and instead just continue to spin. As we reduce the coverage of large contested locks (like Giant) this becomes much less of performance problem, though. Scott From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 4 02:01: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81E8D16A41F for ; Wed, 4 Jan 2006 02:01:53 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C62D43D60 for ; Wed, 4 Jan 2006 02:01:47 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: by wproxy.gmail.com with SMTP id i31so2450391wra for ; Tue, 03 Jan 2006 18:01:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=jgOiQ+l7cqEUoliqzyTfS6k3segJoeuSFLIroi8T0lB2ovhY1JzRmoWuh2fjHyPKuKytYY7YTNRAhJJERfmew4JElF8EI3Yr4b27Q9Kc0UBWWYWqj4hClkEwFBPaawu3Tt1nXqinDsZFLcjvkGiznsDPYXcjqlQeW7tCWAzodgQ= Received: by 10.54.84.12 with SMTP id h12mr95472wrb; Tue, 03 Jan 2006 18:01:46 -0800 (PST) Received: by 10.54.92.3 with HTTP; Tue, 3 Jan 2006 18:01:46 -0800 (PST) Message-ID: Date: Tue, 3 Jan 2006 18:01:46 -0800 From: Kip Macy To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: update on running FreeBSD on xen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@fsmware.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2006 02:01:53 -0000 VGhlIGN1cmlvdXMgY2FuIHRyYWNrIGl0cyBzdGF0dXMgKGtub3duIGJ1Z3MsIGZlYXR1cmUgcGxh bnMsIHJlbGVhc2UgcGxhbnMsCmV0Yy4pIGF0OgpodHRwOi8vd3d3LmZzbXdhcmUuY29tL3hlbm9m cmVlYnNkLzcuMC9TVEFUVVMKCkl0IGlzIGluIHBlcmZvcmNlIHVuZGVyIC8vZGVwb3QvcHJvamVj dHMveGVuMwo= From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 4 09:54: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6600A16A41F for ; Wed, 4 Jan 2006 09:54:12 +0000 (GMT) (envelope-from peter@alastria.net) Received: from pigwidgeon.lancs.ac.uk (pigwidgeon.lancs.ac.uk [148.88.0.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5AC543D5D for ; Wed, 4 Jan 2006 09:54:11 +0000 (GMT) (envelope-from peter@alastria.net) Received: from exchange-fe2.lancs.ac.uk ([148.88.1.23] helo=exchange-fe2.lancs.local) by pigwidgeon.lancs.ac.uk with esmtp (Exim 4.52) id 1Eu5LO-0004It-F1 for freebsd-hackers@freebsd.org; Wed, 04 Jan 2006 09:54:10 +0000 Received: from [148.88.132.153] ([148.88.132.153]) by exchange-fe2.lancs.local with Microsoft SMTPSVC(5.0.2195.6713); Wed, 4 Jan 2006 09:54:09 +0000 Message-ID: <43BB9B5A.1030609@alastria.net> Date: Wed, 04 Jan 2006 09:54:34 +0000 From: Peter Wood User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jan 2006 09:54:09.0686 (UTC) FILETIME=[CF04E360:01C61114] Subject: Re: update on running FreeBSD on xen 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, 04 Jan 2006 09:54:12 -0000 Good Morning Kip et al, >The curious can track its status (known bugs, feature plans, release plans, >etc.) at: >http://www.fsmware.com/xenofreebsd/7.0/STATUS > > I've been watching this website since just before Christmas and have been somewhat excited by the progress you're making. I'm looking forward to the days of a FreeBSD dom0. I have a quick question about a comment in your STATUS file. You wrote: >PAE support will be a function of demand The server in particular have in mind is a dual Xeon which will take up to 16Gb of ram, I've been planning to upgrade it to 8Gb and put Xen on it. At which point (as I understand it) I would need PAE. From a selfish point of view I'd like to see PAE support for dom0 (I don't imagin allocating 4Gb+ to domUs). Thanks for all your work on this Kip, I wish I could help out, but unfortuantly I'm missing sufficent kernel clue, more then happy to be a guineepig though. Cheers, Pete. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 4 14: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE05116A41F for ; Wed, 4 Jan 2006 14:03:27 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from yam.park.rambler.ru (yam.park.rambler.ru [81.19.64.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 035C943D5A for ; Wed, 4 Jan 2006 14:03:25 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by yam.park.rambler.ru (8.13.3/8.13.3) with ESMTP id k04E3N6M077261; Wed, 4 Jan 2006 17:03:23 +0300 (MSK) (envelope-from is@rambler-co.ru) Date: Wed, 4 Jan 2006 17:03:23 +0300 (MSK) From: Igor Sysoev X-X-Sender: is@is.park.rambler.ru To: John-Mark Gurney In-Reply-To: <20051214015939.GD55657@funkthat.com> Message-ID: <20060104165733.B2352@is.park.rambler.ru> References: <20051213193118.Q94136@logout.sh.cvut.cz> <20051214010711.F78686@logout.sh.cvut.cz> <20051214015939.GD55657@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: kqueue/kevent and directories (Was: Equivalent of POLLERR for kqueue.) 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, 04 Jan 2006 14:03:27 -0000 On Tue, 13 Dec 2005, John-Mark Gurney wrote: > Vaclav Haisman wrote this message on Wed, Dec 14, 2005 at 01:12 +0100: >> On Tue, 13 Dec 2005, Vaclav Haisman wrote: >> >>> Is there equivalent of POLLERR for kqueue()? Or is EV_EOF the only thing? >>> I would like to use kqueue/kevent for sockets but error condition >>> signaling is not clear to me from manpage. > > It's up to the driver, but I don't believe that kqueue normally delivers > errors back to the process... it returns as ready, but needs to be checked > manually via a call to the proper syscall... (at least for sockets).. Sorry for the late response, but kqueue delivers error code to process in fflags (at least for sockets), so application does not need to call unnecessary syscall to learn error code. Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 4 14:25: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 085BE16A41F for ; Wed, 4 Jan 2006 14:25:21 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from yam.park.rambler.ru (yam.park.rambler.ru [81.19.64.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CBA643D48 for ; Wed, 4 Jan 2006 14:25:20 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by yam.park.rambler.ru (8.13.3/8.13.3) with ESMTP id k04EPI7j078267; Wed, 4 Jan 2006 17:25:18 +0300 (MSK) (envelope-from is@rambler-co.ru) Date: Wed, 4 Jan 2006 17:25:17 +0300 (MSK) From: Igor Sysoev X-X-Sender: is@is.park.rambler.ru To: Mike Silbersack In-Reply-To: <20051212083537.T78724@odysseus.silby.com> Message-ID: <20060104171645.J2352@is.park.rambler.ru> References: <20051212083930.GC91837@efrei.fr> <20051212083537.T78724@odysseus.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Cedric Tabary , freebsd-hackers@freebsd.org Subject: Re: mmap() sendfile() 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, 04 Jan 2006 14:25:21 -0000 On Mon, 12 Dec 2005, Mike Silbersack wrote: > On Mon, 12 Dec 2005, Cedric Tabary wrote: > >> If it is true, doing a sendfile() on some very big files (even if not >> keeping the descriptor open after) will kill the cache ? >> >> Please help me to understand why this patch ? and the difference between >> sendfile() and mmap() at the memory or cache level.. >> >> C?dric > > My memory escapes me on all the details, but there were two potential reasons > not to use sendfile with 4.x that no longer apply in 5.x and above: > > 1. Sendfile used to send small files inefficiently, sending the http headers > in one packet and the data in another. I fixed this in 5.x. There is workaround, it's used in my server nginx: setting the TCP_NOPUSH socket option. By the way, I've backported the patch to 4.x: http://sysoev.ru/freebsd/patch.uio.txt http://sysoev.ru/freebsd/patch.sendfile_header.txt > 2. Alan Cox improved the memory efficiency of sendfile greatly, it now uses > a single kernel buffer for all copies of the same block of the same file, > whereas the old implementation made an in-kernel copy of each block, making > it no more memory efficient than using mbufs. sendfile() in 4.x is more memory efficient than mbufs because sfbufs use KVA only while mbuf clusters use both KVA and physical memory. Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 00:22:40 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97E2316A41F; Thu, 5 Jan 2006 00:22:40 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 939FD43D49; Thu, 5 Jan 2006 00:22:38 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.4/8.13.1) with ESMTP id k050LVOT037299; Thu, 5 Jan 2006 01:21:31 +0100 (CET) (envelope-from ivoras@fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.4/8.13.1/Submit) with ESMTP id k050LVdE037296; Thu, 5 Jan 2006 01:21:31 +0100 (CET) (envelope-from ivoras@fer.hr) X-Authentication-Warning: geri.cc.fer.hr: ivoras owned process doing -bs Date: Thu, 5 Jan 2006 01:21:31 +0100 (CET) From: Ivan Voras Sender: ivoras@geri.cc.fer.hr To: hackers@freebsd.org Message-ID: <20060105005633.H36895@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@freebsd.org Subject: A sort-of distributed filesystem 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, 05 Jan 2006 00:22:40 -0000 I've threatened several times to make a distributed filesystem (or something like it) using FUSE, so I found the time over the holiday and did it. http://ivoras.sharanet.org/stuff/tdfs-r0.tgz This is a FUSE (userland) filesystem that propagates write requests to a remote daemon, while implementing read (and fstat and the like) requests locally. In short, this implements single-writer-multiple-readers scenario, where on one machine the filesystem is both readable and writeable and on multiple others it's only readable. (Actually, it's also writeable there, but the changes are not propagated). It's not a complete new filesystem but acts on existing filesystems, like an overlay / stacked filesystem (it's completely independant of the underlying filesystem type, but it's not tested on msdosfs :) ). The idea is that this could be used for hot-backups, load balancing, etc. This is only a proof of concept implementation, undertested and possibly with several bugs (I noticed late that timestamps are not always correctly propagated but will look into it tomorrow). To make it faster and possibly more robust for general usage it would have to be reimplemented in kernel. It's developed and tested on FreeBSD 6-stable and is currently not very portable to other operating systems (except 7-current and up). FUSE libraries and kernel module are required for operation. Don't forget to load the fuse.ko module. More information is provided in the README file so read it before trying to use it. If anyone wants to contact me off-list, please use the address in the README file. -- Preserve wildlife -- pickle a squirrel today! From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 00:59: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9E6916A41F for ; Thu, 5 Jan 2006 00:59:45 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from fed1rmmtao04.cox.net (fed1rmmtao04.cox.net [68.230.241.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CA7243D5D for ; Thu, 5 Jan 2006 00:59:45 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from [192.168.1.2] (really [68.111.13.24]) by fed1rmmtao04.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060105005739.FYDL17690.fed1rmmtao04.cox.net@[192.168.1.2]> for ; Wed, 4 Jan 2006 19:57:39 -0500 Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-hackers@freebsd.org From: Dan Joumaa Date: Wed, 4 Jan 2006 17:59:44 -0700 X-Mailer: Apple Mail (2.623) Subject: Invalid ipfirewall rule? 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, 05 Jan 2006 00:59:45 -0000 I'm trying to set a rule that will divert all TCP/UDP packets from host X to my divert socket. When I try to set the below firewall rule, setsockopt fails and sets errno to EINVAL. Any ideas? entry->version = IP_FW_CURRENT_API_VERSION; entry->fw_src.s_addr = htonl(host); entry->fw_uar.fw_pts[1] = 0xffff; entry->fw_prot = IPPROTO_TCP|IPPROTO_UDP; entry->fw_flg = IP_FW_F_DIVERT; --ness From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 11:26: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D583A16A41F; Thu, 5 Jan 2006 11:26:26 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from hepitas.ongs.net (hepitas.ongs.net [202.216.232.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6392943D58; Thu, 5 Jan 2006 11:26:25 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from [IPv6???1] (localhost.ongs.net [127.0.0.1]) by hepitas.ongs.net (Postfix) with ESMTP id 6F8763F; Thu, 5 Jan 2006 13:51:30 +0900 (JST) Message-ID: <43BCAA9F.2000505@ongs.co.jp> Date: Thu, 05 Jan 2006 14:11:59 +0900 From: Masanori OZAWA Organization: ONGS Inc. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051219) X-Accept-Language: en-us, en 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 Cc: freebsd-hackers@freebsd.org, daichi@freebsd.org, freebsd-current@freebsd.org Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ozawa@ongs.co.jp List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2006 11:26:27 -0000 Danny Braniss wrote: >>Masanori OZAWA wrote: >>[...] >> >>Nice work! This is just a "works for me". In only find some issues with >>permissions that were already present in the previous implementation of >>unionfs. Some of them are partially corrected in the "useful" copymode. >>I mailed the details to the author. > > > the following will hang the kernel: > root is mounted nfs, > /etc is unionfs'ed so: > from /etc/rc.initdiskless: > ... > # Create a generic memory disk > # > mount_md() { > /sbin/mdmfs -i 4096 -s $1 -M md $2 > } > kldload unionfs > mount_md 4096 /.etc > mount_unionfs /.etc /etc > ... > and now: > cd /etc > mv some-file somefile > and now the system is stuck. > this behaviour is also present in the unpatched unionfs, but would be nice > if it can be fixed. > > danny > ps: see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/84107 > Okey. I found the cause of this problem. I fixed it :) http://people.freebsd.org/~daichi/unionfs/unionfs-p2.diff I am getting a edit of HP around my improvements of unionfs bacause someone have pointed out that your explanation is not enough. -- ONGS Inc. Masanori OZAWA (ozawa@ongs.co.jp) WWW: http://www.ongs.co.jp/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 12:25: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFC8C16A41F; Thu, 5 Jan 2006 12:25:52 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from hepitas.ongs.net (hepitas.ongs.net [202.216.232.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E13343D5F; Thu, 5 Jan 2006 12:25:51 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from [IPv6???1] (localhost.ongs.net [127.0.0.1]) by hepitas.ongs.net (Postfix) with ESMTP id 7CCC83F; Thu, 5 Jan 2006 21:05:21 +0900 (JST) Message-ID: <43BD1054.7020409@ongs.co.jp> Date: Thu, 05 Jan 2006 21:25:56 +0900 From: Masanori OZAWA Organization: ONGS Inc. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051219) X-Accept-Language: en-us, en 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 Cc: freebsd-hackers@freebsd.org, daichi@freebsd.org, freebsd-current@freebsd.org Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ozawa@ongs.co.jp List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2006 12:25:52 -0000 Danny Braniss wrote: >>Okey. I found the cause of this problem. I fixed it :) >> >>http://people.freebsd.org/~daichi/unionfs/unionfs-p2.diff > > > can you make the diffs for 6.0? > thanks, > danny > > For 7-current patch: http://people.freebsd.org/~daichi/unionfs/unionfs-p2.diff (latest patch) http://people.freebsd.org/~daichi/unionfs/unionfs-p1.diff (old patch) For 6.x patch: http://people.freebsd.org/~daichi/unionfs/unionfs6-p2.diff (latest patch) http://people.freebsd.org/~daichi/unionfs/unionfs6-p1.diff (old patch) HowToInstall: http://people.freebsd.org/~daichi/unionfs/howtoinstall (UTF-8) Detail description: http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese, UTF-8) http://people.freebsd.org/~daichi/unionfs/index.html (English, but not yet, so sorry) Please keep up your interest around unionfs. We need to improve FreeBSD's unionfs I believe :) -- ONGS Inc. Masanori OZAWA (ozawa@ongs.co.jp) WWW: http://www.ongs.co.jp/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 12:46: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC1F316A422 for ; Thu, 5 Jan 2006 12:46:42 +0000 (GMT) (envelope-from siseci@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DA7443D60 for ; Thu, 5 Jan 2006 12:46:42 +0000 (GMT) (envelope-from siseci@gmail.com) Received: by wproxy.gmail.com with SMTP id i6so763512wra for ; Thu, 05 Jan 2006 04:46:37 -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=R+uDulo6dAHAM7auNlZdjK2ntXxxnqv4xI54+JC54wHS8C8zVJdMP3tUq0S6ju8i3YicrnCXEm/75MZhFbsU8eGPvngHWv9V49J+qtug5bfoRHCcZO6O8h55qNG172F2Pf92ExePEnaIzfSicTdvGS8dRgMjTHJtfXunDyPkHgk= Received: by 10.65.237.13 with SMTP id o13mr1173691qbr; Thu, 05 Jan 2006 04:46:37 -0800 (PST) Received: by 10.65.251.19 with HTTP; Thu, 5 Jan 2006 04:46:37 -0800 (PST) Message-ID: <848f55ff0601050446j5cb5453av8b1c903873e9297b@mail.gmail.com> Date: Thu, 5 Jan 2006 14:46:37 +0200 From: Necati Ersen Siseci To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Serial port problem when disabled in BIOS 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, 05 Jan 2006 12:46:42 -0000 Hello, I am using FreeBSD 5.4-RELASE-p8. When i disable the serial port ttyd0 and try to write to ttyd0 system get s= tuck. For example, after disabling serial ports from BIOS and issuing echo > /dev/ttyd0 or enabling ttyd0 on /etc/ttys will get stuck the system when booting up and try to run getty for ttyd0. Sincerely, -- N. Ersen SISECI http://www.enderunix.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 16:57:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B8F816A420 for ; Thu, 5 Jan 2006 16:57:43 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id A56D243DB7 for ; Thu, 5 Jan 2006 16:57:10 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 5 Jan 2006 16:57:06 +0000 (GMT) Date: Thu, 5 Jan 2006 16:57:05 +0000 From: David Malone To: Dan Joumaa Message-ID: <20060105165705.GA37331@walton.maths.tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org Subject: Re: Invalid ipfirewall rule? 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, 05 Jan 2006 16:57:43 -0000 On Wed, Jan 04, 2006 at 05:59:44PM -0700, Dan Joumaa wrote: > entry->fw_prot = IPPROTO_TCP|IPPROTO_UDP; This may not be your problem, but I think you need two rules to do this the protocol number is a 8 bit number, not a bit field (ie. IPPROTO_TCP is 6 and IPPROTO_UDP is 17, so oring them together doesn't make sense). David. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 18:43: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2E4E16A41F for ; Thu, 5 Jan 2006 18:43:19 +0000 (GMT) (envelope-from ahnjoan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id D572443D5A for ; Thu, 5 Jan 2006 18:43:05 +0000 (GMT) (envelope-from ahnjoan@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so2077335wxc for ; Thu, 05 Jan 2006 10:43:04 -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=BXI1+Jv6keCL6ewRz5s+LnMRi+MxrpUjIPxPBlzSN9zOkmyy5z1zXAifwV03CSMDNcvm+MNQEWg++wa7VkpkZxiscibItIAyTIRTnHAOhDj4fogDSm2DYAk3CIaVhZZclkQqr4MWqLXVcbulXS+NXclH45NI9nVc8Yy9Fz66oxo= Received: by 10.70.53.9 with SMTP id b9mr4116944wxa; Thu, 05 Jan 2006 10:43:03 -0800 (PST) Received: by 10.70.109.12 with HTTP; Thu, 5 Jan 2006 10:43:03 -0800 (PST) Message-ID: <5e575c8a0601051043r46ccfea1s352a5ea8ea7010a1@mail.gmail.com> Date: Thu, 5 Jan 2006 13:43:03 -0500 From: Ahnjoan Amous To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: setfacl file modification time 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, 05 Jan 2006 18:43:19 -0000 In 5.2.1-RELEASE, setfacl updates the modification time of the file when acls are changed. I haven't been able to find any complaints about this behavior, is this something folks on the list would expect when using setfacl? If so, does anyone know a work around? Thanks Ahnjoan From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 19:01: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E624D16A41F for ; Thu, 5 Jan 2006 19:01:26 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A20543D60 for ; Thu, 5 Jan 2006 19:01:26 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from fenrir.wireless.private.submonkey.net ([192.168.11.23]) by shrike.submonkey.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.60 (FreeBSD)) (envelope-from ) id 1EuaMS-000BnI-R7; Thu, 05 Jan 2006 19:01:24 +0000 In-Reply-To: <5e575c8a0601051043r46ccfea1s352a5ea8ea7010a1@mail.gmail.com> References: <5e575c8a0601051043r46ccfea1s352a5ea8ea7010a1@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7E919BA5-DF54-445D-98CA-E57E32B60892@submonkey.net> Content-Transfer-Encoding: 7bit From: Ceri Davies Date: Thu, 5 Jan 2006 19:01:19 +0000 To: Ahnjoan Amous X-Mailer: Apple Mail (2.746.2) Cc: freebsd-hackers@freebsd.org Subject: Re: setfacl file modification time 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, 05 Jan 2006 19:01:27 -0000 On 5 Jan 2006, at 18:43, Ahnjoan Amous wrote: > In 5.2.1-RELEASE, setfacl updates the modification time of the file > when acls are changed. I haven't been able to find any complaints > about this behavior, is this something folks on the list would expect > when using setfacl? If so, does anyone know a work around? PR 76818 is open for this issue, but there is no progress logged at present. Ceri From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 5 21:59: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 121E416A41F for ; Thu, 5 Jan 2006 21:59:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id A424C43D78 for ; Thu, 5 Jan 2006 21:58:59 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5376386 for multiple; Thu, 05 Jan 2006 17:00:23 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k05LwqTj018928; Thu, 5 Jan 2006 16:58:53 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 5 Jan 2006 16:52:11 -0500 User-Agent: KMail/1.8.2 References: <848f55ff0601050446j5cb5453av8b1c903873e9297b@mail.gmail.com> In-Reply-To: <848f55ff0601050446j5cb5453av8b1c903873e9297b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601051652.12247.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1230/Thu Jan 5 06:49:56 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Necati Ersen Siseci Subject: Re: Serial port problem when disabled in BIOS 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, 05 Jan 2006 21:59:18 -0000 On Thursday 05 January 2006 07:46 am, Necati Ersen Siseci wrote: > Hello, > > I am using FreeBSD 5.4-RELASE-p8. > > When i disable the serial port ttyd0 and try to write to ttyd0 system get > stuck. > > For example, after disabling serial ports from BIOS and issuing > > echo > /dev/ttyd0 > > or enabling ttyd0 on /etc/ttys will get stuck the system when booting > up and try to > run getty for ttyd0. > > Sincerely, I think for now the solution is to not disable the serial port in your BIOS. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 00:12: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66EFE16A41F for ; Fri, 6 Jan 2006 00:12:13 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from fed1rmmtao04.cox.net (fed1rmmtao04.cox.net [68.230.241.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DDAE43D5C for ; Fri, 6 Jan 2006 00:12:12 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from [192.168.1.2] (really [68.111.13.24]) by fed1rmmtao04.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060106001005.JYMS17690.fed1rmmtao04.cox.net@[192.168.1.2]>; Thu, 5 Jan 2006 19:10:05 -0500 In-Reply-To: <20060105165705.GA37331@walton.maths.tcd.ie> References: <20060105165705.GA37331@walton.maths.tcd.ie> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Dan Joumaa Date: Thu, 5 Jan 2006 17:12:11 -0700 To: David Malone X-Mailer: Apple Mail (2.623) Cc: freebsd-hackers@freebsd.org Subject: Re: Invalid ipfirewall rule? 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, 06 Jan 2006 00:12:13 -0000 On Jan 5, 2006, at 9:57 AM, David Malone wrote: > On Wed, Jan 04, 2006 at 05:59:44PM -0700, Dan Joumaa wrote: >> entry->fw_prot = IPPROTO_TCP|IPPROTO_UDP; > > This may not be your problem, but I think you need two rules to do > this the protocol number is a 8 bit number, not a bit field (ie. > IPPROTO_TCP is 6 and IPPROTO_UDP is 17, so oring them together > doesn't make sense). > I tried it either way and got the same results. --ness From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 02:10: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07A1516A41F for ; Fri, 6 Jan 2006 02:10:47 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) Received: from mail.npubs.com (npubs.com [209.66.100.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9334843D48 for ; Fri, 6 Jan 2006 02:10:46 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) From: Nate Nielsen User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary="------------070408040903010200010209" Message-Id: <20060106022920.BF7DADCA990@mail.npubs.com> X-Virus-Scanned: ClamAV using ClamSMTP Date: Fri, 6 Jan 2006 02:29:22 +0000 (GMT) Subject: Polling for devices other than NICs [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nielsen@memberwebs.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2006 02:10:47 -0000 This is a multi-part message in MIME format. --------------070408040903010200010209 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've recently been optimizing the hifn driver for low performance systems like the Soekris. I've implemented polling (rather than using interrupts for everything) in the driver, which speeds things up considerably. The polling functionality in FreeBSD is currently a bit NIC centric. With a few changes other types devices can use the polling subsystem. Attached is my first whack at this. This is some of my first hacking on the FreeBSD kernel. It'd be great if there was someone who could take a look and help me get it right. Cheers, Nate Note: The patch applies to RELENG_6_0. When necessary I can prepare a patch against HEAD. --------------070408040903010200010209 Content-Type: text/x-patch; name="device-polling.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="device-polling.patch" ? device-polling.patch Index: dev/em/if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.65.2.5.2.1 diff -p -U5 -r1.65.2.5.2.1 if_em.c --- dev/em/if_em.c 22 Oct 2005 22:07:20 -0000 1.65.2.5.2.1 +++ dev/em/if_em.c 6 Jan 2006 01:37:28 -0000 @@ -716,19 +716,19 @@ em_ioctl(struct ifnet *ifp, u_long comma reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(em_poll, ifp); + error = device_poll_register(em_poll, ifp, ifp->if_xname); if (error) return(error); EM_LOCK(adapter); em_disable_intr(adapter); ifp->if_capenable |= IFCAP_POLLING; EM_UNLOCK(adapter); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupt even in error case */ EM_LOCK(adapter); em_enable_intr(adapter); ifp->if_capenable &= ~IFCAP_POLLING; EM_UNLOCK(adapter); @@ -946,12 +946,13 @@ em_poll_locked(struct ifnet *ifp, enum p if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); } static void -em_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +em_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct adapter *adapter = ifp->if_softc; EM_LOCK(adapter); if (ifp->if_drv_flags & IFF_DRV_RUNNING) em_poll_locked(ifp, cmd, count); Index: dev/firewire/if_fwe.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/if_fwe.c,v retrieving revision 1.37.2.2 diff -p -U5 -r1.37.2.2 if_fwe.c --- dev/firewire/if_fwe.c 7 Oct 2005 14:00:03 -0000 1.37.2.2 +++ dev/firewire/if_fwe.c 6 Jan 2006 01:37:28 -0000 @@ -104,12 +104,13 @@ TUNABLE_INT("hw.firewire.fwe.rx_queue_le #ifdef DEVICE_POLLING static poll_handler_t fwe_poll; static void -fwe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fwe_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fwe_softc *fwe; struct firewire_comm *fc; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return; @@ -290,11 +291,11 @@ fwe_detach(device_t dev) fwe = device_get_softc(dev); ifp = fwe->eth_softc.ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif s = splimp(); fwe_stop(fwe); #if defined(__DragonFly__) || __FreeBSD_version < 500000 @@ -462,22 +463,22 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, struct ifreq *ifr = (struct ifreq *) data; struct firewire_comm *fc = fc = fwe->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(fwe_poll, ifp); + error = device_poll_register(fwe_poll, ifp, ifp->if_xname); if (error) return(error); /* Disable interrupts */ fc->set_intr(fc, 0); ifp->if_capenable |= IFCAP_POLLING; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; return (error); } Index: dev/firewire/if_fwip.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/if_fwip.c,v retrieving revision 1.7.2.3 diff -p -U5 -r1.7.2.3 if_fwip.c --- dev/firewire/if_fwip.c 7 Oct 2005 14:00:03 -0000 1.7.2.3 +++ dev/firewire/if_fwip.c 6 Jan 2006 01:37:28 -0000 @@ -111,12 +111,13 @@ TUNABLE_INT("hw.firewire.fwip.rx_queue_l #ifdef DEVICE_POLLING static poll_handler_t fwip_poll; static void -fwip_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fwip_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fwip_softc *fwip; struct firewire_comm *fc; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return; @@ -272,11 +273,11 @@ fwip_detach(device_t dev) fwip = (struct fwip_softc *)device_get_softc(dev); ifp = fwip->fw_softc.fwip_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif s = splimp(); fwip_stop(fwip); @@ -444,22 +445,22 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd struct ifreq *ifr = (struct ifreq *) data; struct firewire_comm *fc = fc = fwip->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(fwip_poll, ifp); + error = device_poll_register(fwip_poll, ifp, ifp->if_xname); if (error) return(error); /* Disable interrupts */ fc->set_intr(fc, 0); ifp->if_capenable |= IFCAP_POLLING; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; return (error); } Index: dev/fxp/if_fxp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v retrieving revision 1.240.2.5 diff -p -U5 -r1.240.2.5 if_fxp.c --- dev/fxp/if_fxp.c 7 Oct 2005 14:00:03 -0000 1.240.2.5 +++ dev/fxp/if_fxp.c 6 Jan 2006 01:37:29 -0000 @@ -45,10 +45,11 @@ __FBSDID("$FreeBSD: src/sys/dev/fxp/if_f /* #include */ #include #include #include #include +#include #include #include #include @@ -896,11 +897,11 @@ fxp_detach(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); #ifdef DEVICE_POLLING if (sc->ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(sc->ifp); + device_poll_deregister(sc->ifp, sc->ifp->if_xname); #endif FXP_LOCK(sc); sc->suspended = 1; /* Do same thing as we do for suspend */ /* @@ -1450,12 +1451,13 @@ fxp_encap(struct fxp_softc *sc, struct m #ifdef DEVICE_POLLING static poll_handler_t fxp_poll; static void -fxp_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fxp_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fxp_softc *sc = ifp->if_softc; uint8_t statack; FXP_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -2415,20 +2417,20 @@ fxp_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: mask = ifp->if_capenable ^ ifr->ifr_reqcap; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(fxp_poll, ifp); + error = device_poll_register(fxp_poll, ifp, ifp->if_xname); if (error) return(error); FXP_LOCK(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); ifp->if_capenable |= IFCAP_POLLING; FXP_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts in any case */ FXP_LOCK(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); ifp->if_capenable &= ~IFCAP_POLLING; FXP_UNLOCK(sc); Index: dev/ixgb/if_ixgb.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ixgb/if_ixgb.c,v retrieving revision 1.10.2.4 diff -p -U5 -r1.10.2.4 if_ixgb.c --- dev/ixgb/if_ixgb.c 7 Oct 2005 14:00:04 -0000 1.10.2.4 +++ dev/ixgb/if_ixgb.c 6 Jan 2006 01:37:29 -0000 @@ -375,11 +375,11 @@ ixgb_detach(device_t dev) INIT_DEBUGOUT("ixgb_detach: begin"); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif IXGB_LOCK(adapter); adapter->in_detach = 1; @@ -569,19 +569,19 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(ixgb_poll, ifp); + error = device_poll_register(ixgb_poll, ifp, ifp->if_xname); if (error) return(error); IXGB_LOCK(adapter); ixgb_disable_intr(adapter); ifp->if_capenable |= IFCAP_POLLING; IXGB_UNLOCK(adapter); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupt even in error case */ IXGB_LOCK(adapter); ixgb_enable_intr(adapter); ifp->if_capenable &= ~IFCAP_POLLING; IXGB_UNLOCK(adapter); @@ -771,12 +771,13 @@ ixgb_poll_locked(struct ifnet * ifp, enu if (ifp->if_snd.ifq_head != NULL) ixgb_start_locked(ifp); } static void -ixgb_poll(struct ifnet * ifp, enum poll_cmd cmd, int count) +ixgb_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct adapter *adapter = ifp->if_softc; IXGB_LOCK(adapter); if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgb_poll_locked(ifp, cmd, count); Index: dev/nge/if_nge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/nge/if_nge.c,v retrieving revision 1.75.2.3 diff -p -U5 -r1.75.2.3 if_nge.c --- dev/nge/if_nge.c 7 Oct 2005 14:00:04 -0000 1.75.2.3 +++ dev/nge/if_nge.c 6 Jan 2006 01:37:29 -0000 @@ -959,11 +959,11 @@ nge_detach(dev) sc = device_get_softc(dev); ifp = sc->nge_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif NGE_LOCK(sc); nge_reset(sc); nge_stop(sc); NGE_UNLOCK(sc); @@ -1374,12 +1374,13 @@ nge_tick_locked(sc) #ifdef DEVICE_POLLING static poll_handler_t nge_poll; static void -nge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +nge_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct nge_softc *sc = ifp->if_softc; NGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { NGE_UNLOCK(sc); @@ -2041,11 +2042,11 @@ nge_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(nge_poll, ifp); + error = device_poll_register(nge_poll, ifp, ifp->if_xname); if (error) return(error); NGE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, NGE_IER, 0); @@ -2054,11 +2055,11 @@ nge_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ NGE_LOCK(sc); CSR_WRITE_4(sc, NGE_IER, 1); ifp->if_capenable &= ~IFCAP_POLLING; NGE_UNLOCK(sc); Index: dev/re/if_re.c =================================================================== RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v retrieving revision 1.46.2.7 diff -p -U5 -r1.46.2.7 if_re.c --- dev/re/if_re.c 8 Oct 2005 07:35:10 -0000 1.46.2.7 +++ dev/re/if_re.c 6 Jan 2006 01:37:30 -0000 @@ -216,11 +216,11 @@ static __inline void re_fixup_rx (struct mbuf *); #endif static void re_rxeof (struct rl_softc *); static void re_txeof (struct rl_softc *); #ifdef DEVICE_POLLING -static void re_poll (struct ifnet *, enum poll_cmd, int); +static void re_poll (void *arg, enum poll_cmd, int); static void re_poll_locked (struct ifnet *, enum poll_cmd, int); #endif static void re_intr (void *); static void re_tick (void *); static void re_start (struct ifnet *); @@ -1268,11 +1268,11 @@ re_detach(dev) ifp = sc->rl_ifp; KASSERT(mtx_initialized(&sc->rl_mtx), ("re mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { RL_LOCK(sc); #if 0 @@ -1757,12 +1757,13 @@ re_tick(xsc) callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } #ifdef DEVICE_POLLING static void -re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +re_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) re_poll_locked(ifp, cmd, count); @@ -2316,21 +2317,21 @@ re_ioctl(ifp, command, data) { int mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(re_poll, ifp); + error = device_poll_register(re_poll, ifp, ifp->if_xname); if (error) return(error); RL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); ifp->if_capenable |= IFCAP_POLLING; RL_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ RL_LOCK(sc); CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); ifp->if_capenable &= ~IFCAP_POLLING; RL_UNLOCK(sc); Index: dev/vge/if_vge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/vge/if_vge.c,v retrieving revision 1.14.2.4 diff -p -U5 -r1.14.2.4 if_vge.c --- dev/vge/if_vge.c 9 Oct 2005 04:15:12 -0000 1.14.2.4 +++ dev/vge/if_vge.c 6 Jan 2006 01:37:30 -0000 @@ -1107,11 +1107,11 @@ vge_detach(dev) KASSERT(mtx_initialized(&sc->vge_mtx), ("vge mutex not initialized")); ifp = sc->vge_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { vge_stop(sc); @@ -1617,12 +1617,13 @@ vge_tick(xsc) return; } #ifdef DEVICE_POLLING static void -vge_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) +vge_poll (void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct vge_softc *sc = ifp->if_softc; VGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) goto done; @@ -2256,21 +2257,21 @@ vge_ioctl(ifp, command, data) { int mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(vge_poll, ifp); + error = device_poll_register(vge_poll, ifp, ifp->if_xname); if (error) return(error); VGE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, VGE_IMR, 0); CSR_WRITE_1(sc, VGE_CRC3, VGE_CR3_INT_GMSK); ifp->if_capenable |= IFCAP_POLLING; VGE_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ VGE_LOCK(sc); CSR_WRITE_4(sc, VGE_IMR, VGE_INTRS); CSR_WRITE_4(sc, VGE_ISR, 0xFFFFFFFF); CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); Index: kern/kern_poll.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_poll.c,v retrieving revision 1.19.2.2 diff -p -U5 -r1.19.2.2 kern_poll.c --- kern/kern_poll.c 7 Oct 2005 14:00:05 -0000 1.19.2.2 +++ kern/kern_poll.c 6 Jan 2006 01:37:30 -0000 @@ -35,10 +35,11 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_po #include #include /* needed by net/if.h */ #include #include #include +#include #include /* for IFF_* flags */ #include /* for NETISR_POLL */ #include @@ -48,11 +49,11 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_po static void netisr_poll(void); /* the two netisr handlers */ static void netisr_pollmore(void); static int poll_switch(SYSCTL_HANDLER_ARGS); void hardclock_device_poll(void); /* hook from hardclock */ -void ether_poll(int); /* polling in idle loop */ +void device_poll(int); /* polling in idle loop */ static struct mtx poll_mtx; /* * Polling support for [network] device drivers. @@ -61,11 +62,12 @@ static struct mtx poll_mtx; * polling code. * * If registration is successful, the driver must disable interrupts, * and further I/O is performed through the handler, which is invoked * (at least once per clock tick) with 3 arguments: the "arg" passed at - * register time (a struct ifnet pointer), a command, and a "count" limit. + * register time (a softc, device, or ifnet pointer), a command, + * and a "count" limit. * * The command can be one of the following: * POLL_ONLY: quick move of "count" packets from input/output queues. * POLL_AND_CHECK_STATUS: as above, plus check status registers or do * other more expensive operations. This command is issued periodically @@ -250,11 +252,11 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, idl #define POLL_LIST_LEN 128 struct pollrec { poll_handler_t *handler; - struct ifnet *ifp; + void *arg; }; static struct pollrec pr[POLL_LIST_LEN]; static void @@ -320,25 +322,25 @@ hardclock_device_poll(void) if (pending_polls++ > 0) lost_polls++; } /* - * ether_poll is called from the idle loop. + * device_poll is called from the idle loop. */ void -ether_poll(int count) +device_poll(int count) { int i; NET_LOCK_GIANT(); mtx_lock(&poll_mtx); if (count > poll_each_burst) count = poll_each_burst; for (i = 0 ; i < poll_handlers ; i++) - pr[i].handler(pr[i].ifp, POLL_ONLY, count); + pr[i].handler(pr[i].arg, POLL_ONLY, count); mtx_unlock(&poll_mtx); NET_UNLOCK_GIANT(); } @@ -433,30 +435,30 @@ netisr_poll(void) cycles = (residual_burst < poll_each_burst) ? residual_burst : poll_each_burst; residual_burst -= cycles; for (i = 0 ; i < poll_handlers ; i++) - pr[i].handler(pr[i].ifp, arg, cycles); + pr[i].handler(pr[i].arg, arg, cycles); phase = 4; mtx_unlock(&poll_mtx); } /* * Try to register routine for polling. Returns 0 if successful * (and polling should be enabled), error code otherwise. * A device is not supposed to register itself multiple times. * - * This is called from within the *_ioctl() functions. + * This is called from within the interface *_ioctl() functions. */ int -ether_poll_register(poll_handler_t *h, struct ifnet *ifp) +device_poll_register(poll_handler_t *h, void *arg, const char *devname) { int i; KASSERT(h != NULL, ("%s: handler is NULL", __func__)); - KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); + KASSERT(arg != NULL, ("%s: arg is NULL", __func__)); NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); if (poll_handlers >= POLL_LIST_LEN) { @@ -476,58 +478,73 @@ ether_poll_register(poll_handler_t *h, s mtx_unlock(&poll_mtx); return (ENOMEM); /* no polling for you */ } for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].ifp == ifp && pr[i].handler != NULL) { + if (pr[i].arg == arg && pr[i].handler != NULL) { mtx_unlock(&poll_mtx); - log(LOG_DEBUG, "ether_poll_register: %s: handler" - " already registered\n", ifp->if_xname); + log(LOG_DEBUG, "device_poll_register: %s: handler" + " already registered\n", devname ? devname : "UNKNOWN"); return (EEXIST); } pr[poll_handlers].handler = h; - pr[poll_handlers].ifp = ifp; + pr[poll_handlers].arg = arg; poll_handlers++; mtx_unlock(&poll_mtx); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); return (0); } /* - * Remove interface from the polling list. Called from *_ioctl(), too. + * Remove device from the polling list. Called from *_ioctl(), too. */ int -ether_poll_deregister(struct ifnet *ifp) +device_poll_deregister(void *arg, const char *devname) { int i; - KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); + KASSERT(arg != NULL, ("%s: arg is NULL", __func__)); NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].ifp == ifp) /* found it */ + if (pr[i].arg == arg) /* found it */ break; if (i == poll_handlers) { - log(LOG_DEBUG, "ether_poll_deregister: %s: not found!\n", - ifp->if_xname); + log(LOG_DEBUG, "device_poll_deregister: %s: not found!\n", + devname ? devname : "UNKNOWN"); mtx_unlock(&poll_mtx); return (ENOENT); } poll_handlers--; if (i < poll_handlers) { /* Last entry replaces this one. */ pr[i].handler = pr[poll_handlers].handler; - pr[i].ifp = pr[poll_handlers].ifp; + pr[i].arg = pr[poll_handlers].arg; } mtx_unlock(&poll_mtx); return (0); } /* + * Deprecated compatibility functions for external drivers. + */ +int +ether_poll_register(void *h, struct ifnet *ifp) +{ + return device_poll_register((poll_handler_t*)h, ifp, ifp->if_xname); +} + +int +ether_poll_deregister(struct ifnet *ifp) +{ + return device_poll_deregister(ifp, ifp->if_xname); +} + +/* * Legacy interface for turning polling on all interfaces at one time. */ static int poll_switch(SYSCTL_HANDLER_ARGS) { @@ -565,11 +582,12 @@ poll_switch(SYSCTL_HANDLER_ARGS) } } IFNET_RUNLOCK(); NET_UNLOCK_GIANT(); - log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); + log(LOG_ERR, "kern.polling.enable (which enables polling on all interfaces) " + "is deprecated. Use ifconfig(8)"); return (0); } static void @@ -587,11 +605,11 @@ poll_idle(void) mtx_unlock_spin(&sched_lock); for (;;) { if (poll_in_idle_loop && poll_handlers > 0) { idlepoll_sleeping = 0; - ether_poll(poll_each_burst); + device_poll(poll_each_burst); mtx_lock_spin(&sched_lock); mi_switch(SW_VOL, NULL); mtx_unlock_spin(&sched_lock); } else { idlepoll_sleeping = 1; Index: net/if_var.h =================================================================== RCS file: /home/ncvs/src/sys/net/if_var.h,v retrieving revision 1.98.2.5 diff -p -U5 -r1.98.2.5 if_var.h --- net/if_var.h 7 Oct 2005 14:00:05 -0000 1.98.2.5 +++ net/if_var.h 6 Jan 2006 01:37:34 -0000 @@ -658,14 +658,12 @@ void if_deregister_com_alloc(u_char type #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *) ifaddr_byindex((ifp)->if_index)->ifa_addr) #ifdef DEVICE_POLLING -enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; - -typedef void poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count); -int ether_poll_register(poll_handler_t *h, struct ifnet *ifp); +/* DEPRECATED: For compatibility only. Use device_poll_register/deregister */ +int ether_poll_register(void*, struct ifnet *ifp); int ether_poll_deregister(struct ifnet *ifp); #endif /* DEVICE_POLLING */ #endif /* _KERNEL */ Index: pci/if_dc.c =================================================================== RCS file: /home/ncvs/src/sys/pci/Attic/if_dc.c,v retrieving revision 1.160.2.6 diff -p -U5 -r1.160.2.6 if_dc.c --- pci/if_dc.c 9 Oct 2005 04:11:19 -0000 1.160.2.6 +++ pci/if_dc.c 6 Jan 2006 01:37:34 -0000 @@ -2340,11 +2340,11 @@ dc_detach(device_t dev) ifp = sc->dc_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { DC_LOCK(sc); @@ -3038,12 +3038,13 @@ dc_tx_underrun(struct dc_softc *sc) #ifdef DEVICE_POLLING static poll_handler_t dc_poll; static void -dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +dc_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct dc_softc *sc = ifp->if_softc; DC_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -3683,11 +3684,11 @@ dc_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(dc_poll, ifp); + error = device_poll_register(dc_poll, ifp, ifp->if_xname); if (error) return(error); DC_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3696,11 +3697,11 @@ dc_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ DC_LOCK(sc); CSR_WRITE_4(sc, DC_IMR, DC_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; DC_UNLOCK(sc); Index: pci/if_rl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_rl.c,v retrieving revision 1.152.2.4 diff -p -U5 -r1.152.2.4 if_rl.c --- pci/if_rl.c 7 Oct 2005 14:00:06 -0000 1.152.2.4 +++ pci/if_rl.c 6 Jan 2006 01:37:34 -0000 @@ -197,11 +197,11 @@ static int rl_mii_readreg(struct rl_soft static int rl_mii_writereg(struct rl_softc *, struct rl_mii_frame *); static int rl_miibus_readreg(device_t, int, int); static void rl_miibus_statchg(device_t); static int rl_miibus_writereg(device_t, int, int, int); #ifdef DEVICE_POLLING -static void rl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void rl_poll(void *arg, enum poll_cmd cmd, int count); static void rl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static int rl_probe(device_t); static void rl_read_eeprom(struct rl_softc *, uint8_t *, int, int, int); static void rl_reset(struct rl_softc *); @@ -1003,11 +1003,11 @@ rl_detach(device_t dev) ifp = sc->rl_ifp; KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { RL_LOCK(sc); rl_stop(sc); @@ -1281,12 +1281,13 @@ rl_tick(void *xsc) callout_reset(&sc->rl_stat_callout, hz, rl_tick, sc); } #ifdef DEVICE_POLLING static void -rl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +rl_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) rl_poll_locked(ifp, cmd, count); @@ -1657,11 +1658,11 @@ rl_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(rl_poll, ifp); + error = device_poll_register(rl_poll, ifp, ifp->if_xname); if (error) return(error); RL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); @@ -1670,11 +1671,11 @@ rl_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ RL_LOCK(sc); CSR_WRITE_2(sc, RL_IMR, RL_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; RL_UNLOCK(sc); Index: pci/if_sf.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sf.c,v retrieving revision 1.82.2.5 diff -p -U5 -r1.82.2.5 if_sf.c --- pci/if_sf.c 9 Oct 2005 04:11:19 -0000 1.82.2.5 +++ pci/if_sf.c 6 Jan 2006 01:37:34 -0000 @@ -167,11 +167,11 @@ static u_int8_t sf_read_eeprom(struct sf static int sf_miibus_readreg(device_t, int, int); static int sf_miibus_writereg(device_t, int, int, int); static void sf_miibus_statchg(device_t); #ifdef DEVICE_POLLING -static void sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void sf_poll(void *arg, enum poll_cmd cmd, int count); static void sf_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static u_int32_t csr_read_4(struct sf_softc *, int); static void csr_write_4(struct sf_softc *, int, u_int32_t); @@ -563,11 +563,11 @@ sf_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(sf_poll, ifp); + error = device_poll_register(sf_poll, ifp, ifp->if_xname); if (error) return(error); SF_LOCK(sc); /* Disable interrupts */ csr_write_4(sc, SF_IMR, 0x00000000); @@ -576,11 +576,11 @@ sf_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ SF_LOCK(sc); csr_write_4(sc, SF_IMR, SF_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; SF_UNLOCK(sc); @@ -817,11 +817,11 @@ sf_detach(dev) KASSERT(mtx_initialized(&sc->sf_mtx), ("sf mutex not initialized")); ifp = sc->sf_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { SF_LOCK(sc); @@ -1089,12 +1089,13 @@ sf_txthresh_adjust(sc) } } #ifdef DEVICE_POLLING static void -sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +sf_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct sf_softc *sc = ifp->if_softc; SF_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) sf_poll_locked(ifp, cmd, count); Index: pci/if_sis.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sis.c,v retrieving revision 1.132.2.6 diff -p -U5 -r1.132.2.6 if_sis.c --- pci/if_sis.c 9 Oct 2005 04:11:19 -0000 1.132.2.6 +++ pci/if_sis.c 6 Jan 2006 01:37:34 -0000 @@ -1262,11 +1262,11 @@ sis_detach(device_t dev) KASSERT(mtx_initialized(&sc->sis_mtx), ("sis mutex not initialized")); ifp = sc->sis_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded. */ if (device_is_attached(dev)) { SIS_LOCK(sc); @@ -1580,12 +1580,13 @@ sis_tick(void *xsc) #ifdef DEVICE_POLLING static poll_handler_t sis_poll; static void -sis_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +sis_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct sis_softc *sc = ifp->if_softc; SIS_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { SIS_UNLOCK(sc); @@ -2138,11 +2139,11 @@ sis_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: /* ok, disable interrupts */ #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(sis_poll, ifp); + error = device_poll_register(sis_poll, ifp, ifp->if_xname); if (error) return(error); SIS_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, SIS_IER, 0); @@ -2151,11 +2152,11 @@ sis_ioctl(struct ifnet *ifp, u_long comm return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ SIS_LOCK(sc); CSR_WRITE_4(sc, SIS_IER, 1); ifp->if_capenable &= ~IFCAP_POLLING; SIS_UNLOCK(sc); Index: pci/if_ste.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_ste.c,v retrieving revision 1.84.2.6 diff -p -U5 -r1.84.2.6 if_ste.c --- pci/if_ste.c 9 Oct 2005 04:11:19 -0000 1.84.2.6 +++ pci/if_ste.c 6 Jan 2006 01:37:34 -0000 @@ -615,22 +615,11 @@ ste_setmulti(sc) return; } #ifdef DEVICE_POLLING -static poll_handler_t ste_poll, ste_poll_locked; - -static void -ste_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct ste_softc *sc = ifp->if_softc; - - STE_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ste_poll_locked(ifp, cmd, count); - STE_UNLOCK(sc); -} +static poll_handler_t ste_poll; static void ste_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct ste_softc *sc = ifp->if_softc; @@ -665,10 +654,23 @@ ste_poll_locked(struct ifnet *ifp, enum ste_reset(sc); ste_init_locked(sc); } } } + +static void +ste_poll(void *arg, enum poll_cmd cmd, int count) +{ + struct ifnet *ifp = arg; + struct ste_softc *sc = ifp->if_softc; + + STE_LOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ste_poll_locked(ifp, cmd, count); + STE_UNLOCK(sc); +} + #endif /* DEVICE_POLLING */ static void ste_intr(xsc) void *xsc; @@ -1145,11 +1147,11 @@ ste_detach(dev) KASSERT(mtx_initialized(&sc->ste_mtx), ("ste mutex not initialized")); ifp = sc->ste_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { STE_LOCK(sc); @@ -1532,11 +1534,11 @@ ste_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(ste_poll, ifp); + error = device_poll_register(ste_poll, ifp, ifp->if_xname); if (error) return(error); STE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, STE_IMR, 0); @@ -1545,11 +1547,11 @@ ste_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ STE_LOCK(sc); CSR_WRITE_2(sc, STE_IMR, STE_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; STE_UNLOCK(sc); Index: pci/if_vr.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_vr.c,v retrieving revision 1.104.2.4 diff -p -U5 -r1.104.2.4 if_vr.c --- pci/if_vr.c 9 Oct 2005 04:11:20 -0000 1.104.2.4 +++ pci/if_vr.c 6 Jan 2006 01:37:34 -0000 @@ -798,11 +798,11 @@ vr_detach(device_t dev) KASSERT(mtx_initialized(&sc->vr_mtx), ("vr mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif VR_LOCK(sc); sc->suspended = 1; @@ -1150,22 +1150,10 @@ vr_tick(void *xsc) VR_UNLOCK(sc); } #ifdef DEVICE_POLLING static poll_handler_t vr_poll; -static poll_handler_t vr_poll_locked; - -static void -vr_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct vr_softc *sc = ifp->if_softc; - - VR_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - vr_poll_locked(ifp, cmd, count); - VR_UNLOCK(sc); -} static void vr_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct vr_softc *sc = ifp->if_softc; @@ -1224,10 +1212,23 @@ vr_poll_locked(struct ifnet *ifp, enum p VR_SETBIT16(sc, VR_COMMAND, VR_CMD_TX_GO); } } } } + +static void +vr_poll(void *arg, enum poll_cmd cmd, int count) +{ + struct ifnet *ifp = arg; + struct vr_softc *sc = ifp->if_softc; + + VR_LOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + vr_poll_locked(ifp, cmd, count); + VR_UNLOCK(sc); +} + #endif /* DEVICE_POLLING */ static void vr_intr(void *arg) { @@ -1607,11 +1608,11 @@ vr_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(vr_poll, ifp); + error = device_poll_register(vr_poll, ifp, ifp->if_xname); if (error) return(error); VR_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, VR_IMR, 0x0000); @@ -1620,11 +1621,11 @@ vr_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ VR_LOCK(sc); CSR_WRITE_2(sc, VR_IMR, VR_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; VR_UNLOCK(sc); Index: pci/if_xl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_xl.c,v retrieving revision 1.190.2.6 diff -p -U5 -r1.190.2.6 if_xl.c --- pci/if_xl.c 9 Oct 2005 04:11:20 -0000 1.190.2.6 +++ pci/if_xl.c 6 Jan 2006 01:37:34 -0000 @@ -249,11 +249,11 @@ static void xl_watchdog(struct ifnet *); static void xl_shutdown(device_t); static int xl_suspend(device_t); static int xl_resume(device_t); #ifdef DEVICE_POLLING -static void xl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void xl_poll(void *arg, enum poll_cmd cmd, int count); static void xl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static int xl_ifmedia_upd(struct ifnet *); static void xl_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1689,11 +1689,11 @@ xl_detach(device_t dev) KASSERT(mtx_initialized(&sc->xl_mtx), ("xl mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif if (sc->xl_flags & XL_FLAG_USE_MMIO) { rid = XL_PCI_LOMEM; res = SYS_RES_MEMORY; @@ -2335,12 +2335,13 @@ xl_intr(void *arg) XL_UNLOCK(sc); } #ifdef DEVICE_POLLING static void -xl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +xl_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct xl_softc *sc = ifp->if_softc; XL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) xl_poll_locked(ifp, cmd, count); @@ -3182,11 +3183,11 @@ xl_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(xl_poll, ifp); + error = device_poll_register(xl_poll, ifp, ifp->if_xname); if (error) return(error); XL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|0); @@ -3195,11 +3196,11 @@ xl_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ XL_LOCK(sc); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|0xFF); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|XL_INTRS); if (sc->xl_flags & XL_FLAG_FUNCREG) Index: sys/bus.h =================================================================== RCS file: /home/ncvs/src/sys/sys/bus.h,v retrieving revision 1.70 diff -p -U5 -r1.70 bus.h --- sys/bus.h 12 Apr 2005 15:20:36 -0000 1.70 +++ sys/bus.h 6 Jan 2006 01:37:34 -0000 @@ -453,10 +453,20 @@ void bus_data_generation_update(void); /** * Shorthand for constructing method tables. */ #define DEVMETHOD KOBJMETHOD +/* Device polling functionality */ +#ifdef DEVICE_POLLING + +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; +typedef void poll_handler_t(void *arg, enum poll_cmd cmd, int count); +int device_poll_register(poll_handler_t *h, void *arg, const char *devname); +int device_poll_deregister(void *arg, const char *devname); + +#endif /* DEVICE_POLLING */ + /* * Some common device interfaces. */ #include "device_if.h" #include "bus_if.h" --------------070408040903010200010209-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 14:08: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67A1216A41F for ; Fri, 6 Jan 2006 14:08:23 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pastinakel.tue.nl (pastinakel.tue.nl [131.155.2.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id B526543D48 for ; Fri, 6 Jan 2006 14:08:22 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from localhost (localhost [127.0.0.1]) by pastinakel.tue.nl (Postfix) with ESMTP id A276E14BCCD for ; Fri, 6 Jan 2006 15:08:21 +0100 (CET) Received: from pastinakel.tue.nl ([127.0.0.1]) by localhost (pastinakel.tue.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00249-06-2 for ; Fri, 6 Jan 2006 15:08:07 +0100 (CET) Received: from umta.win.tue.nl (umta.win.tue.nl [131.155.71.100]) by pastinakel.tue.nl (Postfix) with ESMTP id 17FA614BC65 for ; Fri, 6 Jan 2006 15:08:07 +0100 (CET) Received: from pcwin002.win.tue.nl (pcwin002 [131.155.71.72]) by umta.win.tue.nl (Postfix) with ESMTP id 12E0D31401C for ; Fri, 6 Jan 2006 15:08:07 +0100 (CET) Received: by pcwin002.win.tue.nl (Postfix, from userid 1001) id F40084124; Fri, 6 Jan 2006 15:08:06 +0100 (CET) Date: Fri, 6 Jan 2006 15:08:06 +0100 From: Stijn Hoop To: freebsd-hackers@freebsd.org Message-ID: <20060106140806.GE79296@pcwin002.win.tue.nl> Mail-Followup-To: Stijn Hoop , freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Bright-Idea: Let's abolish HTML mail! X-Virus-Scanned: amavisd-new at tue.nl Subject: loop in kgdb unread message buffer? 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, 06 Jan 2006 14:08:23 -0000 --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I just had a crash, luckily I could dump a core with 'call doadump'. However something with the serial console was wrong so my screen was spammed with %%% (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort)= (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort= ) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abor= t) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abo= rt) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to ab= ort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to a= bort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) %%% etc. Now I did not worry about this because I thought I could use kgdb on the dump after the reboot. However it seems that kgdb is running into some infinite loop printing these messages; I have ran it for about 20 minutes where it kept repeating this message, with some block nrs. intertwined. I think it repeats though because I have seen block nr '96' (lucky ^S timing) and it still doesn't stop. Is there a way to *not* print the 'Unread portion of the kernel message buffer' (as it is apparently called) on startup? --Stijn --=20 Coffee is the path to the bouncy side. Coffee leads to activity. Activity leads to moving. Moving leads to bouncing. =2E.. (meaningful silence) ... I sense much coffee in you. -- Matthijs Piek --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDvnnGY3r/tLQmfWcRAktyAJ44sNid2NOY3SaYXxQ2+xYrdRG+bgCbBQAa 0BmkVZW8RK+mlJzXukHtSLc= =q2ie -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 20:04:14 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 279B116A41F for ; Fri, 6 Jan 2006 20:04:14 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58ED243D45 for ; Fri, 6 Jan 2006 20:04:13 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 61386 invoked by uid 0); 6 Jan 2006 20:03:22 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 6 Jan 2006 20:03:22 -0000 Date: Fri, 6 Jan 2006 21:03:22 +0100 (CET) From: Dirk Engling To: hackers@freebsd.org Message-ID: <20060106205744.O13365@erdgeist.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Using pkg_add fetch only 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, 06 Jan 2006 20:04:14 -0000 Good evening, I'm writing on the ezjail project and want to be able to use the easy interface of pkg_add to fetch packages recursively. This is _fetch_, not install them, since installation is expected to happen at a later stage when starting up lots of jails each being identical. Clearly pkg_add does not provide this option. Even if it would, it would declare some dependencies fulfilled since packages are installed in the hostsystem already. Anyone having an idea here, besides rewriting pkg_add? Regards erdgeist From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 20:54:36 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F15F716A41F for ; Fri, 6 Jan 2006 20:54:36 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from skippyii.compar.com (compar.com [216.208.38.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BD1F43D46 for ; Fri, 6 Jan 2006 20:54:36 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from hermes (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [70.28.254.189]) by skippyii.compar.com (8.13.1/8.13.1) with ESMTP id k06KuvhE052694; Fri, 6 Jan 2006 15:56:58 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "Dirk Engling" , References: <20060106205744.O13365@erdgeist.org> Date: Fri, 6 Jan 2006 15:55:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Cc: Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 20:54:37 -0000 > Good evening, > > I'm writing on the ezjail project and want to be able to use the easy > interface of pkg_add to fetch packages recursively. > > This is _fetch_, not install them, since installation is expected to > happen at a later stage when starting up lots of jails each being > identical. > > Clearly pkg_add does not provide this option. Even if it would, it would > declare some dependencies fulfilled since packages are installed in the > hostsystem already. > > Anyone having an idea here, besides rewriting pkg_add? What about pkg_fetch -R? -- Matt Emmerton From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 21:00:27 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4288416A41F for ; Fri, 6 Jan 2006 21:00:27 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0C7243D48 for ; Fri, 6 Jan 2006 21:00:25 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 73290 invoked by uid 0); 6 Jan 2006 20:59:29 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 6 Jan 2006 20:59:29 -0000 Date: Fri, 6 Jan 2006 21:59:29 +0100 (CET) From: Dirk Engling To: Matt Emmerton In-Reply-To: <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> Message-ID: <20060106215502.H13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 21:00:27 -0000 On Fri, 6 Jan 2006, Matt Emmerton wrote: > What about pkg_fetch -R? This command is not in the base system. Since there is some logic in pkg_add for resolving dependencies and fetching packages I hoped, there might be some easy way not involving additional dependencies. But thanks for the hint, anyway. erdgeist From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 21:11:02 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E026D16A41F for ; Fri, 6 Jan 2006 21:11:02 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1ED143D5A for ; Fri, 6 Jan 2006 21:10:59 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from fenrir.wireless.private.submonkey.net ([192.168.11.23]) by shrike.submonkey.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.60 (FreeBSD)) (envelope-from ) id 1EuyrM-000En3-6B; Fri, 06 Jan 2006 21:10:55 +0000 In-Reply-To: <20060106215502.H13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> Content-Transfer-Encoding: 7bit From: Ceri Davies Date: Fri, 6 Jan 2006 21:10:50 +0000 To: Dirk Engling X-Mailer: Apple Mail (2.746.2) Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 21:11:03 -0000 On 6 Jan 2006, at 20:59, Dirk Engling wrote: > > On Fri, 6 Jan 2006, Matt Emmerton wrote: > >> What about pkg_fetch -R? > > This command is not in the base system. Since there is some logic > in pkg_add for resolving dependencies and fetching packages I > hoped, there might be some easy way not involving additional > dependencies. The package cluster uses chroot() for this. Ceri From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 21:36:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C78BD16A41F; Fri, 6 Jan 2006 21:36:33 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E70843D62; Fri, 6 Jan 2006 21:36:32 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5455211 for multiple; Fri, 06 Jan 2006 16:38:01 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k06LaUKL027434; Fri, 6 Jan 2006 16:36:31 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 6 Jan 2006 16:35:50 -0500 User-Agent: KMail/1.8.2 References: <20060106205744.O13365@erdgeist.org> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> In-Reply-To: <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601061635.51715.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1234/Fri Jan 6 08:54:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: hackers@freebsd.org, Dirk Engling , Ceri Davies Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 21:36:33 -0000 On Friday 06 January 2006 04:10 pm, Ceri Davies wrote: > On 6 Jan 2006, at 20:59, Dirk Engling wrote: > > On Fri, 6 Jan 2006, Matt Emmerton wrote: > >> What about pkg_fetch -R? > > > > This command is not in the base system. Since there is some logic > > in pkg_add for resolving dependencies and fetching packages I > > hoped, there might be some easy way not involving additional > > dependencies. > > The package cluster uses chroot() for this. I use a shell script that downloads a package with fetch, extracts +CONTENTS to a temporary directory and parses it for dependencies, then downloads any missing dependencies and adds them. It's not too hard to do, but it would be handy to have this feature built into pkg_add itself perhaps. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 21:36:33 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C78BD16A41F; Fri, 6 Jan 2006 21:36:33 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E70843D62; Fri, 6 Jan 2006 21:36:32 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5455211 for multiple; Fri, 06 Jan 2006 16:38:01 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k06LaUKL027434; Fri, 6 Jan 2006 16:36:31 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 6 Jan 2006 16:35:50 -0500 User-Agent: KMail/1.8.2 References: <20060106205744.O13365@erdgeist.org> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> In-Reply-To: <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601061635.51715.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1234/Fri Jan 6 08:54:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: hackers@freebsd.org, Dirk Engling , Ceri Davies Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 21:36:33 -0000 On Friday 06 January 2006 04:10 pm, Ceri Davies wrote: > On 6 Jan 2006, at 20:59, Dirk Engling wrote: > > On Fri, 6 Jan 2006, Matt Emmerton wrote: > >> What about pkg_fetch -R? > > > > This command is not in the base system. Since there is some logic > > in pkg_add for resolving dependencies and fetching packages I > > hoped, there might be some easy way not involving additional > > dependencies. > > The package cluster uses chroot() for this. I use a shell script that downloads a package with fetch, extracts +CONTENTS to a temporary directory and parses it for dependencies, then downloads any missing dependencies and adds them. It's not too hard to do, but it would be handy to have this feature built into pkg_add itself perhaps. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 23:31:47 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA27A16A41F for ; Fri, 6 Jan 2006 23:31:47 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C456743D45 for ; Fri, 6 Jan 2006 23:31:46 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 2740 invoked by uid 0); 6 Jan 2006 23:30:55 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 6 Jan 2006 23:30:55 -0000 Date: Sat, 7 Jan 2006 00:30:55 +0100 (CET) From: Dirk Engling To: Ceri Davies In-Reply-To: <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> Message-ID: <20060107002724.S13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 23:31:47 -0000 On Fri, 6 Jan 2006, Ceri Davies wrote: > The package cluster uses chroot() for this. Sure, but some post install scripts better run inside the running jail, those script will do stuff like creating users and installing files with user ids that are not even there in the host system. Thanks anyway. erdgeist From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 23:41:34 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FDD616A420 for ; Fri, 6 Jan 2006 23:41:34 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BB0043D46 for ; Fri, 6 Jan 2006 23:41:33 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 5046 invoked by uid 0); 6 Jan 2006 23:40:42 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 6 Jan 2006 23:40:42 -0000 Date: Sat, 7 Jan 2006 00:40:42 +0100 (CET) From: Dirk Engling To: John Baldwin In-Reply-To: <200601061635.51715.jhb@freebsd.org> Message-ID: <20060107003747.I13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> <200601061635.51715.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 23:41:34 -0000 On Fri, 6 Jan 2006, John Baldwin wrote: > I use a shell script that downloads a package with fetch, extracts +CONTENTS > to a temporary directory and parses it for dependencies, then downloads any > missing dependencies and adds them. This sounds like the most reasonable solution. I can't assume the user to run a current version of pkg_add and grepping for dependencies is not that hard.. only pity is that I would be duplicating code that is already there in the base system. Thanks erdgeist From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 6 23:56:33 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10F6F16A41F for ; Fri, 6 Jan 2006 23:56:33 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98A6943D46 for ; Fri, 6 Jan 2006 23:56:32 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from fenrir.wireless.private.submonkey.net ([192.168.11.23]) by shrike.submonkey.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.60 (FreeBSD)) (envelope-from ) id 1Ev1RY-000JKd-Rj; Fri, 06 Jan 2006 23:56:31 +0000 In-Reply-To: <20060107002724.S13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> <20060107002724.S13365@erdgeist.org> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <755A8F87-DE0E-488A-9FE3-35BC73E9659F@submonkey.net> Content-Transfer-Encoding: 7bit From: Ceri Davies Date: Fri, 6 Jan 2006 23:56:24 +0000 To: Dirk Engling X-Mailer: Apple Mail (2.746.2) Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 06 Jan 2006 23:56:33 -0000 On 6 Jan 2006, at 23:30, Dirk Engling wrote: > > On Fri, 6 Jan 2006, Ceri Davies wrote: > >> The package cluster uses chroot() for this. > > Sure, but some post install scripts better run inside the running > jail, those script will do stuff like creating users and installing > files with user ids that are not even there in the host system. I don't see your point. I thought you just wanted to download the packages and dependencies. Ceri From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 00:14:08 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A4A416A41F for ; Sat, 7 Jan 2006 00:14:08 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 277E743D4C for ; Sat, 7 Jan 2006 00:14:04 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 10777 invoked by uid 0); 7 Jan 2006 00:13:13 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 7 Jan 2006 00:13:13 -0000 Date: Sat, 7 Jan 2006 01:13:12 +0100 (CET) From: Dirk Engling To: Ceri Davies In-Reply-To: <755A8F87-DE0E-488A-9FE3-35BC73E9659F@submonkey.net> Message-ID: <20060107010543.F13365@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> <20060107002724.S13365@erdgeist.org> <755A8F87-DE0E-488A-9FE3-35BC73E9659F@submonkey.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 07 Jan 2006 00:14:08 -0000 On Fri, 6 Jan 2006, Ceri Davies wrote: > I don't see your point. I thought you just wanted to download the packages > and dependencies. Yes. pkg_add on the other hand leaves me with loads of _installed_ packages but without the package tars from the server. erdgeist From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 01:29: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 934D016A41F for ; Sat, 7 Jan 2006 01:29:12 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id BA03143D48 for ; Sat, 7 Jan 2006 01:29:11 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 65261 invoked by uid 399); 7 Jan 2006 01:29:10 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 7 Jan 2006 01:29:10 -0000 Message-ID: <43BF1965.8090607@FreeBSD.org> Date: Fri, 06 Jan 2006 17:29:09 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051226) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org, stefanf@freebsd.org Content-Type: multipart/mixed; boundary="------------010002090508020800080706" Cc: Subject: Small patch to sh.1 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, 07 Jan 2006 01:29:12 -0000 This is a multi-part message in MIME format. --------------010002090508020800080706 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Does the attached patch look reasonable? Doug -- This .signature sanitized for your protection --------------010002090508020800080706 Content-Type: text/plain; name="sh.1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sh.1.diff" Index: sh.1 =================================================================== RCS file: /usr/local/ncvs/src/bin/sh/sh.1,v retrieving revision 1.118 diff -u -r1.118 sh.1 --- sh.1 1 Jan 2006 16:02:12 -0000 1.118 +++ sh.1 7 Jan 2006 01:25:57 -0000 @@ -1140,6 +1140,10 @@ .Pp In addition, a parameter expansion can be modified by using one of the following formats. +For each of the formats below, +if the colon is ommitted the expansion will only be modified +if the parameter is unset. +It will not be modified if the parameter is null. .Bl -tag -width indent .It Li ${parameter:-word} Use Default Values. --------------010002090508020800080706-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 01:57: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4880D16A41F for ; Sat, 7 Jan 2006 01:57:20 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 7E6DB43D48 for ; Sat, 7 Jan 2006 01:57:19 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 77504 invoked by uid 399); 7 Jan 2006 01:57:18 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 7 Jan 2006 01:57:18 -0000 Message-ID: <43BF1FFD.5000406@FreeBSD.org> Date: Fri, 06 Jan 2006 17:57:17 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051226) MIME-Version: 1.0 To: Sam Lawrance References: <43BF1965.8090607@FreeBSD.org> <3260E93B-AC3C-402C-AF9C-186F347871E9@brooknet.com.au> In-Reply-To: <3260E93B-AC3C-402C-AF9C-186F347871E9@brooknet.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, stefanf@FreeBSD.org Subject: Re: Small patch to sh.1 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, 07 Jan 2006 01:57:20 -0000 Sam Lawrance wrote: > It's already mentioned at the end of the list of formats. Hrrm, so it is. Arguably it should be mentioned at the start, since it's easy to miss where it is (I certainly missed it, as did others). Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 02:00:25 2006 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE5DB16A425 for ; Sat, 7 Jan 2006 02:00:25 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from mvs4.plala.or.jp (c158132.vh.plala.or.jp [210.150.158.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id C61D743D46 for ; Sat, 7 Jan 2006 02:00:24 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from hub.bbnest.net ([220.108.134.229]) by mvs4.plala.or.jp with ESMTP id <20060107020023.DGTA4019.mvs4.plala.or.jp@hub.bbnest.net>; Sat, 7 Jan 2006 11:00:23 +0900 Received: from [10.0.0.2] (nest.bbnest.net [10.0.0.2]) by hub.bbnest.net (8.13.4/8.13.4) with ESMTP id k0720MBC026434; Sat, 7 Jan 2006 11:00:22 +0900 (JST) (envelope-from bland@FreeBSD.org) Message-ID: <43BF1FE3.2080602@FreeBSD.org> Date: Sat, 07 Jan 2006 10:56:51 +0900 From: Alexander Nedotsukov User-Agent: Thunderbird 1.5 (X11/20051227) MIME-Version: 1.0 To: Dirk Engling References: <20060106205744.O13365@erdgeist.org> In-Reply-To: <20060106205744.O13365@erdgeist.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: Using pkg_add fetch only 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, 07 Jan 2006 02:00:26 -0000 Hi, Please, do not forget to CC krion@ He is current maintainer of pkg* tools. All the best, Alexander. Dirk Engling wrote: > > Good evening, > > I'm writing on the ezjail project and want to be able to use the easy > interface of pkg_add to fetch packages recursively. > > This is _fetch_, not install them, since installation is expected to > happen at a later stage when starting up lots of jails each being > identical. > > Clearly pkg_add does not provide this option. Even if it would, it > would declare some dependencies fulfilled since packages are installed > in the hostsystem already. > > Anyone having an idea here, besides rewriting pkg_add? > > Regards > > erdgeist > _______________________________________________ > 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 Sat Jan 7 09: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFDC716A41F; Sat, 7 Jan 2006 09:30:47 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep19-int.chello.at (viefep11-int.chello.at [213.46.255.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id E62AE43D76; Sat, 7 Jan 2006 09:30:40 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep19-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060107093037.EBQT5601.viefep19-int.chello.at@wombat.fafoe.narf.at>; Sat, 7 Jan 2006 10:30:37 +0100 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 2C0E3BEAD; Sat, 7 Jan 2006 10:30:35 +0100 (CET) Date: Sat, 7 Jan 2006 10:30:34 +0100 From: Stefan Farfeleder To: Doug Barton Message-ID: <20060107093032.GA3712@wombat.fafoe.narf.at> Mail-Followup-To: Doug Barton , Sam Lawrance , freebsd-hackers@FreeBSD.org References: <43BF1965.8090607@FreeBSD.org> <3260E93B-AC3C-402C-AF9C-186F347871E9@brooknet.com.au> <43BF1FFD.5000406@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43BF1FFD.5000406@FreeBSD.org> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@FreeBSD.org, Sam Lawrance Subject: Re: Small patch to sh.1 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, 07 Jan 2006 09:30:47 -0000 On Fri, Jan 06, 2006 at 05:57:17PM -0800, Doug Barton wrote: > Sam Lawrance wrote: > > >It's already mentioned at the end of the list of formats. > > Hrrm, so it is. Arguably it should be mentioned at the start, since it's > easy to miss where it is (I certainly missed it, as did others). If you think that, please feel free to move it up. Stefan From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 12:49: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C722716A41F for ; Sat, 7 Jan 2006 12:49:04 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EAF243D49 for ; Sat, 7 Jan 2006 12:49:04 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by smtp4-g19.free.fr (Postfix) with ESMTP id 741004A6B2; Sat, 7 Jan 2006 13:49:03 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 4857D9B85B; Sat, 7 Jan 2006 12:49:06 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 2B68E405A; Sat, 7 Jan 2006 13:49:06 +0100 (CET) Date: Sat, 7 Jan 2006 13:49:06 +0100 From: Jeremie Le Hen To: OxY Message-ID: <20060107124906.GT90495@obiwan.tataz.chchile.org> References: <000f01c60ad9$f7732fa0$0201a8c0@oxy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000f01c60ad9$f7732fa0$0201a8c0@oxy> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: [fbsd] ipfw+nat 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, 07 Jan 2006 12:49:04 -0000 Hi, > i'd like to ask for your help, because i didn't find anything related about > this topic.. > i have a box, with public ip, which is connected to other clients through > openvpn (10.254.0.x) > i'd like to connect to the openvpn client's port (for example ssh) > through a public address port (x.x.x.x 16354) > > unfortunately i totally failed in this, can't even forward to my boxes > openvpn address.. > > tried this: > $cmd 00701 fwd 10.254.0.1,22 tcp from any to x.x.x.x 16354 > > no result, connection refused.. > it works well with datapipe, however i don't want to set up dozens of > datapipes :) > > natd is enabled, do i need it? or ipfw divert? > i have the following related in kernel conf: > > options IPFIREWALL > options IPFIREWALL_VERBOSE > options IPFIREWALL_VERBOSE_LIMIT=5 > options IPFIREWALL_DEFAULT_TO_ACCEPT > options IPFIREWALL_FORWARD Please post this on -ipfw@ or -net@. Thank you. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 13:38:51 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFE4D16A41F for ; Sat, 7 Jan 2006 13:38:51 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48CC043D45 for ; Sat, 7 Jan 2006 13:38:51 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1EvEHP-000GjE-MP; Sat, 07 Jan 2006 13:38:47 +0000 Date: Sat, 7 Jan 2006 13:38:47 +0000 From: Ceri Davies To: Dirk Engling Message-ID: <20060107133847.GJ86645@submonkey.net> Mail-Followup-To: Ceri Davies , Dirk Engling , hackers@freebsd.org References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> <20060107002724.S13365@erdgeist.org> <755A8F87-DE0E-488A-9FE3-35BC73E9659F@submonkey.net> <20060107010543.F13365@erdgeist.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VB1oQhYtJt8uuzk+" Content-Disposition: inline In-Reply-To: <20060107010543.F13365@erdgeist.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.11 Sender: Ceri Davies Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 07 Jan 2006 13:38:51 -0000 --VB1oQhYtJt8uuzk+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 07, 2006 at 01:13:12AM +0100, Dirk Engling wrote: >=20 > On Fri, 6 Jan 2006, Ceri Davies wrote: >=20 > >I don't see your point. I thought you just wanted to download the=20 > >packages and dependencies. >=20 > Yes. pkg_add on the other hand leaves me with loads of _installed_=20 > packages but without the package tars from the server. Two stage process. In chroot(), pkg_add -r portupgrade, then pkg_fetch -R the stuff you want. Once you're done you can just blow away the chroot environment and all the installed stuff. Sure, it'll install a bunch of other crap like ruby, but it's a lot easier than hacking up your own tool. Ceri --=20 Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Einstein (attrib.) --VB1oQhYtJt8uuzk+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDv8RnocfcwTS3JF8RAq4rAJ9gpwhh+KWqYif7GyXuJdmcXRsXKACfdNKy Zz/D5+2o/hEQUKnlU9foDjU= =0bnH -----END PGP SIGNATURE----- --VB1oQhYtJt8uuzk+-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 13:49:35 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A20E416A41F for ; Sat, 7 Jan 2006 13:49:35 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [80.237.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C62D43D45 for ; Sat, 7 Jan 2006 13:49:34 +0000 (GMT) (envelope-from erdgeist@erdgeist.org) Received: (qmail 85147 invoked by uid 0); 7 Jan 2006 13:48:40 -0000 Received: from erdgeist.org (erdgeist@erdgeist.org@80.237.196.15) by elektropost.org with AES256-SHA encrypted SMTP; 7 Jan 2006 13:48:40 -0000 Date: Sat, 7 Jan 2006 14:48:39 +0100 (CET) From: Dirk Engling To: Ceri Davies In-Reply-To: <20060107133847.GJ86645@submonkey.net> Message-ID: <20060107144020.M73297@erdgeist.org> References: <20060106205744.O13365@erdgeist.org> <00a201c61303$88d025d0$1200a8c0@gsicomp.on.ca> <20060106215502.H13365@erdgeist.org> <99814990-316A-4099-A96D-083F90E5689E@submonkey.net> <20060107002724.S13365@erdgeist.org> <755A8F87-DE0E-488A-9FE3-35BC73E9659F@submonkey.net> <20060107010543.F13365@erdgeist.org> <20060107133847.GJ86645@submonkey.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Using pkg_add fetch only 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, 07 Jan 2006 13:49:35 -0000 On Sat, 7 Jan 2006, Ceri Davies wrote: > Two stage process. In chroot(), pkg_add -r portupgrade, then pkg_fetch > -R the stuff you want. Once you're done you can just blow away the > chroot environment and all the installed stuff. So I win nothing besides having to set up a complicated three-stage chain. chroot() by itself will not be enough as long as the portupgrade tools are not compiled static. > Sure, it'll install a bunch of other crap like ruby, but it's a lot > easier than hacking up your own tool. >From the ezjail Homepage: "Since ezjail is written entirely in sh, there is no need to install other script languages into the Host-system" So: No way. But your help has pointed me into the right direction. erdgeist From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 01:41: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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D09416A41F; Sat, 7 Jan 2006 01:41:41 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92BA943D45; Sat, 7 Jan 2006 01:41:39 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k071fadH022585; Sat, 7 Jan 2006 12:41:36 +1100 Received: from [61.8.37.140] (ppp258C.dyn.pacific.net.au [61.8.37.140]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k071fY4C016163; Sat, 7 Jan 2006 12:41:35 +1100 In-Reply-To: <43BF1965.8090607@FreeBSD.org> References: <43BF1965.8090607@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3260E93B-AC3C-402C-AF9C-186F347871E9@brooknet.com.au> Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Sat, 7 Jan 2006 12:41:33 +1100 To: Doug Barton X-Mailer: Apple Mail (2.746.2) X-Mailman-Approved-At: Sat, 07 Jan 2006 20:36:14 +0000 Cc: freebsd-hackers@FreeBSD.org, stefanf@FreeBSD.org Subject: Re: Small patch to sh.1 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, 07 Jan 2006 01:41:41 -0000 On 07/01/2006, at 12:29 PM, Doug Barton wrote: > Does the attached patch look reasonable? > > Doug > > -- > > This .signature sanitized for your protection > > Index: sh.1 > =================================================================== > RCS file: /usr/local/ncvs/src/bin/sh/sh.1,v > retrieving revision 1.118 > diff -u -r1.118 sh.1 > --- sh.1 1 Jan 2006 16:02:12 -0000 1.118 > +++ sh.1 7 Jan 2006 01:25:57 -0000 > @@ -1140,6 +1140,10 @@ > .Pp > In addition, a parameter expansion can be modified by using one of > the > following formats. > +For each of the formats below, > +if the colon is ommitted the expansion will only be modified > +if the parameter is unset. > +It will not be modified if the parameter is null. > .Bl -tag -width indent > .It Li ${parameter:-word} > Use Default Values. It's already mentioned at the end of the list of formats. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 09:28:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 034F216A41F for ; Sat, 7 Jan 2006 09:28:09 +0000 (GMT) (envelope-from twickline@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D17C43D48 for ; Sat, 7 Jan 2006 09:28:05 +0000 (GMT) (envelope-from twickline@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so3499997nzo for ; Sat, 07 Jan 2006 01:28:05 -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=hs0W4BMTItOXO0PYyDYeToUXMp95IH13bwuSfmjtq/SXjKou5oYHsAmEx8L6s5aqJGSh9Zh8ytleGb0bO1eMMPZHSqbBXkhvB5RR/ZcdgkXh+yU1fNduN7oI651biNXqvvp7cuoD5/Pmt6ZKTB6BUlX+3JzG4dWGgqmn4IETjYI= Received: by 10.36.128.18 with SMTP id a18mr2134083nzd; Sat, 07 Jan 2006 01:28:05 -0800 (PST) Received: by 10.36.46.15 with HTTP; Sat, 7 Jan 2006 01:28:04 -0800 (PST) Message-ID: <53e3a9930601070128w6d5a736bl69e48840c92826ae@mail.gmail.com> Date: Sat, 7 Jan 2006 04:28:04 -0500 From: Tom Wickline To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Mailman-Approved-At: Sat, 07 Jan 2006 20:37:11 +0000 Subject: Microsoft Offfice on 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, 07 Jan 2006 09:28:09 -0000 Hello, I thought you guys would get a kick out of seeing Word 2003 running on Free= BSD.. Here is the link: http://wiki.winehq.org/Office-BSD?action=3Dshow Office 2000 runs fine but there are some Wine menubuilder bugs that cause some major problems with Office XP and 2003.. Tom From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 7 22:58:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE12616A41F for ; Sat, 7 Jan 2006 22:58:14 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) Received: from mail.npubs.com (mail.wsfamily.com [209.66.100.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id E263943D46 for ; Sat, 7 Jan 2006 22:58:12 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) From: Nate Nielsen User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: freebsd-hackers@freebsd.org References: <20060106022920.BF7DADCA990@mail.npubs.com> Content-Type: multipart/mixed; boundary="------------060508080200040308080909" Message-Id: <20060107231659.DD05BDCA9A5@mail.npubs.com> X-Virus-Scanned: ClamAV using ClamSMTP Date: Sat, 7 Jan 2006 23:17:00 +0000 (GMT) Subject: Re: Polling for devices other than NICs [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nielsen@memberwebs.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2006 22:58:15 -0000 This is a multi-part message in MIME format. --------------060508080200040308080909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Nate Nielsen wrote: > The polling functionality in FreeBSD is currently a bit NIC centric. > With a few changes other types devices can use the polling subsystem. > Attached is my first whack at this. > > This is some of my first hacking on the FreeBSD kernel. It'd be great if > there was someone who could take a look and help me get it right. Attached is a patch against HEAD. Cheers, Nate --------------060508080200040308080909 Content-Type: text/x-patch; name="device-polling-7.0-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="device-polling-7.0-2.patch" Index: dev/dc/if_dc.c =================================================================== RCS file: /home/ncvs/src/sys/dev/dc/if_dc.c,v retrieving revision 1.178 diff -p -U5 -r1.178 if_dc.c --- dev/dc/if_dc.c 28 Dec 2005 18:00:37 -0000 1.178 +++ dev/dc/if_dc.c 7 Jan 2006 22:20:46 -0000 @@ -2346,11 +2346,11 @@ dc_detach(device_t dev) ifp = sc->dc_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { DC_LOCK(sc); @@ -3045,12 +3045,13 @@ dc_tx_underrun(struct dc_softc *sc) #ifdef DEVICE_POLLING static poll_handler_t dc_poll; static void -dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +dc_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct dc_softc *sc = ifp->if_softc; DC_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -3691,11 +3692,11 @@ dc_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(dc_poll, ifp); + error = device_poll_register(dc_poll, ifp, ifp->if_xname); if (error) return(error); DC_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3704,11 +3705,11 @@ dc_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ DC_LOCK(sc); CSR_WRITE_4(sc, DC_IMR, DC_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; DC_UNLOCK(sc); Index: dev/em/if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.97 diff -p -U5 -r1.97 if_em.c --- dev/em/if_em.c 28 Dec 2005 09:37:04 -0000 1.97 +++ dev/em/if_em.c 7 Jan 2006 22:21:04 -0000 @@ -803,19 +803,19 @@ em_ioctl(struct ifnet *ifp, u_long comma reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(em_poll, ifp); + error = device_poll_register(em_poll, ifp, ifp->if_xname); if (error) return(error); EM_LOCK(adapter); em_disable_intr(adapter); ifp->if_capenable |= IFCAP_POLLING; EM_UNLOCK(adapter); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupt even in error case */ EM_LOCK(adapter); em_enable_intr(adapter); ifp->if_capenable &= ~IFCAP_POLLING; EM_UNLOCK(adapter); @@ -1039,12 +1039,13 @@ em_poll_locked(struct ifnet *ifp, enum p if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); } static void -em_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +em_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct adapter *adapter = ifp->if_softc; EM_LOCK(adapter); if (ifp->if_drv_flags & IFF_DRV_RUNNING) em_poll_locked(ifp, cmd, count); Index: dev/firewire/if_fwe.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/if_fwe.c,v retrieving revision 1.41 diff -p -U5 -r1.41 if_fwe.c --- dev/firewire/if_fwe.c 11 Oct 2005 07:30:06 -0000 1.41 +++ dev/firewire/if_fwe.c 7 Jan 2006 22:21:04 -0000 @@ -104,12 +104,13 @@ TUNABLE_INT("hw.firewire.fwe.rx_queue_le #ifdef DEVICE_POLLING static poll_handler_t fwe_poll; static void -fwe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fwe_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fwe_softc *fwe; struct firewire_comm *fc; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return; @@ -290,11 +291,11 @@ fwe_detach(device_t dev) fwe = device_get_softc(dev); ifp = fwe->eth_softc.ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif s = splimp(); fwe_stop(fwe); #if defined(__DragonFly__) || __FreeBSD_version < 500000 @@ -462,21 +463,21 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, struct ifreq *ifr = (struct ifreq *) data; struct firewire_comm *fc = fc = fwe->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(fwe_poll, ifp); + error = device_poll_register(fwe_poll, ifp); if (error) return(error); /* Disable interrupts */ fc->set_intr(fc, 0); ifp->if_capenable |= IFCAP_POLLING; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp); /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; return (error); } Index: dev/firewire/if_fwip.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/if_fwip.c,v retrieving revision 1.11 diff -p -U5 -r1.11 if_fwip.c --- dev/firewire/if_fwip.c 5 Oct 2005 10:09:14 -0000 1.11 +++ dev/firewire/if_fwip.c 7 Jan 2006 22:21:05 -0000 @@ -111,12 +111,13 @@ TUNABLE_INT("hw.firewire.fwip.rx_queue_l #ifdef DEVICE_POLLING static poll_handler_t fwip_poll; static void -fwip_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fwip_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fwip_softc *fwip; struct firewire_comm *fc; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return; @@ -272,11 +273,11 @@ fwip_detach(device_t dev) fwip = (struct fwip_softc *)device_get_softc(dev); ifp = fwip->fw_softc.fwip_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif s = splimp(); fwip_stop(fwip); @@ -444,22 +445,22 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd struct ifreq *ifr = (struct ifreq *) data; struct firewire_comm *fc = fc = fwip->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(fwip_poll, ifp); + error = device_poll_register(fwip_poll, ifp, ifp->if_xname); if (error) return(error); /* Disable interrupts */ fc->set_intr(fc, 0); ifp->if_capenable |= IFCAP_POLLING; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; return (error); } Index: dev/fxp/if_fxp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v retrieving revision 1.252 diff -p -U5 -r1.252 if_fxp.c --- dev/fxp/if_fxp.c 12 Dec 2005 14:30:13 -0000 1.252 +++ dev/fxp/if_fxp.c 7 Jan 2006 22:21:06 -0000 @@ -45,10 +45,11 @@ __FBSDID("$FreeBSD: src/sys/dev/fxp/if_f /* #include */ #include #include #include #include +#include #include #include #include @@ -895,11 +896,11 @@ fxp_detach(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); #ifdef DEVICE_POLLING if (sc->ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(sc->ifp); + device_poll_deregister(sc->ifp, sc->ifp->if_xname); #endif FXP_LOCK(sc); sc->suspended = 1; /* Do same thing as we do for suspend */ /* @@ -1449,12 +1450,13 @@ fxp_encap(struct fxp_softc *sc, struct m #ifdef DEVICE_POLLING static poll_handler_t fxp_poll; static void -fxp_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +fxp_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct fxp_softc *sc = ifp->if_softc; uint8_t statack; FXP_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -2413,20 +2415,20 @@ fxp_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: mask = ifp->if_capenable ^ ifr->ifr_reqcap; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(fxp_poll, ifp); + error = device_poll_register(fxp_poll, ifp, ifp->if_xname); if (error) return(error); FXP_LOCK(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); ifp->if_capenable |= IFCAP_POLLING; FXP_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts in any case */ FXP_LOCK(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); ifp->if_capenable &= ~IFCAP_POLLING; FXP_UNLOCK(sc); Index: dev/ixgb/if_ixgb.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ixgb/if_ixgb.c,v retrieving revision 1.18 diff -p -U5 -r1.18 if_ixgb.c --- dev/ixgb/if_ixgb.c 18 Dec 2005 18:24:26 -0000 1.18 +++ dev/ixgb/if_ixgb.c 7 Jan 2006 22:21:07 -0000 @@ -375,11 +375,11 @@ ixgb_detach(device_t dev) INIT_DEBUGOUT("ixgb_detach: begin"); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif IXGB_LOCK(adapter); adapter->in_detach = 1; @@ -570,19 +570,19 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(ixgb_poll, ifp); + error = device_poll_register(ixgb_poll, ifp, ifp->if_xname); if (error) return(error); IXGB_LOCK(adapter); ixgb_disable_intr(adapter); ifp->if_capenable |= IFCAP_POLLING; IXGB_UNLOCK(adapter); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupt even in error case */ IXGB_LOCK(adapter); ixgb_enable_intr(adapter); ifp->if_capenable &= ~IFCAP_POLLING; IXGB_UNLOCK(adapter); @@ -772,12 +772,13 @@ ixgb_poll_locked(struct ifnet * ifp, enu if (ifp->if_snd.ifq_head != NULL) ixgb_start_locked(ifp); } static void -ixgb_poll(struct ifnet * ifp, enum poll_cmd cmd, int count) +ixgb_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct adapter *adapter = ifp->if_softc; IXGB_LOCK(adapter); if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgb_poll_locked(ifp, cmd, count); Index: dev/nge/if_nge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/nge/if_nge.c,v retrieving revision 1.85 diff -p -U5 -r1.85 if_nge.c --- dev/nge/if_nge.c 18 Dec 2005 18:24:26 -0000 1.85 +++ dev/nge/if_nge.c 7 Jan 2006 22:21:08 -0000 @@ -948,11 +948,11 @@ nge_detach(dev) sc = device_get_softc(dev); ifp = sc->nge_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif NGE_LOCK(sc); nge_reset(sc); nge_stop(sc); NGE_UNLOCK(sc); @@ -1355,12 +1355,13 @@ nge_tick(xsc) #ifdef DEVICE_POLLING static poll_handler_t nge_poll; static void -nge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +nge_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct nge_softc *sc = ifp->if_softc; NGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { NGE_UNLOCK(sc); @@ -2039,11 +2040,11 @@ nge_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(nge_poll, ifp); + error = device_poll_register(nge_poll, ifp, ifp->if_xname); if (error) return(error); NGE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, NGE_IER, 0); @@ -2052,11 +2053,11 @@ nge_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ NGE_LOCK(sc); CSR_WRITE_4(sc, NGE_IER, 1); ifp->if_capenable &= ~IFCAP_POLLING; NGE_UNLOCK(sc); Index: dev/re/if_re.c =================================================================== RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v retrieving revision 1.62 diff -p -U5 -r1.62 if_re.c --- dev/re/if_re.c 18 Dec 2005 18:24:26 -0000 1.62 +++ dev/re/if_re.c 7 Jan 2006 22:21:17 -0000 @@ -218,11 +218,11 @@ static __inline void re_fixup_rx (struct mbuf *); #endif static void re_rxeof (struct rl_softc *); static void re_txeof (struct rl_softc *); #ifdef DEVICE_POLLING -static void re_poll (struct ifnet *, enum poll_cmd, int); +static void re_poll (void *arg, enum poll_cmd, int); static void re_poll_locked (struct ifnet *, enum poll_cmd, int); #endif static void re_intr (void *); static void re_tick (void *); static void re_start (struct ifnet *); @@ -1281,11 +1281,11 @@ re_detach(dev) ifp = sc->rl_ifp; KASSERT(mtx_initialized(&sc->rl_mtx), ("re mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { RL_LOCK(sc); @@ -1774,12 +1774,13 @@ re_tick(xsc) callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } #ifdef DEVICE_POLLING static void -re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +re_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) re_poll_locked(ifp, cmd, count); @@ -2335,21 +2336,21 @@ re_ioctl(ifp, command, data) { int mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(re_poll, ifp); + error = device_poll_register(re_poll, ifp, ifp->if_xname); if (error) return(error); RL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); ifp->if_capenable |= IFCAP_POLLING; RL_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ RL_LOCK(sc); CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); ifp->if_capenable &= ~IFCAP_POLLING; RL_UNLOCK(sc); Index: dev/vge/if_vge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/vge/if_vge.c,v retrieving revision 1.23 diff -p -U5 -r1.23 if_vge.c --- dev/vge/if_vge.c 18 Dec 2005 18:24:27 -0000 1.23 +++ dev/vge/if_vge.c 7 Jan 2006 22:21:18 -0000 @@ -1107,11 +1107,11 @@ vge_detach(dev) KASSERT(mtx_initialized(&sc->vge_mtx), ("vge mutex not initialized")); ifp = sc->vge_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { vge_stop(sc); @@ -1620,12 +1620,13 @@ vge_tick(xsc) return; } #ifdef DEVICE_POLLING static void -vge_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) +vge_poll (void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct vge_softc *sc = ifp->if_softc; VGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) goto done; @@ -2259,21 +2260,21 @@ vge_ioctl(ifp, command, data) { int mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(vge_poll, ifp); + error = device_poll_register(vge_poll, ifp, ifp->if_xname); if (error) return(error); VGE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, VGE_IMR, 0); CSR_WRITE_1(sc, VGE_CRC3, VGE_CR3_INT_GMSK); ifp->if_capenable |= IFCAP_POLLING; VGE_UNLOCK(sc); } else { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ VGE_LOCK(sc); CSR_WRITE_4(sc, VGE_IMR, VGE_INTRS); CSR_WRITE_4(sc, VGE_ISR, 0xFFFFFFFF); CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); Index: kern/kern_poll.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_poll.c,v retrieving revision 1.25 diff -p -U5 -r1.25 kern_poll.c --- kern/kern_poll.c 5 Oct 2005 10:09:16 -0000 1.25 +++ kern/kern_poll.c 7 Jan 2006 22:21:19 -0000 @@ -35,10 +35,11 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_po #include #include /* needed by net/if.h */ #include #include #include +#include #include /* for IFF_* flags */ #include /* for NETISR_POLL */ #include @@ -48,11 +49,11 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_po static void netisr_poll(void); /* the two netisr handlers */ static void netisr_pollmore(void); static int poll_switch(SYSCTL_HANDLER_ARGS); void hardclock_device_poll(void); /* hook from hardclock */ -void ether_poll(int); /* polling in idle loop */ +void device_poll(int); /* polling in idle loop */ static struct mtx poll_mtx; /* * Polling support for [network] device drivers. @@ -61,11 +62,12 @@ static struct mtx poll_mtx; * polling code. * * If registration is successful, the driver must disable interrupts, * and further I/O is performed through the handler, which is invoked * (at least once per clock tick) with 3 arguments: the "arg" passed at - * register time (a struct ifnet pointer), a command, and a "count" limit. + * register time (a softc, device, or ifnet pointer), a command, + * and a "count" limit. * * The command can be one of the following: * POLL_ONLY: quick move of "count" packets from input/output queues. * POLL_AND_CHECK_STATUS: as above, plus check status registers or do * other more expensive operations. This command is issued periodically @@ -250,11 +252,11 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, idl #define POLL_LIST_LEN 128 struct pollrec { poll_handler_t *handler; - struct ifnet *ifp; + void *arg; }; static struct pollrec pr[POLL_LIST_LEN]; static void @@ -320,25 +322,25 @@ hardclock_device_poll(void) if (pending_polls++ > 0) lost_polls++; } /* - * ether_poll is called from the idle loop. + * device_poll is called from the idle loop. */ void -ether_poll(int count) +device_poll(int count) { int i; NET_LOCK_GIANT(); mtx_lock(&poll_mtx); if (count > poll_each_burst) count = poll_each_burst; for (i = 0 ; i < poll_handlers ; i++) - pr[i].handler(pr[i].ifp, POLL_ONLY, count); + pr[i].handler(pr[i].arg, POLL_ONLY, count); mtx_unlock(&poll_mtx); NET_UNLOCK_GIANT(); } @@ -433,30 +435,30 @@ netisr_poll(void) cycles = (residual_burst < poll_each_burst) ? residual_burst : poll_each_burst; residual_burst -= cycles; for (i = 0 ; i < poll_handlers ; i++) - pr[i].handler(pr[i].ifp, arg, cycles); + pr[i].handler(pr[i].arg, arg, cycles); phase = 4; mtx_unlock(&poll_mtx); } /* * Try to register routine for polling. Returns 0 if successful * (and polling should be enabled), error code otherwise. * A device is not supposed to register itself multiple times. * - * This is called from within the *_ioctl() functions. + * This is called from within the interface *_ioctl() functions. */ int -ether_poll_register(poll_handler_t *h, struct ifnet *ifp) +device_poll_register(poll_handler_t *h, void *arg, const char *devname) { int i; KASSERT(h != NULL, ("%s: handler is NULL", __func__)); - KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); + KASSERT(arg != NULL, ("%s: arg is NULL", __func__)); NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); if (poll_handlers >= POLL_LIST_LEN) { @@ -476,58 +478,73 @@ ether_poll_register(poll_handler_t *h, s mtx_unlock(&poll_mtx); return (ENOMEM); /* no polling for you */ } for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].ifp == ifp && pr[i].handler != NULL) { + if (pr[i].arg == arg && pr[i].handler != NULL) { mtx_unlock(&poll_mtx); - log(LOG_DEBUG, "ether_poll_register: %s: handler" - " already registered\n", ifp->if_xname); + log(LOG_DEBUG, "device_poll_register: %s: handler" + " already registered\n", devname ? devname : "UNKNOWN"); return (EEXIST); } pr[poll_handlers].handler = h; - pr[poll_handlers].ifp = ifp; + pr[poll_handlers].arg = arg; poll_handlers++; mtx_unlock(&poll_mtx); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); return (0); } /* - * Remove interface from the polling list. Called from *_ioctl(), too. + * Remove device from the polling list. Called from *_ioctl(), too. */ int -ether_poll_deregister(struct ifnet *ifp) +device_poll_deregister(void *arg, const char *devname) { int i; - KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); + KASSERT(arg != NULL, ("%s: arg is NULL", __func__)); NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].ifp == ifp) /* found it */ + if (pr[i].arg == arg) /* found it */ break; if (i == poll_handlers) { - log(LOG_DEBUG, "ether_poll_deregister: %s: not found!\n", - ifp->if_xname); + log(LOG_DEBUG, "device_poll_deregister: %s: not found!\n", + devname ? devname : "UNKNOWN"); mtx_unlock(&poll_mtx); return (ENOENT); } poll_handlers--; if (i < poll_handlers) { /* Last entry replaces this one. */ pr[i].handler = pr[poll_handlers].handler; - pr[i].ifp = pr[poll_handlers].ifp; + pr[i].arg = pr[poll_handlers].arg; } mtx_unlock(&poll_mtx); return (0); } /* + * Deprecated compatibility functions for external drivers. + */ +int +ether_poll_register(void *h, struct ifnet *ifp) +{ + return device_poll_register((poll_handler_t*)h, ifp, ifp->if_xname); +} + +int +ether_poll_deregister(struct ifnet *ifp) +{ + return device_poll_deregister(ifp, ifp->if_xname); +} + +/* * Legacy interface for turning polling on all interfaces at one time. */ static int poll_switch(SYSCTL_HANDLER_ARGS) { @@ -565,11 +582,12 @@ poll_switch(SYSCTL_HANDLER_ARGS) } } IFNET_RUNLOCK(); NET_UNLOCK_GIANT(); - log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); + log(LOG_ERR, "kern.polling.enable (which enables polling on all interfaces) " + "is deprecated. Use ifconfig(8)"); return (0); } static void @@ -587,11 +605,11 @@ poll_idle(void) mtx_unlock_spin(&sched_lock); for (;;) { if (poll_in_idle_loop && poll_handlers > 0) { idlepoll_sleeping = 0; - ether_poll(poll_each_burst); + device_poll(poll_each_burst); mtx_lock_spin(&sched_lock); mi_switch(SW_VOL, NULL); mtx_unlock_spin(&sched_lock); } else { idlepoll_sleeping = 1; Index: net/if_var.h =================================================================== RCS file: /home/ncvs/src/sys/net/if_var.h,v retrieving revision 1.105 diff -p -U5 -r1.105 if_var.h --- net/if_var.h 11 Nov 2005 16:04:48 -0000 1.105 +++ net/if_var.h 7 Jan 2006 22:21:23 -0000 @@ -658,14 +658,12 @@ void if_deregister_com_alloc(u_char type #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) #ifdef DEVICE_POLLING -enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; - -typedef void poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count); -int ether_poll_register(poll_handler_t *h, struct ifnet *ifp); +/* DEPRECATED: For compatibility only. Use device_poll_register/deregister */ +int ether_poll_register(void*, struct ifnet *ifp); int ether_poll_deregister(struct ifnet *ifp); #endif /* DEVICE_POLLING */ #endif /* _KERNEL */ Index: pci/if_rl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_rl.c,v retrieving revision 1.162 diff -p -U5 -r1.162 if_rl.c --- pci/if_rl.c 11 Nov 2005 16:04:58 -0000 1.162 +++ pci/if_rl.c 7 Jan 2006 22:21:34 -0000 @@ -197,11 +197,11 @@ static int rl_mii_readreg(struct rl_soft static int rl_mii_writereg(struct rl_softc *, struct rl_mii_frame *); static int rl_miibus_readreg(device_t, int, int); static void rl_miibus_statchg(device_t); static int rl_miibus_writereg(device_t, int, int, int); #ifdef DEVICE_POLLING -static void rl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void rl_poll(void *arg, enum poll_cmd cmd, int count); static void rl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static int rl_probe(device_t); static void rl_read_eeprom(struct rl_softc *, uint8_t *, int, int, int); static void rl_reset(struct rl_softc *); @@ -1004,11 +1004,11 @@ rl_detach(device_t dev) KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { RL_LOCK(sc); rl_stop(sc); @@ -1283,12 +1283,13 @@ rl_tick(void *xsc) callout_reset(&sc->rl_stat_callout, hz, rl_tick, sc); } #ifdef DEVICE_POLLING static void -rl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +rl_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) rl_poll_locked(ifp, cmd, count); @@ -1659,11 +1660,11 @@ rl_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(rl_poll, ifp); + error = device_poll_register(rl_poll, ifp, ifp->if_xname); if (error) return(error); RL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); @@ -1672,11 +1673,11 @@ rl_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ RL_LOCK(sc); CSR_WRITE_2(sc, RL_IMR, RL_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; RL_UNLOCK(sc); Index: pci/if_sf.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sf.c,v retrieving revision 1.92 diff -p -U5 -r1.92 if_sf.c --- pci/if_sf.c 11 Nov 2005 16:04:58 -0000 1.92 +++ pci/if_sf.c 7 Jan 2006 22:21:35 -0000 @@ -167,11 +167,11 @@ static u_int8_t sf_read_eeprom(struct sf static int sf_miibus_readreg(device_t, int, int); static int sf_miibus_writereg(device_t, int, int, int); static void sf_miibus_statchg(device_t); #ifdef DEVICE_POLLING -static void sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void sf_poll(void *arg, enum poll_cmd cmd, int count); static void sf_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static u_int32_t csr_read_4(struct sf_softc *, int); static void csr_write_4(struct sf_softc *, int, u_int32_t); @@ -563,11 +563,11 @@ sf_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(sf_poll, ifp); + error = device_poll_register(sf_poll, ifp, ifp->if_xname); if (error) return(error); SF_LOCK(sc); /* Disable interrupts */ csr_write_4(sc, SF_IMR, 0x00000000); @@ -576,11 +576,11 @@ sf_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ SF_LOCK(sc); csr_write_4(sc, SF_IMR, SF_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; SF_UNLOCK(sc); @@ -817,11 +817,11 @@ sf_detach(dev) KASSERT(mtx_initialized(&sc->sf_mtx), ("sf mutex not initialized")); ifp = sc->sf_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { SF_LOCK(sc); @@ -1090,12 +1090,13 @@ sf_txthresh_adjust(sc) } } #ifdef DEVICE_POLLING static void -sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +sf_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct sf_softc *sc = ifp->if_softc; SF_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) sf_poll_locked(ifp, cmd, count); Index: pci/if_sis.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sis.c,v retrieving revision 1.144 diff -p -U5 -r1.144 if_sis.c --- pci/if_sis.c 11 Nov 2005 16:04:58 -0000 1.144 +++ pci/if_sis.c 7 Jan 2006 22:21:36 -0000 @@ -1260,11 +1260,11 @@ sis_detach(device_t dev) KASSERT(mtx_initialized(&sc->sis_mtx), ("sis mutex not initialized")); ifp = sc->sis_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded. */ if (device_is_attached(dev)) { SIS_LOCK(sc); @@ -1576,12 +1576,13 @@ sis_tick(void *xsc) #ifdef DEVICE_POLLING static poll_handler_t sis_poll; static void -sis_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +sis_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct sis_softc *sc = ifp->if_softc; SIS_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { SIS_UNLOCK(sc); @@ -2134,11 +2135,11 @@ sis_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: /* ok, disable interrupts */ #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(sis_poll, ifp); + error = device_poll_register(sis_poll, ifp, ifp->if_xname); if (error) return(error); SIS_LOCK(sc); /* Disable interrupts */ CSR_WRITE_4(sc, SIS_IER, 0); @@ -2147,11 +2148,11 @@ sis_ioctl(struct ifnet *ifp, u_long comm return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ SIS_LOCK(sc); CSR_WRITE_4(sc, SIS_IER, 1); ifp->if_capenable &= ~IFCAP_POLLING; SIS_UNLOCK(sc); Index: pci/if_ste.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_ste.c,v retrieving revision 1.94 diff -p -U5 -r1.94 if_ste.c --- pci/if_ste.c 11 Nov 2005 16:04:58 -0000 1.94 +++ pci/if_ste.c 7 Jan 2006 22:21:37 -0000 @@ -615,22 +615,11 @@ ste_setmulti(sc) return; } #ifdef DEVICE_POLLING -static poll_handler_t ste_poll, ste_poll_locked; - -static void -ste_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct ste_softc *sc = ifp->if_softc; - - STE_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ste_poll_locked(ifp, cmd, count); - STE_UNLOCK(sc); -} +static poll_handler_t ste_poll; static void ste_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct ste_softc *sc = ifp->if_softc; @@ -665,10 +654,23 @@ ste_poll_locked(struct ifnet *ifp, enum ste_reset(sc); ste_init_locked(sc); } } } + +static void +ste_poll(void *arg, enum poll_cmd cmd, int count) +{ + struct ifnet *ifp = arg; + struct ste_softc *sc = ifp->if_softc; + + STE_LOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ste_poll_locked(ifp, cmd, count); + STE_UNLOCK(sc); +} + #endif /* DEVICE_POLLING */ static void ste_intr(xsc) void *xsc; @@ -1145,11 +1147,11 @@ ste_detach(dev) KASSERT(mtx_initialized(&sc->ste_mtx), ("ste mutex not initialized")); ifp = sc->ste_ifp; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { STE_LOCK(sc); @@ -1533,11 +1535,11 @@ ste_ioctl(ifp, command, data) break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(ste_poll, ifp); + error = device_poll_register(ste_poll, ifp, ifp->if_xname); if (error) return(error); STE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, STE_IMR, 0); @@ -1546,11 +1548,11 @@ ste_ioctl(ifp, command, data) return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ STE_LOCK(sc); CSR_WRITE_2(sc, STE_IMR, STE_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; STE_UNLOCK(sc); Index: pci/if_vr.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_vr.c,v retrieving revision 1.114 diff -p -U5 -r1.114 if_vr.c --- pci/if_vr.c 11 Nov 2005 16:04:58 -0000 1.114 +++ pci/if_vr.c 7 Jan 2006 22:21:38 -0000 @@ -794,11 +794,11 @@ vr_detach(device_t dev) KASSERT(mtx_initialized(&sc->vr_mtx), ("vr mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { VR_LOCK(sc); @@ -1140,22 +1140,10 @@ vr_tick(void *xsc) callout_reset(&sc->vr_stat_callout, hz, vr_tick, sc); } #ifdef DEVICE_POLLING static poll_handler_t vr_poll; -static poll_handler_t vr_poll_locked; - -static void -vr_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct vr_softc *sc = ifp->if_softc; - - VR_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - vr_poll_locked(ifp, cmd, count); - VR_UNLOCK(sc); -} static void vr_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct vr_softc *sc = ifp->if_softc; @@ -1213,10 +1201,23 @@ vr_poll_locked(struct ifnet *ifp, enum p VR_SETBIT16(sc, VR_COMMAND, VR_CMD_TX_GO); } } } } + +static void +vr_poll(void *arg, enum poll_cmd cmd, int count) +{ + struct ifnet *ifp = arg; + struct vr_softc *sc = ifp->if_softc; + + VR_LOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + vr_poll_locked(ifp, cmd, count); + VR_UNLOCK(sc); +} + #endif /* DEVICE_POLLING */ static void vr_intr(void *arg) { @@ -1595,11 +1596,11 @@ vr_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(vr_poll, ifp); + error = device_poll_register(vr_poll, ifp, ifp->if_xname); if (error) return(error); VR_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, VR_IMR, 0x0000); @@ -1608,11 +1609,11 @@ vr_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ VR_LOCK(sc); CSR_WRITE_2(sc, VR_IMR, VR_INTRS); ifp->if_capenable &= ~IFCAP_POLLING; VR_UNLOCK(sc); Index: pci/if_xl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_xl.c,v retrieving revision 1.201 diff -p -U5 -r1.201 if_xl.c --- pci/if_xl.c 11 Nov 2005 16:04:58 -0000 1.201 +++ pci/if_xl.c 7 Jan 2006 22:21:39 -0000 @@ -249,11 +249,11 @@ static void xl_watchdog(struct ifnet *); static void xl_shutdown(device_t); static int xl_suspend(device_t); static int xl_resume(device_t); #ifdef DEVICE_POLLING -static void xl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static void xl_poll(void *arg, enum poll_cmd cmd, int count); static void xl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif static int xl_ifmedia_upd(struct ifnet *); static void xl_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1694,11 +1694,11 @@ xl_detach(device_t dev) KASSERT(mtx_initialized(&sc->xl_mtx), ("xl mutex not initialized")); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); + device_poll_deregister(ifp, ifp->if_xname); #endif if (sc->xl_flags & XL_FLAG_USE_MMIO) { rid = XL_PCI_LOMEM; res = SYS_RES_MEMORY; @@ -2341,12 +2341,13 @@ xl_intr(void *arg) XL_UNLOCK(sc); } #ifdef DEVICE_POLLING static void -xl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +xl_poll(void *arg, enum poll_cmd cmd, int count) { + struct ifnet *ifp = arg; struct xl_softc *sc = ifp->if_softc; XL_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) xl_poll_locked(ifp, cmd, count); @@ -3188,11 +3189,11 @@ xl_ioctl(struct ifnet *ifp, u_long comma break; case SIOCSIFCAP: #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(xl_poll, ifp); + error = device_poll_register(xl_poll, ifp, ifp->if_xname); if (error) return(error); XL_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|0); @@ -3201,11 +3202,11 @@ xl_ioctl(struct ifnet *ifp, u_long comma return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); + error = device_poll_deregister(ifp, ifp->if_xname); /* Enable interrupts. */ XL_LOCK(sc); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|0xFF); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|XL_INTRS); if (sc->xl_flags & XL_FLAG_FUNCREG) Index: sys/bus.h =================================================================== RCS file: /home/ncvs/src/sys/sys/bus.h,v retrieving revision 1.73 diff -p -U5 -r1.73 bus.h --- sys/bus.h 24 Sep 2005 20:11:06 -0000 1.73 +++ sys/bus.h 7 Jan 2006 22:21:40 -0000 @@ -459,10 +459,20 @@ void bus_data_generation_update(void); /** * Shorthand for constructing method tables. */ #define DEVMETHOD KOBJMETHOD +/* Device polling functionality */ +#ifdef DEVICE_POLLING + +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; +typedef void poll_handler_t(void *arg, enum poll_cmd cmd, int count); +int device_poll_register(poll_handler_t *h, void *arg, const char *devname); +int device_poll_deregister(void *arg, const char *devname); + +#endif /* DEVICE_POLLING */ + /* * Some common device interfaces. */ #include "device_if.h" #include "bus_if.h" --------------060508080200040308080909--