lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] losing input packets and repeated acks


From: Jonathan Larmour
Subject: Re: [lwip-users] losing input packets and repeated acks
Date: Mon, 15 Jan 2007 17:48:11 +0000
User-agent: Thunderbird 1.5.0.9 (X11/20070102)

Carl D. Blake wrote:
Thank you for your help.  I've listed the things I've tried below.

On Fri, 2007-01-12 at 19:53, Jonathan Larmour wrote:
Carl D. Blake wrote:
I've attached my lwipopts.h file and a tcpdump trace.
I just noticed a few things in your config too...

/* #define TCP_TMR_INTERVAL     250 */
#define TCP_TMR_INTERVAL        10
That is very very small. You will probably be too busy processing the TCP timer to do any real work. The default should be adequate.

I set it back to 250.  I noticed that I was getting some 250 ms delays
between packets, so I reduced this to try and improve throughput.

The delays are symptoms rather than cause.

#define PBUF_LINK_HLEN          16
Are you sure you mean 16 and not 14?


I definitely mean 16 here.  I tried 14, but some combination of lwip,
the GNU C compiler V3.4.4, MEM_ALIGNMENT set to 4, and my processor
(MPC8271) makes the whole thing not work if HLEN is 14.  16 seems to
work.

Odd. I've used it with GCC 3.4.4, although not PowerPC yet.

I made the changes you suggested and things are a little better.  I'm
still getting the huge delay periodically, but the multiple acks of the
same packet and the same window size are gone.  I still get multiple
acks of the same packet, but the system seems to be advertising a larger
window size for each ack.  I seem to be getting some corrupt data, but
it's not nearly as bad as it was before.

Missing data is one thing, but corrupt data implies to me that there is something more problematic going on at a lower level, possibly hardware, more likely your software ethernet device driver.

I enabled LWIP_STATS and printed out the stats before and after the
transfer.  TCP stats is reporting several checksum errors.  PBUF stats
is reporting several errors.  I enabled debug messages for pbufs and I'm
getting the message "pbuf_alloc: Out of pbufs in pool."  This happens
quite a bit during the transfer of 1 Mbyte.  I hadn't expected this to
be a problem since my pbuf memory is 45Kbytes and my TCP window is
16Kbytes.  Any other suggestions?

Indeed the remote side should not send more data than the receive window, although it may use up a few more pbufs with things like acks. I guess you could try and find out where the pbufs are going - it's possible your driver might be leaking pbufs. When the stack goes back to quiescent, do the stats return to the starting state? i.e. record stats, exchange lots of data for a bit, stop exchanging data, record stats again.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
Company legal info, address and number:   http://www.ecoscentric.com/legal
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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