Date: Wed, 8 Nov 2000 01:18:29 -0800 (PST) From: Jacques Fourie <jacques4i@yahoo.com> To: Mike Smith <msmith@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: kernel stack size? Message-ID: <20001108091829.24085.qmail@web3504.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
First of all, I would like to say a big thanks for all of the replies I got so far. I really appreciate it. Here is a more detailed description of what the code does. It is for a commercial IPsec product. I know that IPsec is available in FreeBSD, but this started long before KAME was available. Using KAME is not an option for me, so I'm stuck with this. The basic idea is to modify the ether_input() and ether_output_frame() routines to add hooks for IPsec processing. In ether_input() mbufs are placed on a queue in a similar way to that done in ether_demux(). The reason that it is done here is that we want to operate in a "bump-in-the-wire" mode. This basically boils down to bridging + IPsec. After queuing the mbuf a netisr is scheduled. Inside this interrupt routine the mbuf is passed on to the IPsec processing code. The IPsec processing code performs all the transforms required on the packet (crypto + hashing etc.) Inside this code some of the routines use large local variables (contexts for the crypto and hashing etc.) I can malloc these variables and live with the performance loss or pre-alloc as previouslu discussed. Once the IPsec processing is finished, another function is called to send packets out on the interface in question. This is where another problem pitches up. The function called to begin IPsec processing on the packet only returns once the packet has been sent out on the wire eventually. This leads to a deeply recursed call stack which I think is part of the problem. In routine operation this is about 20 function calls long which leaves very little space for local variables, if at all. Any ideas (except for re-writes :) )? regards, jacques __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one Place. http://shopping.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001108091829.24085.qmail>