[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] lwip 1.3.2 waiting for ACK problem
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] lwip 1.3.2 waiting for ACK problem |
Date: |
Tue, 13 Mar 2012 15:46:12 +0100 |
"Peter Pavlov" <address@hidden> wrote:
> I recorded communication between Firefox and controller with embedded http
> server (based on lwip).
Is that the httpserver_raw from contrib?
> Controller IP 192.168.0.32
> PC IP 192.168.0.31
> Log 1.pcap shows part of communication when picture was loading in
> Firefox.
Ideally, please include the start of a TCP stream in a pcap: wireshark
sometimes provides better parsing when the SYN packets are included.
> As you can see lwip sends 2 or 4 packets with image segments fast
> and then waits for ack. Why only 2 or 4 can be sent? According my
> investigation problem relates to tcp_output(struct tcp_pcb *pcb) in
> tcp_out.c It would be great to play with number of segments to send
> before moment when ack is required.
The longer delays (~200 ms, e.g. between packets 4 & 5 or 7 & 8) suggest you
have a memory allocation problem, which could either be running out of heap
memory or one of the limitations (TCP_SND_BUF or TCP_SND_QUEUELEN) holds
tcp_write() back from enqueueing more data.
The other delays (~80ms, e.g. between packets 10 & 11 or 21 & 22) are strange
though: your target simply delays sending but that cannot be related to
resource restriction as no ACK comes in between (unless you have other
communication running in parallel which might free resources in between?).
I'd suggest turning on debugging to see if tcp_write() returns an error and/or
have a look at lwip_stats to see if you get memory allocation errors.
Simon
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a