[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.