|
From: | Siva Velusamy |
Subject: | Re: [lwip-users] MEMP_NUM_TCP_SEG setting |
Date: | Mon, 3 Sep 2007 16:04:15 -0700 |
> This loop happens to be circular! Should I assume that I'm calling
> some lwip tcp function from a context that has not been properly
> guarded with mutexes?
Yes. Almost certainly you have a race between two threads, or perhaps
between your application thread and the timers, that you haven't
protected sufficiently. As a result, they will both occasionally try
and modify a queue at the same time, and it will become corrupt,
containing a circular reference for example as you point out.
> 2. The second issue that I see (if I don't run into issue 1), is that
> the TX performance keeps dropping slowly. Over 10 minutes it drops
> about 10 Mbps or so..starting from lets say 55 Mbps to 45 Mbps, and
> continuing to drop. Any suggestions on what to look for here? Could it
> be that my timer interval is not quite right?
Firstly I would make sure you've solved issue 1. I wouldn't have
thought the timer interval was to blame for dropping performance. I
think someone else has reported something similar recently but couldn't
get to the bottom of it and I can't remember the details now.
Personally I think it is most likely to be a memory leak or something
like that leading to a shortage of packet buffers or something like
that. A corrupt queue could be to blame though (if it just kept getting
longer and longer, and we have to iterate it each time a packet is
received for example).
[Prev in Thread] | Current Thread | [Next in Thread] |