tcp: persist timer re-work (bug #50837)

This re-works the persist timer to have the following behavior:

  1) Only start persist timer when a buffered segment doesn't fit within
     the current window and there is no in-fligh data.  Previously, the
     persist timer was always started when the window went to zero even
     if there was no buffered data (since timer was managed in receive
     pathway rather than transmit pathway)
  2) Upon first fire of persist timer, fill the remaining window if
     non-zero by splitting the unsent segment.  If split segment is sent,
     persist timer is stopped, RTO timer is now ensuring reliable window
     updates
  3) If window is already zero when persist timer fires, send 1 byte probe
  4) Persist timer and zero window probe should only be active when the
     following are true:
       * no in-flight data (pcb->unacked == NULL)
       * when there is buffered data (pcb->unsent != NULL)
       * when pcb->unsent->len > pcb->snd_wnd
This commit is contained in:
Joel Cunningham
2017-08-04 12:50:47 -05:00
parent 2e4867fcde
commit f582c88339
6 changed files with 360 additions and 48 deletions

View File

@@ -79,6 +79,9 @@ HISTORY
to make parameter order consistent with other ip*_route*() functions
Same also applies to LWIP_HOOK_IP4_ROUTE_SRC() parameter order.
2017-08-04: Joel Cunningham
* tcp: re-work persist timer to fully close window (details in bug #50837)
2017-07-26: Simon Goldschmidt
* snmp_msg.c: fix bug #51578 (SNMP failed to decode some values on non 32bit platforms)