Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030891AbbD1UhA (ORCPT ); Tue, 28 Apr 2015 16:37:00 -0400 Received: from skprod2.natinst.com ([130.164.80.23]:43321 "EHLO ni.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965974AbbD1Ug6 (ORCPT ); Tue, 28 Apr 2015 16:36:58 -0400 Message-ID: <553FEF66.7010503@ni.com> Date: Tue, 28 Apr 2015 15:36:54 -0500 From: Jaeden Amero User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: David Miller CC: nicolas.ferre@atmel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeff.westfahl@ni.com, mihai.neagu@ni.com Subject: Re: [PATCH RFC] net/macb: Fix UDPv4 checksum offload References: <1430174610-6834-1-git-send-email-jaeden.amero@ni.com> <20150427.224713.291017556251723132.davem@davemloft.net> In-Reply-To: <20150427.224713.291017556251723132.davem@davemloft.net> X-MIMETrack: Itemize by SMTP Server on US-AUS-MGWOut1/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 04/28/2015 03:36:55 PM, Serialize by Router on US-AUS-MGWOut1/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 04/28/2015 03:36:55 PM, Serialize complete at 04/28/2015 03:36:55 PM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=windows-1252 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-04-28_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 25 On 04/27/2015 09:47 PM, David Miller wrote: > From: Jaeden Amero > Date: Mon, 27 Apr 2015 17:43:30 -0500 > > A UDP checksum of zero, means "checksum not computed". And your > device isn't computing the checksum at all, but rather is leaving it > at zero. The "zero" checksum is not what gets sent over the wire. Independent of the value of the checksum field, hardware generates a correct checksum for payloads of 3 or more bytes. The bug is that hardware generates an incorrect checksum for payloads of 2 or less bytes, unless the checksum field is zeroed. > You need to handle this properly by computing the checksum in > software and then setting the TX descriptor bits such that the > chip leaves the checksum field alone. Unfortunately, the Cadence MACB doesn't support the enabling or disabling of checksum generation per descriptor. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/