Forum Discussion
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- It gets closer to what you have, isn't it? So, it looks like you should optimize complete program, not just lwIP code. This may be a hard work, but Bill gave a good roadmap. As for me I'm not working currently on lwIP part of my project because still playing with UDPOFFLOAD. By the way, it streams very nice @ 100M network - about 95Mib/sec with zero load on Nios. @1000M I observe about 750Mib/sec traffic, but about 20% of packets are lost. Now trying to slow down their generator to see it in more realistic conditions... --- Quote End --- Igor, this 95Mb and 750Mb are with your offloading? I was in this ballpark with UDP_CHECKSUM off with software only. Of course the Cyclone III was doing nothing else. Packet drop is caused by Windows. I had over 900Mb (virtually the wire speed) from tests with timing done on the Cyclone end. Windows can't keep up without special drivers but if you keep your bursts small - you get this if your UDP protocol has any sort of ACK/NAK checking - Windows can keep up. We transfer 250Mb+ on Windows without a special driver. Those really needing Windows speed use "Packet Filter Drivers" for Windows (Google it). This prevents drops (although I don't know the practical speed limit) and they significantly drop CPU utilization. My understanding is it removes one data copy since your Packet Filter Driver gets the packet from the NIC driver and before Windows TCP/IP stack does. I believe WireShark (WinPCap) is a Packet Filter Driver. By the way, the example I posted was done with as few changes to Altera LIBs (TSE/SGDMA/PHY) as possible and with no speed improvements. The product we use the Cyclone III in has custom version of Altera's TSE, SGDMA, and PHY drivers and lwIP is further optimized over what is here and what I recommended. Even so I believe the example posted outperforms Interniche and is smaller and this really was my goal in doing this. Besides the fact that Altera made the decision to drop support for lwIP a couple of years ago and I think it's a viable choice for TCP/IP. Note that lwIP 1.4 has an improved HTTP server with SSI/CGI support. I hope to upgrade this example to use that when 1.4's release is official. Keep us posted - this has been very interesting. Bill A