[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [lwip-users] tcp_sndbuf always returns 0

From: Kieran Mansley
Subject: Re: Re: [lwip-users] tcp_sndbuf always returns 0
Date: Fri, 17 Jul 2009 13:22:27 +0100

On Fri, 2009-07-17 at 20:05 +0800, WU Rui-Qing wrote:
>  The server runs on a platform with TI DSP C6415,uC/OS-II and
> LwIP1.3.1,its IP is client runs on host ,its IP is
> the client connect to the server ,the server send
> data to the client .the packets captured on PC host shows that client
> sends a duplicated-ACK for SEQ=3894,the server retransmits the packet
> SEQ=3894. I use the default setting in opt.h. 
>   Thank you very much !

The packet capture shows that the stack is retransmitting a packet with
a bad checksum, and the retransmissions have the same (bad) checksum as
the original packet.

Which version of lwIP are you using?  You say 1.3.1 but it has not been
released yet.  Is it just the latest version from CVS?

Not sure why it should get the checksum for this packet wrong.  Is there
anything special about the way that checksums are computed on your
hardware?  Is the payload in the captured packet what you would expect?

Is the data you are sending static?  I notice that you call tcp_write
without the TCP_WRITE_FLAG_COPY flag set, and so you have to guarantee
that the memory area pointed to will not change.  Looking at the code I
think that might be the problem: what happens to the memory pointed to
by hs->file after you have finished calling tcp_write() for that item?
If it is freed in some way, or overwritten by read_block_from_outfifo()
for example, that would be a problem.  To solve this either set the
TCP_WRITE_FLAG_COPY flag or wait until the tcp_sent() callback is called
for all the data in an item before freeing/overwriting the memory.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]