lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Best method to allocate space for external packets


From: Jonathan Larmour
Subject: Re: [lwip-devel] Best method to allocate space for external packets
Date: Fri, 17 Aug 2007 16:48:11 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Grubb, Jared wrote:
Just like I am proposing for user-defined pools, we could create
user-defined pbuf pools. This would require a few changes, but the total
size of the changes would not be that large.

That's the thing. It would only be needed for some hardware, so if it can be done in a way which doesn't affect existing footprint for current drivers, then that would definitely be good.

Although there are quite a few systems out there that use PCI windows, or have alignment constraints for DMA (at a minimum alignment to a data cache line) so I think this improvement could be quite widely applicable.

We have a lot of
flexibility with the memp_std.h file, and in the latest version I posted
a few days ago, there is a separate LWIP_PBUF_POOL macro to simplify the
declaration of the two pbuf pools used in lwIP right now.

It's quite different indeed for the code in memp.c when the location of the pools themselves can be different.

I can create a mock-up of what this would require in pbuf.c later today
for you all to review, if you think this would be useful.

If you think that would be quicker than saying what you're thinking of then ok :-).

I feel it would be useful because currently we say that PBUF_POOL is
useful for, among other things, hardware receive buffers, but the
PBUF_POOL is used a bit in lwIP too (SNMP and PPP come to mind).
Allowing these to be separate pools would be useful. To preserve
backwards compatibility, we can make it so there is only one pbuf
mempool.

PBUF_POOL could be used by two different ethernet drivers as well too, so yes, some way to have different pools would be nice.

Jifl

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Jonathan Larmour
Sent: Thursday, August 16, 2007 4:34 PM
To: lwip-devel
Subject: Re: [lwip-devel] Best method to allocate space for external
packets

Thomas Taranowski wrote:

I don't think we can try and fit anything into the existing memp
allocator system, since it's inherent in the design of that that all the pools are

contiguous and sequential.

The simplification here is that _all_ pool pbufs would then be allocated

like that. This is fine most of the time but could be more complicated
if there are multiple devices, not all of which need this system. Should we

be worried about that? I don't know but from my thinking about it, it would be a very hard problem to solve without breaking abstractions and/or lots of APIs. Maybe we should leave it to the port and driver.

Thoughts?


_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel


_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel



--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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