Forum Discussion
Altera_Forum
Honored Contributor
14 years agolwipopts.h is not optimized and close to the shipped opts.h. One set of settings for one person's idea of fast might not be for another's. Or might take up more resources than is available. There are many posts on the lwip forum (at savannah.org) about "optimum" options. On a NIOS II system with gobs of RAM, I hike TCP_WND, and allow 1000's of packet buffers. Also allow more pending packets (MEMP_NUM_TCP_SEG) and use a full MSS. Unfortunately one of the limits in speed is the Altera driver which is partly why Interniche is dead slow (and dies with any kind of packet flood).
TCP writing is faster than reading. You should get close to 100Mpbs in both directions with "good" lwip options. I use Gig and it's OK on sending but has trouble with high speed receiving - I'm still trying to get a hardware update to get flow control working. My high bandwidth stuff is using UDP and 500Mbps outbound is easily possible. My TCP app with large amounts of inbound TCP isn't so critical but needs to be 40Mbps or so which was not a problem. I use RAW API in lwIP and that's a huge speed advantage over netconn or worse, sockets. It all depends on what you need for the API. Somewhere I posted the 10 or 12 best things you can do to improve performance. Note that in lwIP 1.4.x a couple of the speed improvements came from patches submitted by me (notable inline IP checksumming). 1.4.x is definitely better than 1.3.x which this example is based on. I recommend using the latest lwIP release. Hope this helps, Bill