[ovs-dev] vlan_deaccel_tag() and checksum
Ben Pfaff
blp at nicira.com
Thu Feb 17 18:44:48 UTC 2011
It seems to me that vlan_deaccel_tag() needs to increase csum_start by
4 in the CHECKSUM_PARTIAL case, something like this following. I
don't see anything like this in the other callers of __vlan_put_tag(),
but it looks like most of those wouldn't have CHECKSUM_PARTIAL skbs
anyway.
Does this seem correct to you?
diff --git a/datapath/vlan.h b/datapath/vlan.h
index 02a6290..ceb49b0 100644
--- a/datapath/vlan.h
+++ b/datapath/vlan.h
@@ -53,6 +53,11 @@ static inline int vlan_deaccel_tag(struct sk_buff *skb)
if (unlikely(!skb))
return -ENOMEM;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ if (get_ip_summed(skb) == OVS_CSUM_PARTIAL)
+ skb->csum_start += VLAN_HLEN;
+#endif
+
vlan_set_tci(skb, 0);
return 0;
}
More information about the dev
mailing list