WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix checksum errors when firewalling in domU


On 9 May 2006, at 20:22, James Dykman wrote:

@@ -819,7 +819,10 @@
                 * can infer it from csum_blank so test both flags.
                 */
if (rx->flags & (NETRXF_data_validated|NETRXF_csum_blank))
{
-                       skb->ip_summed = CHECKSUM_UNNECESSARY;
+                       if (rx->flags & NETRXF_csum_blank)
+                               skb->ip_summed = CHECKSUM_HW;
+                       else
+                               skb->ip_summed = CHECKSUM_UNNECESSARY;
                        skb->proto_data_valid = 1;
                } else {
                        skb->ip_summed = CHECKSUM_NONE;

This hunk seems dodgy to me. According to the comment in linux/skbuff.h we shouldn't be passing up CHECKSUM_HW unless we have set skb->csum to the 1s-complement sum of the packet contents. You added code to do this in both netfront and netback, and it doesn't seem right in either case.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel