TCP statemachine fixes for unreliable connections
Ole Reinhardt <ole.reinhardt-L1vi/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.ethernut |
|---|---|
| Message-ID | <[email protected]> |
Hi All, I just checked in some important fixes to svn trunk. It might be worth to backport these changes to our previous release branches as well. r6284: ====== r6284 fixes a bug, introduced in r2771 (6 years ago). Some network buffer status variables was accessed after freeing the network buffer. The affected code keeps track of the tcp packages received in advance and implements a global buffer limit. In best case, the bug could lead to tcp packages being dropped unnecessary, in worst case, invalid memory regions (out of address space) could be accessed, resulting in crashes. The fix helps to make the tcp recovery on unreliable tcp connections faster. r6286: ====== This patch makes the limit for tcp packets beeing received in advance configurable. It adds a new option TCP_ADV_MAX to the net/tcp section in the configurator. Up to now, a global limit of 3216 bytes, which is the default window size (6 x 536 bytes), had been implemented. This was a global limit, which limits the amount of all tcp packages beeing received in advance (sum on all currently connected tcp sockets). The default setting of TCP_ADV_MAX is exactly the old value, to keep compatibility. It turned out, that the limit was too low for streaming audio applications, especially if the tcp receive buffer was increased by the application. In this cases the recovery on unreliable tcp connections caused lots of package re-sends. In my eyes, implementing a global limit is not the best implementation and only usefull on systems with very low memory. The higher this limit is set, the faster tcp connections will recover after package lost. You can even disable this limit completely, by setting it to 0. Best regards, Ole Reinhardt -- Embedded-IT Alter Weg 3 57223 Kreuztal http://www.embedded-it.de Tel.: +49-177-7420433 _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion