BUG20515: rework way TCP window updates are calculated and sent

This commit is contained in:
kieranm
2009-03-31 14:23:40 +00:00
parent 4b14621208
commit f1a9f7ea70
6 changed files with 90 additions and 74 deletions

View File

@@ -681,7 +681,8 @@
#endif
/**
* TCP_WND: The size of a TCP window.
* TCP_WND: The size of a TCP window. This must be at least
* (2 * TCP_MSS) for things to work well
*/
#ifndef TCP_WND
#define TCP_WND 2048
@@ -780,6 +781,14 @@
#define LWIP_TCP_TIMESTAMPS 0
#endif
/**
* TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
* explicit window update
*/
#ifndef TCP_WND_UPDATE_THRESHOLD
#define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4)
#endif
/**
* LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
* LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all

View File

@@ -125,6 +125,7 @@ void tcp_input (struct pbuf *p, struct netif *inp);
err_t tcp_output (struct tcp_pcb *pcb);
void tcp_rexmit (struct tcp_pcb *pcb);
void tcp_rexmit_rto (struct tcp_pcb *pcb);
u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb);
/**
* This is the Nagle algorithm: inhibit the sending of new TCP
@@ -304,8 +305,9 @@ struct tcp_pcb {
as we have to do some math with them */
/* receiver variables */
u32_t rcv_nxt; /* next seqno expected */
u16_t rcv_wnd; /* receiver window */
u16_t rcv_ann_wnd; /* announced receive window */
u16_t rcv_wnd; /* receiver window available */
u16_t rcv_ann_wnd; /* receiver window to announce */
u32_t rcv_ann_right_edge; /* announced right edge of window */
/* Timers */
u32_t tmr;