[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, 28 Aug 2008 10:52:38 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 |
Update of patch #6253 (project lwip):
Status: None => In Progress
Assigned to: None => goldsimon
_______________________________________________________
Follow-up Comment #14:
> Since, when my app. generate udp payload, it do it directly to
> preallocated buffer, and do it in asm routine, i.e. payload csum
> calculation is part of payload data generation process.
The standard lwIP procedure for this kind of MAC would be to check the 2
checksums for correctness in your driver (i.e. before passing them to the lwIP
input functions) and to discard packets with invalid checksums right away. You
can then turn off checksum checking on receive for protocols you know (this
would be tcp, udp and icmp presumably). While this involves a little bit of
'hacked' code (processing IP and transaport layer in MAC driver), it is more
performant and also what is done in more advanced MACs (discarding packets
with wrong checksums).
As to sending packets: From what you say, I think saving the checksum per
packet (not per pbuf) would still be OK: You would include the transport
checksum (data only, not header) when filling the pbuf, this transport
checksum could be recalculated when the transport header is added; the IP
checksum can't be calculated while copying as there is no copying involved
when filling the header (i.e. IP checksum will be generated as it is now). For
eth header, there is no checksum!
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6253>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/