Problem with MGETHDR

Smith, Gene Gene.Smith at sea.siemens.com
Tue Apr 18 16:05:43 UTC 2000


> From: Eric Norum [mailto:eric at cls.usask.ca]
> 
> "Smith, Gene" wrote:
> > 
> > > From: Alexey S. Fadeyev [mailto:alexey at vocord.com]
> > 
> > > Hi
> > >
> > > In rxDaemon I alloc memory with MGETHDR and MCLGET for 
> packet arrive
> > > but as soon as I begin to work with it -
> > > MGETHDR(m,M_WAIT,MT_DATA);
> > > MCLGET(m,M_WAIT);
> > > m->m_pkthdr.rcvif = ifp; (as in examples)
> > > RTEMS tells me
> > > RTEMS: Network mbuf space can not be enlarged after
> > > rtems_bsdnet_initialize
> > > has
> > > returned.
> > > What's wrong?
> > > In driver_attach function I set mtu to 1500.
> > > Any ideas?
> > >
> > > Regards
> > > Alexey
> > >
> > > P.S.
> > > Btw - when the mailing-list will be update?
> > 
> > I see the same rtems panic message but after my system has been only
> > listening on a very broadcast intensive ethernet for a 
> random length of
> > time.  I can see that the memory for mbufs and clusters can 
> be set in
> > networkconfig.h above the default 64k/128k value. However, 
> my question would
> > be: Is it typical to have to increase these or does it 
> indicated a deeper
> > problem?
> > 
> > This panic error has only occurred once while listening on 
> the network for
> > several hours today.
> > 
> 
> The default numbers are certainly on the small side, especially if
> you're on a network with lots of broadcast traffic.  For most of my
> applications I up these sizes by a factor of 4 or so -- but my boards
> have 4 or 16 Mbytes of memory respectively, and are controlling a very
> large, very expensive, piece of equipment.
> 
> -- 
> Eric Norum                                 eric at cls.usask.ca
> Canadian Light Source                      Phone: (306) 966-6308
> University of Saskatchewan                 FAX:   (306) 966-6058
> Saskatoon, Canada.
>

I increased the mbuf/clusters from default 64k/128k to 96k/150k. It listened
on the ethernet all night without panic but as soon as I attempted to send a
message this morning it crashed with the above panic message. So I will try
increasing them more.

My 16Mhz 386sx system has only about 1Meg max for all memory allocations
plus about 3/4Meg for code. Is this sufficient for a useful tcp/ip
application?  I have already had to allocate 150 receive buffers of size
1520 byte for the ethernet driver (82596) and I still seem to run out of
receive buffers alot just listening on the network. The only other thing
running is the timer interrupt at the highest interrupt priority.

-Gene  



More information about the users mailing list