[ECOS] BSD socket read() calls blocking indefinately

Paul Sheer psheer@icon.co.za
Fri Dec 7 09:31:00 GMT 2001


ok, thanks to Andrew's help, I found the problem:

our SMSC 91C111 ethernet chip has a bug where it does not
set the status bit indicating that a packet is of odd
length.

So packets get scrapped at the line in ip_input where
the code checks that the raw packet length matches the
IP header field.

The latest SMSC datasheet says to work around the bug
by always adding 1 to the even packet length - i.e.
there is ABSOLUTELY NO WAY TO BE SURE OF THE PACKET
LENGTH.

My question is this: although it is easy to adjust
the ip_input check code to pass packets that are 1 byte
off, is it a good idea to do it this way?


What other eCos code may break as a result of packets
being 1 byte to long?

thanks

-paul


On 2001.12.07 13:51 Andrew Lunn wrote:
> > However where the packet goes thereafter I have no clue
> > and it seems quite difficult to go debugging the TCP
> > stack.
> 
> > Can I ask where do a track the packet from here on?
> 
> Put breakpoints in ether_input, ip_input and tcp_input. You can then
> see which layer is throwing away the packet. If tcp_input processes it
> correctly, its then something to do with the actual waking up of the
> thread.
> 
> By the way, which version of eCos are you using? Latest anoncvs or the
> very old 1.3.1?
> 
>      Andrew
> 
-- 
Paul Sheer Consulting IT Services . . . Tel . . . +27 21 761 7224
Email . . . psheer@icon.co.za . . . . . . Pager . . . 088 0057266
Linux development, cryptography, recruitment,  support,  training
http://www.icon.co.za/~psheer . . . . http://rute.sourceforge.net
L I N U X . . . . . . . . . . . .  The Choice of a GNU Generation



More information about the Ecos-discuss mailing list