mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-02 12:52:10 +00:00
Fixed bug #26349: Nagle algorithm doesn't send although segment is full (and unsent->next == NULL)
This commit is contained in:
parent
152d22d4f9
commit
24342eaab0
@ -95,6 +95,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2009-05-03 Simon Goldschmidt
|
||||||
|
* tcp.h: bug #26349: Nagle algorithm doesn't send although segment is full
|
||||||
|
(and unsent->next == NULL)
|
||||||
|
|
||||||
2009-05-02 Simon Goldschmidt
|
2009-05-02 Simon Goldschmidt
|
||||||
* tcpip.h, tcpip.c: fixed tcpip_untimeout (does not need the time, broken after
|
* tcpip.h, tcpip.c: fixed tcpip_untimeout (does not need the time, broken after
|
||||||
1.3.0 in CVS only) - fixes compilation of ppp_oe.c
|
1.3.0 in CVS only) - fixes compilation of ppp_oe.c
|
||||||
|
@ -128,15 +128,18 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
|
|||||||
u32_t tcp_update_rcv_ann_wnd(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
|
* This is the Nagle algorithm: try to combine user data to send as few TCP
|
||||||
* segments when new outgoing data arrives from the user if any
|
* segments as possible. Only send if
|
||||||
* previously transmitted data on the connection remains
|
* - no previously transmitted data on the connection remains unacknowledged or
|
||||||
* unacknowledged.
|
* - the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or
|
||||||
|
* - the only unsent segment is at least pcb->mss bytes long (or there is more
|
||||||
|
* than one unsent segment - with lwIP, this can happen although unsent->len < mss)
|
||||||
*/
|
*/
|
||||||
#define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \
|
#define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \
|
||||||
((tpcb)->flags & TF_NODELAY) || \
|
((tpcb)->flags & TF_NODELAY) || \
|
||||||
(((tpcb)->unsent != NULL) && ((tpcb)->unsent->next != NULL))) ? \
|
(((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \
|
||||||
1 : 0)
|
((tpcb)->unsent->len >= (tpcb)->mss))) \
|
||||||
|
) ? 1 : 0)
|
||||||
#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK)
|
#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user