netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET]: Update comments for skb checksums
@ 2007-07-11  1:33 Herbert Xu
  2007-07-11  5:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2007-07-11  1:33 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: Rusty Russell

Hi Dave:

[NET]: Update comments for skb checksums

Rusty (whose comments we should all study and emulate :) pointed
out that our comments for skb checksums are no longer up-to-date.
So here is a patch to

1) add the case of partial checksums on input;
2) update partial checksum case to mention csum_start/csum_offset;
3) mention the new IPv6 feature bit.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -65,13 +65,20 @@
  *	    is able to produce some skb->csum, it MUST use COMPLETE,
  *	    not UNNECESSARY.
  *
+ *	PARTIAL: identical to the case for output below.  This may occur
+ *	    on a packet received directly from another Linux OS, e.g.,
+ *	    a virtualised Linux kernel on the same host.  The packet can
+ *	    be treated in the same way as UNNECESSARY except that on
+ *	    output (i.e., forwarding) the checksum must be filled in
+ *	    by the OS or the hardware.
+ *
  * B. Checksumming on output.
  *
  *	NONE: skb is checksummed by protocol or csum is not required.
  *
  *	PARTIAL: device is required to csum packet as seen by hard_start_xmit
- *	from skb->transport_header to the end and to record the checksum
- *	at skb->transport_header + skb->csum.
+ *	from skb->csum_start to the end and to record the checksum
+ *	at skb->csum_start + skb->csum_offset.
  *
  *	Device must show its capabilities in dev->features, set
  *	at device setup time.
@@ -82,6 +89,7 @@
  *			  TCP/UDP over IPv4. Sigh. Vendors like this
  *			  way by an unknown reason. Though, see comment above
  *			  about CHECKSUM_UNNECESSARY. 8)
+ *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *
  *	Any questions? No questions, good. 		--ANK
  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [NET]: Update comments for skb checksums
  2007-07-11  1:33 [NET]: Update comments for skb checksums Herbert Xu
@ 2007-07-11  5:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-07-11  5:42 UTC (permalink / raw)
  To: herbert; +Cc: netdev, rusty

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 11 Jul 2007 09:33:53 +0800

> Hi Dave:
> 
> [NET]: Update comments for skb checksums
> 
> Rusty (whose comments we should all study and emulate :) pointed
> out that our comments for skb checksums are no longer up-to-date.
> So here is a patch to
> 
> 1) add the case of partial checksums on input;
> 2) update partial checksum case to mention csum_start/csum_offset;
> 3) mention the new IPv6 feature bit.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks Herbert.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-11  5:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11  1:33 [NET]: Update comments for skb checksums Herbert Xu
2007-07-11  5:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).