Since version 1.3.0, the memp pool array is calculated dynamically by
some C-preprocessor magic, therefore it's really not easy to match array
entry and memp type. However, using the stats-display function, the code
does this for you.
Regarding the dropped packets: have a look at the other counters (mainly
those named 'err') in the stats, too. They may also tell you about
dropped frames. Also, one possible source of dropped frames is the MAC
itself (or its driver). Most MACs have a flag set when they encounter an
internal buffer overrun.
Simon
JM wrote:
I'm trying to figure out what parameter(s) are deficient in my
configuration by looking at Stats, presumably the MEM_STATS and
MEMP_STATS. I also want to eventually shrink memory usage by lwIP as
much as possible; every KB counts. A few seconds into receiving data,
the stack starts dropping packets and sending duplicate ACKs. The
last config I used is below, although I'm tweaking things almost
constantly.
I'm receiving streaming TCP data, so nothing is being sent except for
an initial request. In looking at lwip_stats.memp[x], where x is 0
thru 5, I'm able to sort of match up each section with my config. 5
seems to be PBUF_POOL_SIZE, 4 is MEMP_NUM_PBUF, etc....at least that's
what it seems like. I've went thru the code but wasn't able to figure
out what each one is (I'm not that good at C). Anyway, neither mem
nor memp are indicating errors. And memp[5] only maxed at 12 out of 20.
Are my assumptions correct, and what are the other parts of the memp
array displaying? Also, is there any other reason for dropping
packets/duplicate ACKs, and what is a good way to track that down
(with respect to what I can set in lwipopts.h)?
#define PBUF_POOL_SIZE 20
#define TCP_MSS 1460
#define TCP_SND_BUF (TCP_MSS * 4)
#define PBUF_POOL_BUFSIZE 256
#define TCP_WND (1460*2)
#define MEM_SIZE 512
#define MEMP_NUM_PBUF 12
------------------------------------------------------------------------
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users