Patchwork [PATCHv2,7/8] vxlan: fix receive checksum handling

login
register
mail settings
Submitter stephen hemminger
Date Oct. 10, 2012, 6:35 a.m.
Message ID <20121010063623.855895281@vyatta.com>
Download mbox | patch
Permalink /patch/190563/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - Oct. 10, 2012, 6:35 a.m.
Vxlan was trying to use postpull_rcsum to allow receive checksum
offload to work on drivers using CHECKSUM_COMPLETE method. But this
doesn't work correctly. Just force full receive checksum on received
packet.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/net/vxlan.c	2012-10-09 18:08:36.862414133 -0700
+++ b/drivers/net/vxlan.c	2012-10-09 18:08:38.686396042 -0700
@@ -537,7 +537,6 @@  static int vxlan_udp_encap_recv(struct s
 	}
 
 	__skb_pull(skb, sizeof(struct vxlanhdr));
-	skb_postpull_rcsum(skb, eth_hdr(skb), sizeof(struct vxlanhdr));
 
 	/* Is this VNI defined? */
 	vni = ntohl(vxh->vx_vni) >> 8;
@@ -556,7 +555,6 @@  static int vxlan_udp_encap_recv(struct s
 	/* Re-examine inner Ethernet packet */
 	oip = ip_hdr(skb);
 	skb->protocol = eth_type_trans(skb, vxlan->dev);
-	skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
 
 	/* Ignore packet loops (and multicast echo) */
 	if (compare_ether_addr(eth_hdr(skb)->h_source,
@@ -568,6 +566,7 @@  static int vxlan_udp_encap_recv(struct s
 
 	__skb_tunnel_rx(skb, vxlan->dev);
 	skb_reset_network_header(skb);
+	skb->ip_summed = CHECKSUM_NONE;
 
 	err = IP_ECN_decapsulate(oip, skb);
 	if (unlikely(err)) {