[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #6253] Added csum to struct pbuf.
From: |
Jonathan Larmour |
Subject: |
[lwip-devel] [patch #6253] Added csum to struct pbuf. |
Date: |
Thu, 01 Nov 2007 14:07:45 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12 |
Follow-up Comment #8, patch #6253 (project lwip):
>> usually there are alignment constraints, particularly if
>> caching is also involved, in which case you have to keep
>> packet data and other data (including struct pbuf itself)
>> in different cache lines
>
> That's true of course, but it's not covered today!
Yes, I know that it's been put off till after 1.3. That doesn't stop it being
relevant.
> We would need a second memory alignment setting for DMA data.
> Then, when adding fields to the struct pbuf, the struct would
> automatically be aligned for DMA needs.
To be clear, I already have working and deployed code for this. This is not
vapourware.
But if you increase a struct pbuf from 32 to 36 bytes, then those systems
with DMA and caches will have to align to the cache line, which is often 32
bytes, so you are now wasting 28 bytes per pbuf. Other systems place other
constraints on DMA alignment, even when cache line alignment is irrelevant,
for example on Coldfire.
Anyway, this problem is avoidable.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6253>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/