[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7658] Make pbuf_free() send PBUF_POOL pbufs to Ethe
[lwip-devel] [patch #7658] Make pbuf_free() send PBUF_POOL pbufs to Ethernet driver directly.
Fri, 01 Jun 2012 09:48:07 +0000
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:22.214.171.124) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24
Follow-up Comment #2, patch #7658 (project lwip):
I noticed this patch request, and that it has not been acted on for a while,
and since we need (use) similar functionality I thought it prudent to add to
this existing patch in the hope of reviving it, instead of creating a new
Similarly for our driver support we need a hook to allow PBUF_POOL entries to
be returned to the driver in a timely fashion, and ideally avoiding
unnecessary free/alloc operations.
Attached is a suggested patch (against the head of the git tree) implementing
the support slightly differently to that originally suggested last year by
Timothy in his original comment.
Basically I used a more generic (in my opinion) manifest name of
PBUF_POOL_FREE_HOOK (instead of DMA_RING_REPLENISH) and the polarity of the
"return" code is changed to 0 means re-used, and 1 means pbuf_free() can
continue to release the allocation (that way around made it easier/simpler
ensuring that the pbuf_free() "count" is maintained with minimum overhead).
A new routine pbuf_pool_reinit() is provided to allow the callback (if
defined) to reset the PBUF state. Some assumptions are covered by asserts.
Additional Item Attachment:
File name: pbuf_7658.patch Size:6 KB
Reply to this item at:
Message sent via/by Savannah
|[Prev in Thread]
||[Next in Thread]|
- [lwip-devel] [patch #7658] Make pbuf_free() send PBUF_POOL pbufs to Ethernet driver directly.,
James Smith <=