This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Ethernet packets dropped



On 22-Jun-2001 Jordi Colomer wrote:
> 
> Hi,
> 
> I'm currently using Redboot on my own ARM/SA11x0 platform,
> which is quite similar to Assabet/Neponset, including the
> ethernet chip SMC-91C96. 
> 
> After writing the specific adapters between the generic 
> LAN91CXX driver and the target platform, I notice that 
> there are many dropped packets, even without pinging
> the machine :
> 
> ...
> eth_drv_recv: packet of 263 bytes dropped
> eth_drv_recv: packet of 263 bytes dropped
> eth_drv_recv: packet of 95 bytes dropped
> eth_drv_recv: packet of 95 bytes dropped
> eth_drv_recv: packet of 94 bytes dropped
> eth_drv_recv: packet of 95 bytes dropped
> ...

These messages indicate that data packets are arriving much
faster than RedBoot can handle them.  The most likely cause is
when RedBoot is waiting for a command, it only polls the device
every 10ms (default).  If you have a very busy network and
your physical device (SMSC/LAN91CXX) is capable of buffering
a lot of packets, then this message can occur.

The most common cause for these sort of messages are broadcast
packets (you said you weren't pinging the machine).  Some systems,
in particular Windows machines, are very fond of sending out many
packets (broadcast).  

Note that it is just a warning - ethernet is expected to be
less than perfect and the protocols keep things going even if
packets get lost once in a while.

> 
> The default number of network buffers is 4, which is
> enough for the original Assabet redboot that uses 
> the LP-E CF ethernet adapter. Increasing the number
> of buffers up to 32 (the maximum allowed) solves
> the problem (16 buffers are not enough, though the
> drop rate decreases).
> 
> This makes me wonder if :
> 
> 1. Is this the correct tuning, or 4 packet buffers should
> be enough and there is another problem hidden ?
> 

You can increase these numbers.  However, be warned that changing
them much will probably increase RedBoot's memory requirements
above the current assumed limit of 0x20000.  If this happens (and
you want to keep it), you'll have to modify the MLT for any RAM
based programs on your platform.

Alternatively, simply disable CYGSEM_IO_ETH_DRIVERS_WARN which 
will keep the messages from being printed at all.

> 2. Is the SMSC/LAN91CXX driver tested in any
> platforms ? It seems that my platform-specific adapter
> code can't cause this sort of problems.
> 

The problem is actually more specific to your network environment
than it is the adaptor.

> The platform-specific code only does the following :
> 
> 1. Set up the GPIO interrupt (falling-edge)
> 2. Shift the chip addresses by two bits, because in the
> Neponset board the SMC A0 line is wired to the SA-1110's
> A2 line (double-word alignment).
> 3. Set the chip base address.
> 
> Thank you
> 
> Jordi Colomer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]