This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
CYGPKG_NET_MEM_USAGE default value
- From: Darryl Palmer <dpalmer at tootbee dot com>
- To: ecos-devel at sources dot redhat dot com
- Date: Wed, 17 Mar 2004 01:24:49 -0600
- Subject: CYGPKG_NET_MEM_USAGE default value
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
Between 50 and 60 open sockets is where I was getting the zinit failing
on the synthetic target.
Attached is the output of the network stack initiating.
Darryl
Init device '/dev/ttydiag'
Init tty channel: 2001ba0
Init device '/dev/haldiag'
HAL/diag SERIAL init
[cyg_net_init] Init: mbinit(0x00000000)
Alloc mbuf = 0x02046680
Alloc mbuf = 0x02046700
Alloc mbuf = 0x02046780
Alloc mbuf = 0x02046800
Alloc mbuf = 0x02046880
Alloc mbuf = 0x02046900
Alloc mbuf = 0x02046980
Alloc mbuf = 0x02046a00
Alloc mbuf = 0x02046a80
Alloc mbuf = 0x02046b00
Alloc mbuf = 0x02046b80
Alloc mbuf = 0x02046c00
Alloc mbuf = 0x02046c80
Alloc mbuf = 0x02046d00
Alloc mbuf = 0x02046d80
Alloc mbuf = 0x02046e00
Allocate cluster = 0x02077b40
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'synth_eth0'
cyg_if_attach.215 - After initialize list 0x02000dc0
IFP: 0x02000db0 (eth0)
cyg_getmicrotime: = 1.0
Net malloc[64] = 0x020464f0
Net malloc[64] = 0x020464a0
Net malloc[236] = 0x020463a0
cyg_if_attach.280 - After inserting 0x020463a0 into list 0x02000dc0
IFP: 0x02000db0 (eth0)
IFA: 0x020463a0 - <<0x0204641c>>
[cyg_net_init] Init: loopattach(0x00000000)
cyg_if_attach.215 - After initialize list 0x020e28d0
IFP: 0x020e28c0 (lo0)
cyg_getmicrotime: = 1.1
Net malloc[236] = 0x020462a0
cyg_if_attach.280 - After inserting 0x020462a0 into list 0x020e28d0
IFP: 0x020e28c0 (lo0)
IFA: 0x020462a0 - <<0x0204631c>>
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
zinit 'socket', size: 176, num: 128, flags: 1, alloc: 0
[cyg_net_init] Init: cyg_net_add_domain(0x02001720)
New domain internet at 0x00000000
Net malloc[64] = 0x02040a10
Net malloc[64] = 0x020409c0
zinit 'udpcb', size: 272, num: 128, flags: 1, alloc: 0
Net malloc[2048] = 0x02037970
Net malloc[2048] = 0x02037160
zinit 'tcpcb', size: 616, num: 128, flags: 1, alloc: 0
Net malloc[4] = 0x02023d10
Net malloc[4] = 0x02023d00
zinit 'ripcb', size: 272, num: 128, flags: 1, alloc: 0
[cyg_net_init] Init: cyg_net_add_domain(0x02001140)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
Net malloc[96] = 0x0201b450
Net malloc[124] = 0x0201b3c0
Net malloc[124] = 0x0201b330
[cyg_net_init] Done