[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] What is MEMP_NUM_TCP_SEG?
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] What is MEMP_NUM_TCP_SEG? |
Date: |
Tue, 15 Mar 2011 19:09:42 +0000 |
On 15 Mar 2011, at 18:43, Chen wrote:
>
> "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as
> TCP_SND_QUEUELEN"
>
> When I search the lwip 1.3.2 source, I only found three occuracies of this
> MEMP_NUM_TCP_SEG, and none of them has real meaning.
>
> So what is MEMP_NUM_TCP_SEG for?
It's the number of TCP segments you can allocate if you're using the internal
memory pools. The reason the send queue length should be less than this is
that otherwise you won't be able to fill the send queue as there can never be
enough TCP segments. It also, and more importantly, means that all the TCP
segments can be allocated and used in the send queue, leaving none for handling
received packets such as ACKs that would allow you to process the send queue,
leading to deadlock.
Kieran