lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] again... Zero Copy Ethernet interface


From: address@hidden
Subject: Re: [lwip-devel] again... Zero Copy Ethernet interface
Date: Wed, 07 Jan 2009 22:58:46 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Alain M. wrote:
Actualy I have one suggestion that might covver all those and future ones too...

Create a set of fuctions to be implemented in each port, to allocate, release and delete pbufs.
Isn't that the same as what Jonathan suggested with the hooks? Only that his implementation uses defines, not functions, which in my opinion is better for portability.
- There should be flags or different functions fot TX/RX
- there should be provision of the case where a TX pbuf is relased after DMA is completed - there should be provision for reentrancy in all this because most will be happening inside IRQs. - maybe a few parameters can be available even if they are not used in the refference implementation

The the standard implementation is just what happens today using malloc() and can be a reasonable example to make a first working version...
I think the existing pbuf_alloc() with an additional parameter for TX/RX would be enough. We discussed this in the related savannah task already and I think the idea was to have PBUF_POOL_RX/_TX pbuf types or something similar. Plus the port-hooks of course.

Reentrancy is already provided with SYS_LIGHTWEIGHT_PROT=1. You'd only have to make sure your hook implementation also supports it.
If over time o suitable set of pbuf functions can be found, it would be easy to port. Something like AllocTxPbuf, AllocRxPbuf, FreeTxPbuf... and so on.
Good idea. Although I doubt there is a really lightweight implementation to cover all this...? We'll see...

Simon




reply via email to

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