From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding Date: Fri, 26 Dec 2014 16:17:26 -0500 (EST) Message-ID: <20141226.161726.1781237749642541089.davem@davemloft.net> References: <2983.1419031920@famine> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: jay.vosburgh@canonical.com Return-path: Received: from shards.monkeyblade.net ([149.20.54.216]:40481 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbaLZVTk (ORCPT ); Fri, 26 Dec 2014 16:19:40 -0500 In-Reply-To: <2983.1419031920@famine> Sender: netdev-owner@vger.kernel.org List-ID: From: Jay Vosburgh Date: Fri, 19 Dec 2014 15:32:00 -0800 > > When using VXLAN tunnels and a sky2 device, I have experienced > checksum failures of the following type: ... > These are reliably reproduced in a network topology of: > > container:eth0 == host(OVS VXLAN on VLAN) == bond0 == eth0 (sky2) -> switch > > When VXLAN encapsulated traffic is received from a similarly > configured peer, the above warning is generated in the receive > processing of the encapsulated packet. Note that the warning is > associated with the container eth0. > > The skbs from sky2 have ip_summed set to CHECKSUM_COMPLETE, and > because the packet is an encapsulated Ethernet frame, the checksum > generated by the hardware includes the inner protocol and Ethernet > headers. > > The receive code is careful to update the skb->csum, except in > __dev_forward_skb, as called by dev_forward_skb. __dev_forward_skb > calls eth_type_trans, which in turn calls skb_pull_inline(skb, ETH_HLEN) > to skip over the Ethernet header, but does not update skb->csum when > doing so. > > This patch resolves the problem by adding a call to > skb_postpull_rcsum to update the skb->csum after the call to > eth_type_trans. > > Signed-off-by: Jay Vosburgh Applied and queued up for -stable, thanks Jay.