|
From: | JM |
Subject: | [lwip-users] Delay during transmission |
Date: | Tue, 9 Mar 2010 14:05:04 -0800 (PST) |
lwIP v.1.3.0 I'm sending data on a TCP connection that was created from a listen pcb with the code below: tcp_write(pcb, buf_ptr, strlen(buf_ptr), 0); tcp_output(pcb); I'm sending about 4000 bytes. The first two packets come out of lwIP very quickly, the other end ACKs immediately, then lwIP waits for exactly 2 seconds and does a TCP Window Update before sending the last packet immediately afterwards. From there on everything is fast. What could cause this delay? Some more info below.... 13 6.253169 192.168.0.112 192.168.0.100 HTTP GET / HTTP/1.1 14 6.269166 192.168.0.100 192.168.0.112 HTTP Continuation or non-HTTP traffic 18 8.271579 192.168.0.100 192.168.0.112 HTTP Continuation or non-HTTP traffic 17 8.271129 192.168.0.100 192.168.0.112 TCP [TCP Window Update] http > netrix-sftm [ACK] Seq=2921 Ack=368 Win=5840 Len=0 18 8.271579 192.168.0.100 192.168.0.112 HTTP Continuation or non-HTTP traffic 19 8.271591 192.168.0.100 192.168.0.112 TCP http > netrix-sftm [FIN, ACK] Seq=3934 Ack=368 Win=5840 Len=0 20 8.271614 192.168.0.112 192.168.0.100 TCP netrix-sftm > http [ACK] Seq=368 Ack=3935 Win=64522 Len=0 Here's some relevant settings in lwipopts.h: #define TCP_MSS 1460 #define PBUF_POOL_BUFSIZE 512 #define PBUF_POOL_SIZE 12 #define TCP_WND (TCP_MSS*4) #define TCP_SND_BUF (TCP_MSS*4) #define MEM_SIZE 1024 #define MEMP_NUM_PBUF 10 #define MEMP_NUM_TCP_SEG (2 * TCP_SND_QUEUELEN) #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS)) |
[Prev in Thread] | Current Thread | [Next in Thread] |