Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 12:48:05 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@freebsd.org, Poul-Henning Kamp <phk@freebsd.org>, Alfred Perlstein <bright@mu.org>
Subject:   Re: Kernel stack size and stacking: do we have a problem ?
Message-ID:  <Pine.BSF.4.21.0112201244380.46573-100000@InterJet.elischer.org>
In-Reply-To: <XFMail.011220124112.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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.

> 
> -- 
> 
> John Baldwin <jhb@FreeBSD.org>  <><  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
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0112201244380.46573-100000>