Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

lwip 10Mbps

Altera_Forum
Honored Contributor II
1,175 Views

I am using the Cyclone Development board with uC/OS-II running LWIP and seeing many lost packets, Dup ack, and Out-Of-Order packets with TCP. 

 

I see all of the above issues when using 10Mbps hubs (tried multiple) with only a PC and the Altera board on the network. If I move to a 100Mbps hub I don't see the issues. 

 

I find it strange because the throughput should not be to high for 10Mbps networks. With the 100Mbps hub the lwip TCP throughput is only ~4Mbps. 

 

Any ideas?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
490 Views

There were two previous bugs found in the lan91c111 drivers: 

 

http://www.niosforum.com/forum/index.php?a...&f=17&t=619&hl= (http://www.niosforum.com/forum/index.php?act=st&f=17&t=619&hl=

http://www.niosforum.com/forum/index.php?a...&f=17&t=703&hl= (http://www.niosforum.com/forum/index.php?act=st&f=17&t=703&hl=

 

I believe the first bug fix was incorportated into Nios1.1, but the second was not, and could be related to what you are seeing.  

If you fix it, post your solution.
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

Thanks, 

 

The lost packets and Out-Of-Order pack have gone away. The Dup ack happens less. 

 

I added the code to altera_avalon_lan91c111.c as shown in the two postings.
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

Were you using Ethereal to see these problems, or another tool? 

Any special setup to diagnose?
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

I used ethereal to monitor the traffic.  

 

Before the patch, I was seeing every third packet having to be retransmitted due to Dup or lost packets. Now it is less frequent. 

 

I still see checksum errors and lost packets at the start of data download on both 100Mbps and 10Mps systems. That can add seconds of over head. So there may be other isssues.
0 Kudos
Reply