mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 15:42:56 +00:00
Fix calculation of tcp_mss(): when timestamps are on, this is pcb->mss - 12 or else NOCOPY-apps might generate unperformant PBUF_REF chains
This commit is contained in:
parent
ad4a869b94
commit
9f0b7261e5
@ -320,7 +320,7 @@ void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent);
|
|||||||
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
|
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
|
||||||
void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err);
|
void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err);
|
||||||
|
|
||||||
#define tcp_mss(pcb) ((pcb)->mss)
|
#define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss)
|
||||||
#define tcp_sndbuf(pcb) ((pcb)->snd_buf)
|
#define tcp_sndbuf(pcb) ((pcb)->snd_buf)
|
||||||
#define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen)
|
#define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen)
|
||||||
#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY)
|
#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY)
|
||||||
|
Loading…
Reference in New Issue
Block a user