Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754779AbcCNFNx (ORCPT ); Mon, 14 Mar 2016 01:13:53 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:41569 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbcCNFNu (ORCPT ); Mon, 14 Mar 2016 01:13:50 -0400 Date: Mon, 14 Mar 2016 01:13:46 -0400 (EDT) Message-Id: <20160314.011346.677129632153799202.davem@davemloft.net> To: aduyck@mirantis.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexander.duyck@gmail.com Subject: Re: [net-next PATCH 0/3] Fix differences between IPv4 and IPv6 TCP/UDP checksum calculation From: David Miller In-Reply-To: <20160311215423.13431.64512.stgit@localhost.localdomain> References: <20160311215423.13431.64512.stgit@localhost.localdomain> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 13 Mar 2016 22:13:49 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 23 From: Alexander Duyck Date: Fri, 11 Mar 2016 14:05:28 -0800 > This patch series is meant to address the differences that exist between > IPv4 and IPv6 in terms of checksum calculation. Specifically the IPv6 > function csum_ipv6_magic treated length as a value that could be greater > than 64K, while csum_tcpudp_magic was truncating the length at 16 bits. > After looking over the code and giving it some thought I decided it would > be best to update the IPv4 function so that it worked the same way the IPv6 > one did. This allows us to get the same results given the same inputs for > both functions. As a result we can use the same processes to reverse the > calculation in the event we need to do something like remove the length of > the pseudo-header checksum. > > I also took the opportunity to standardize things so that the parameters > for these functions all use the correct types. IPv4 addresses are __be32, > length should always be __u32, and protocol is a __u8. > > With this change in place it corrects an issue with UDP tunnels in which we > were getting a checksum that was off by 1 when performing fragmentation on > inner UDP packets. Series applied, thanks Alexander.