I'm using LwIP 1.2.0 and I've run into
some problems when it comes to
the bulk of parameters that tunes LwIP
when it comes to memory consumption
and performance. The current problem
is if there is any document
describing the relation between all
the parameters that are defined in
opts.h.
Another problem I have is how LwIP
handles allocation errors (or rather
DOESNT handle them). For example when
using the Socket API and calling
send(), the code ends up at the following
point:
send() (or lwip_send()) ends up calling
netcon_write().
netcon_write() first allocates a API_MSG,
and seem to handle any failure
to do so in a good way. However, later
in netcon_write() the following two
lines can bee seen:
api_msg_post() begins with allocating
a TCPIP_MSG, but if this fails,
conn->mbox is never ever signaled,
causing the application doing the
send() to lock up for ever.
The same sequence of code (calling
api_msg_post and then sys_mbox_fetch)
can bee seen all over the place. My
first thought was that if the number
of MEMP_API_MSG was the same as MEMP_TCPIP_MSG,
the problem would be
overcome (as API_MSG is always allocated
first). However, i still get alot
of errors when allocating TCPIP_MSG,
but almost never when alocating API_MSG.
So, is there any known relation between
the different MEMP_-options?
Are they in any way related to the
the number of PBUF that are allowed.
And how does this affect the possible
settings for window-sizes and
other TCP-specific parameters.