From owner-freebsd-arch Thu Dec 20 13:15:56 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 66AFE37B417 for ; Thu, 20 Dec 2001 13:15:44 -0800 (PST) Received: (qmail 32377 invoked from network); 20 Dec 2001 21:15:43 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 Dec 2001 21:15:43 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 20 Dec 2001 13:15:26 -0800 (PST) From: John Baldwin To: Julian Elischer Subject: Re: Kernel stack size and stacking: do we have a problem ? Cc: Alfred Perlstein , Poul-Henning Kamp , arch@freebsd.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 20-Dec-01 Julian Elischer wrote: > > > On Thu, 20 Dec 2001, John Baldwin wrote: > >> >> On 20-Dec-01 Julian Elischer wrote: >> > basically yes, after N levels, switch to what netisr() does. >> > then you get another N levels :-) The reason I hadn't checked it in is >> > because I was thinking about whether it should be N levels or N bytes of >> > stack used.... >> >> It should be based on how much stack room is left. > yes that is what I was thinking.. > > curthread->kstack is the last valid location so it's actually very easy. > > But I wanted to actually 'drop' the packet if it went through > a total of some maximum number of nodes allowed.. > e.g. 64.. I can't imagine a practical application that requires a packet > to go through 64 successive layers of en(de)capsulation.. :-) > > It may be worth keeping a counter AND doing the stack check. The counter is something that is netgraph specific. The idea of checking the stack and pushing the work off onto a thread if we run out of room isn't. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message