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: Alain M.
Subject: Re: [lwip-devel] again... Zero Copy Ethernet interface
Date: Wed, 07 Jan 2009 21:05:11 -0200
User-agent: Thunderbird 2.0.0.17 (X11/20080914)



address@hidden escreveu:
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.
In all implementations that I have seen, hooks are usualy slower, just because you call a function that calls a hook... So Why not just change the whole function, specially if it is very well defined and does one thing and does it well? ;)
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.
So if you allow to change the whole pbuf_alloc(), probably by moving it to to something like a file named pbuf.c (just a suggestion), why would you need hooks for?

The reason behind this question is: it looks like pbuf_alloc() can vary so much in an optimized port that it could be completely re-written...
Good idea. Although I doubt there is a really lightweight implementation to cover all this...? We'll see...
I usualy have seen that *some people* like to do that kind of stuff, or need it badly for some product, but it may get a little far from lightweight. And if the infrastructure is there, it may well be incorporated in lwip

Alain





reply via email to

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