lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] add 2 netif for 2 ETH MAC´s to have 2 buffer pools


From: Simon Goldschmidt
Subject: Re: [lwip-users] add 2 netif for 2 ETH MAC´s to have 2 buffer pools
Date: Mon, 16 May 2011 12:16:08 +0200

Kieran Mansley <address@hidden> wrote:
> > - defining a "watermark" / limit or something else for data port at 50%
> > of pool buffer size to provoke that pool is "full" at this "line" ??
> 
> That would require writing some code, but would probably be the most
> useful way, if you don't have the memory to just allocate enough buffers
> to avoid this.  I would structure the watermark not as a limit on how
> many can be used by each netif, but on how many can be used for received
> packets, and how many can be used for sending packets as I think it is
> these two paths that are actually probably in conflict: if you receive a
> lot of data there might not be any packets left to send the
> acknowledgement or reply until the application has dealt with them.

Isn't that already covered by lwIP? Drivers should allocate a PBUF_POOL for RX 
packets, and TX packets mostly use the heap (PBUF_RAM) or nothing 
(PBUF_REF/ROM), so TX and RX should not collide there.

Of course, if you're using PBUF_POOL for TX (which is desirable in some cases), 
you would need a watermark. There's already a task on savannah and I'd be happy 
to get code for that, too :-)

Simon
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!                       
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

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