lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip_send hang (probably due to my allocator)


From: Simon Goldschmidt
Subject: Re: [lwip-users] lwip_send hang (probably due to my allocator)
Date: Fri, 23 Sep 2011 18:32:09 +0200

Stephen Cleary <address@hidden> wrote:

>> A packet capture would show if you're right about the problem being that
>> the stack can't allocate packets to send an ACK.  I'm a bit dubious
>> about this.  Could it be that it couldn't allocate memory to post an
>> mbox message to the sockets API instead?  The LWIP_STATS code could also
>> throw light on where the problem is and so help focus your efforts.
> 
> Actually, I think the problem is that the Eth driver can't allocate the pbuf 
> for reading an ACK off the wire. So lwip (correctly) won't send more data 
> since it never sees the ACK.

If that's the problem, you could try to implement a low water mark on your 
allocator: return NULL (empty) if you only have X bytes left (e.g. The amount 
you need to receive 4 ACKs). Then, implement a 2nd allocation function that can 
allocate everything and use this in pbuf.c where memory for PBUF_POOL pbufs is 
allocated.

Since PBUF_POOL is only used for RX packets, this should help you (unless you 
buffer RX packets in your application).
> 

Simon


reply via email to

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