[Top][All Lists]
[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
From: |
James Smith |
Subject: |
[lwip-devel] [patch #7658] Make pbuf_free() send PBUF_POOL pbufs to Ethernet driver directly. |
Date: |
Fri, 01 Jun 2012 09:48:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) 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
(competing) patch.
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.
(file #25968)
_______________________________________________________
Additional Item Attachment:
File name: pbuf_7658.patch Size:6 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7658>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [patch #7658] Make pbuf_free() send PBUF_POOL pbufs to Ethernet driver directly.,
James Smith <=