From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 4/9 v2] netdev: bfin_mac: deduce Ethernet FCS from hardware IP payload checksum Date: Mon, 17 May 2010 17:21:45 -0700 (PDT) Message-ID: <20100517.172145.260079154.davem@davemloft.net> References: <1273505954-32588-1-git-send-email-vapier@gentoo.org> <1273505954-32588-4-git-send-email-vapier@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, jon.kowal-obo422lQt0aqq+TXWfNVuQ@public.gmane.org, uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org To: vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org Return-path: In-Reply-To: <1273505954-32588-4-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: uclinux-dist-devel-bounces-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org Errors-To: uclinux-dist-devel-bounces-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org List-Id: netdev.vger.kernel.org From: Mike Frysinger Date: Mon, 10 May 2010 11:39:09 -0400 > From: Sonic Zhang > > IP checksum is based on 16-bit one's complement algorithm, so to deduce a > value from checksum is equal to add its complement. > > Unfortunately, the Blackfin on-chip MAC checksum logic only works when the > IP packet has a header length of 20 bytes. This is true for most IPv4 > packets, but not for IPv6 packets or IPv4 packets which use header options. > So only use the hardware checksum when appropriate. > > Signed-off-by: Sonic Zhang > Signed-off-by: Jon Kowal > Signed-off-by: Mike Frysinger Applied.