Thread (4 messages) 4 messages, 2 authors, 2005-05-25

Re: Interdomain/interpartition communication without a checksum

From: "David S. Miller" <davem@davemloft.net>
Date: 2005-05-16 20:07:37

From: Jon Mason <redacted>
Date: Wed, 11 May 2005 13:35:54 -0500
I have been working on a Xen project to remove unnecessary TCP/UDP
checksums for local (interdomain) communication, while still having the
checksum for all external network communication.  
I have no objections to this idea.  But let's think about
the implementation.
+	/* If packet is forwarded to a device that needs a checksum and not 
+	 * checksummed, correct the pointers and enable checksumming in the 
+	 * next function.
+	 */
+	if (!(dev->features & NETIF_F_FWD_NO_CSUM) && skb->csum) {
+		skb->ip_summed = CHECKSUM_HW;
+		skb->h.raw = (void *)skb->nh.iph + (skb->nh.iph->ihl * 4);
+	}
+
This means that every packet which the networking tries to checksum
offload will pass this test, superfluously doing these assignments.

It also assumes ipv4.  ipv6 is possible, and for NETIF_F_CHECKSUM_HW
any protocol could be creating the packets as this flag indicates
that the card implements a totally generic 16-bit two's complement
checksum.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help