lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Fw: (no subject)


From: Kieran Mansley
Subject: Re: [lwip-users] Fw: (no subject)
Date: Fri, 15 Jul 2011 13:39:52 +0100

On Fri, 2011-07-15 at 14:28 +0800, Anirudha Sarangi wrote:


> What my conclusion is, since noone has ever reported such an issue
> with lwip, it could not be a lwip issue. Since my application does not
> do great things, it cant be application issue as well. So my suspect
> is, the way I configure lwip and the way I have ported lwip.

I agree with your conclusion.

> Could you take a look at the log and let me know if you could make out
> anything.

You haven't said which end is lwIP, and I don't remember the exact
details of your problem, but from what I can see in the packet capture:

Frame 489: 192.168.11.10 sends TCP seq 98398828->98400228
Frame 490: this packet is ACKed by the other end (192.168.11.1)
Frame 491: .10 sends the same packet again.  This is odd, and I think
the root of the problem.
Frame 492: .1 says "I've already got that" 
Frame 493: .10 sends TCP seq 98401628.  The next packet expected would
be 98400228 (i.e. there is a gap of 1400 bytes or ~1 packet) 

.1 then continues to send ACKs for the sequence it has received in
order, to tell the .10 to retransmit the missing sequence.  This is how
TCP deals with loss and retransmission.  .10 carries on with new packets
for a while (also normal) but then does what looks like a retransmission
in frame 499, but it is a retransmission of frame 493, not the missing
packet.  This suggests that lwIP doesn't have the missing packet
anymore.

I think the duplicate packet in frame 491 should have had the contents
of the missing packet.  You've sent the correct number of packets, but
one of them was sent twice, and one of them not at all.  This could be
that the TCP send queue got corrupted due to a porting error, or that
the driver did something wrong, or something else that I haven't thought
of.  The fact that lwIP is unable to retransmit the missing packet (and
instead sends the one after it) does point to the lwIP packet queues
being corrupted, and this is usually because of a concurrency problem.

I'm afraid that I won't be able to give you the solution to your problem
as it is likely to be difficult to get to the bottom of, and without
your code and hardware I wouldn't be able to debug it (not to mention
that I don't have the spare time!), so you're going to have to either do
this yourself, or get someone with some experience in this area to help
you.  Whoever wrote the port of lwIP that you're trying to debug would
be a good first step.

Finally, I probably mentioned this before, but you're trying to debug a
problem with a port of 1.3.2, which is now an old version of lwIP.  It
will become increasingly unsupported in the future, so if you are able I
would recommend upgrading to 1.4.0.

I hope that helps.

Kieran




reply via email to

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