[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: Simon Goldschmidt
Subject: [lwip-devel] [patch #6253] Added csum to struct pbuf.
Date: Thu, 01 Nov 2007 12:47:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20071008 Firefox/

Follow-up Comment #4, patch #6253 (project lwip):

> I'm pretty sure that some developers will ask you to enable
> that with an option

Of course!

> Do you have read "task #6849 : Test how checksum on copy could
> be integrated into the stack"

In fact I did some work on that task already and it also included adding
flags to the struct pbuf. Only in my case, this was needed because I was
adding one checksum per pbuf (when copying into the pbuf for sending). Of
course this must be an option and you trade speed for size!

Andrey's suggested patch is different, of course, since it would turn off
checksum generation for the TX side because those are automatically generated
by the HW, I suppose (my checksum-checking-HW discarded packets with wrong
checksums immediately, by the way, which seems to be even faster than Andrey's

> 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! 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 sum it up, for this patch, a 'checksum-per-packet'-field would be better
(especially when looking at the modification of inet_chksum_pseudo_partial(),
which I can't really read without comments. BTW: I wonder if the patch works
at all since this function is used for UDPLite only), while one flag per pbuf
would merge quite nice with my work on task #6849.


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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