[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #7896] Support zero-copy drivers
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [task #7896] Support zero-copy drivers |
Date: |
Tue, 18 May 2010 19:32:43 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 |
Follow-up Comment #1, task #7896 (project lwip):
Ok, seems like this is one of the last tasks left before releasing 1.4.0
(together with bug #29361, which is kind of related to this one).
I think there is not much coding involved here but we rather need to know
what we need to support zero copy. For that, we would need input from many
developers/users telling us what they need. Personally, the only requirements
for my implementation are:
- delayed freeing of TX pbufs (i.e. transmit might take some time / pbuf is
*not* transmitted when netif->linkoutput returns - this is already taken care
of by adjusting the docs to say "applications may not reuse pbufs after
passing them to send/output functions")
- RX pbufs should be properly aligned (depending on the cache line size -
this currently doesn't work as there is only one MEM_ALIGNMENT)
As Jonathan pointed out some more requirements below, I think the most
portable solution would be to allow the driver to allocate pbufs in its own
memory and to let pbuf_free() call a port-defined function to free those pbufs
- we have plenty numbers left in the 'enum pbuf_type'.
This would also help to solve bug #29361. However, the downside is that the
whole stack would have to be reviewed in order to remove assumptions made on
different pbuf types (i.e. pbuf_header fails on PBUF_REF in some cases, etc.).
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?7896>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/