[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: Gecko/20070530 Fedora/ Firefox/

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

> 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

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:


  Message sent via/by Savannah

reply via email to

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