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++

Webserver/LWIP problem

Altera_Forum
Honored Contributor II
1,059 Views

hi guys, ive got a tough one here 

 

im using the altera provided webserver example to pump over data, a 8 meg html file to be exact, and most of the time things go well 

 

i also tweaked the TCP settings of the LWIP stack a bit, i changed the packter buffers from 16 to 4, and changed the TCP send window to 17520, which is the default on the connecting windows PC, for optimal speed, this gave me an improvement of about one second, from 8.1 to 7.1 transfer time 

 

however, with these settings, sometimes the server will crash, the last two packets sent over the network are TCP window updates from the PC to the server, first switching the window to 2596, then back up to 17520, the end result is that the webserver will simply stop sending data, untill the next web page is requested 

 

does anyone know why the server cant handle the sudden change in TCP window? altering any settings on the windows PC is no real option
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
374 Views

well i seem to have solved the problem at least partially myself 

 

in the TCP_in file in the LWIP source, i disabled the piece of code in the ACK handling routine where it accepts the TCP window update value and puts the value into code, this stopped the random crashing on two concurrent window updates 

 

however, i think that by doing this i disabled a part of TCP flow controll, so performance might not benefit, the normal numbers ive seen are similar to how fast it was with the code in original form, but it still isnt recommendable i think to try this 

 

if i have anymore news ill post here to log the problem/solution for anyone who happens upon the same troubles
0 Kudos
Reply