[En-Nut-Discussion] Re: RE: Full Duplex operation
Stephen Noftall
stephenn at lcsaudio.com
Tue Mar 16 05:13:42 CET 2004
Hi Damian;
> Would the 8019 talking full duplex to a switch in half duplex, cause the
> Tx packet loss we are seeing?
This is who I found it. In our application, the Ethernut device is talking
to a Linux box through a switch. The Linux box is sending packets to the
device, and the device is sending packets back. They are not sent a reply,
so they are sent async with each other. Roughly every 5 minutes (with heavy
traffic), the TCP connection would "hick up", and take ~4 seconds to resume
and continue transmitting. The switch has statistics, and the port with the
Ethernut device was recording alot of "Late Collisions". I hooked up
Etherpeek to monitor the port's traffic, and saw very strange packets coming
from the Ethernut device. It looked like the switch was receiving corrupted
packets, and forwarding them onto Linux. Linux was getting confused, and it
would take awhile to sort it out.
Tracking it down some more, it sems that the RTL8019 thinks it is in full
duplex, so it is not following the Half duplex protocol. And since the
switch is in half duplex, there is a significant chance of collisions
occuring.
If I then change that port to full duplex (it is a managed switch, so it can
be changed from auto-negotiate to full duplex 10BaseT directly), then the
late collisions go away completely. And I also never see the TCP connection
hickuping.
> Further to this, I also had a play with emulating the 9346. Not there
> yet. But I found this on the Rabbit implementation last night, which
> seems the set the 8019 in half duplex.
> http://www.circuitcellar.com/echips-pdfs/0801/c0801fepdf.pdf (page 8)
I have a Rabbit dev kit, and looked over the source. The code that is
described in the circuit cellar article is the same code. I was adding in
the code to Ethernut to bit bange the EEPROM, when I did my googling, and
found the n-way problem. The Rabbit defaults to half duplex. But you can set
it to full duplex and recompile the code. What I don't understand is why
there are not more problems like this reported out there? Although now I am
looking for it, they do seem to crop up more often. I was looking over the
manual for a really cheap managed switch (sorry, left the product # at the
office), and it says specifically in there that if the device attached to
the switch does not support auto-negotitation, then it automatically
switches to half duplex. So I think there might be switches out there that
will work in full duplex mode, if they try something different. I know we
can get it to work as long as we can get a managed switch and set it to full
duplex properly.
Tricky stuff ;-)
SN
More information about the En-Nut-Discussion
mailing list