lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] TCP memerr caused by TCP_SND_QUEUELEN (too long queue)


From: Marco Jakobs
Subject: [lwip-users] TCP memerr caused by TCP_SND_QUEUELEN (too long queue)
Date: Wed, 23 May 2012 09:29:42 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Hi,

checking my LwIP stats i see a noticeable amount of TCP memerr, so i've checked the TCP output debug. I see the TCP_SND_QUEUELEN unsufficient on some packets:

tcp_write: too long queue 8 (max 8)

I've left the TCP_SND_QUEUELEN to its unchanged default value of LwIP:

#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))

However, increasing the TCP_SND_QUEUELEN value manually in lwipopts.h is resulting in less errors with higher settings of TCP_SND_QUEUELEN.

With a value of 16 i'm getting only occasional memerrors.

The memerr are occuring when i call big webserver pages or my logger output on the telnet access, so when a lot of data is being sent as a fast stream on a TCP connection.


As i understand the LwIP Wiki, the queue is holding pbufs which are still waiting for acknowledgement from the remote side. So increasing the TCP_SND_QUEUELEN parameter will "eat up" more pbufs being hold for acknowledgement on the TCP connection (which are then missing for other connections like UDP in that case).

Being very limited on memory on my system (defined the MEM PBUF_POOL to 64) i don't want to increase this value too much - but what is finally the result of getting a TCP memerr caused by the "too long queue" event? Will the NETCONN_WRITE pause until a new pbuf becomes available, of is anything being lost here?





reply via email to

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