lwip-devel
[Top][All Lists]
Advanced

[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, 29 Oct 2009 21:48:23 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4

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

I know this is still on 'In Progress', but I haven't had time for this since
nearly two years now. However, I'm still planning for this to get in to
1.4.0!

The problem with including it in the pbuf struct was that we wanted to try to
keep memory footprint low: When including the checksum in the pbuf, you'd
need
- 2 bytes for checksum
- maybe 2 or more bytes for checksum coverage
per pbuf. Especially in low-memory-environments where you prefer chains of
small pbufs, you would waste memory (because you don't keep the checksum once
per packet but once per pbuf).

Therefore, for TX, we wanted to include the checksum somewhere else, not in
the pbuf struct but once per packet. This might of course differ between
UDP/RAW (where one call results in one packet) and TCP (where multiple calls
can be coalesced into one packet).

RX is different of course: I'd imagine to throw away packets with invalid
checksum before even passing them to the netif->input function, whereas your
solution might involve saving the checksum and simply comparing calculated-
and header-checksum in the correct protocol-layer (if I remember correctly)?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6253>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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