This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: CYGPKG_NET_MEM_USAGE default value
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Darryl Palmer <dpalmer at tootbee dot com>
- Cc: ecos-devel at sources dot redhat dot com
- Date: Thu, 18 Mar 2004 16:06:16 +0100
- Subject: Re: CYGPKG_NET_MEM_USAGE default value
- References: <4057FD41.6090301@tootbee.com>
On Wed, Mar 17, 2004 at 01:24:49AM -0600, Darryl Palmer wrote:
> I just CVS updated ecos and I think that there is a problem with the
> default value for CYGPKG_NET_MEM_USAGE for FreeBSD networking stack. I
> generated a build for the Linux Synthetic Target and wanted to create a
> build that supported a large number of open sockets (around 100). I
> kept getting a zinit PANIC error because the default value is not large
> enough. The equation for the default value is:
>
> (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
>
> but the memory being allocated per socket is larger than 1024. What I
> was getting for the synthetic target is:
>
> socket - 176 bytes
> udpcb - 272 bytes
> tcpcb - 616 bytes
> ripcb - 272 bytes
> ------------------------
> Total 1336 bytes
The memory was never meant to be 100% accurate. Im guess Gary just
made a guess at the size when making up this formula.
What seems strange to me is that you need one of each of these pcb for
a socket. Why would you need both a udp and a tcp cb? Surely you only
need one ripcb for each arp entry, not one per socket? Please can you
explain why why thing it should be accumulated like this,
Thanks
Andrew