Stephen Cleary <[email protected]> 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
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to