From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next 07/11] e1000e: cleanup Rx checksum offload code Date: Tue, 03 Jan 2012 16:15:53 -0500 (EST) Message-ID: <20120103.161553.395980097965998086.davem@davemloft.net> References: <1325618356-2655-8-git-send-email-jeffrey.t.kirsher@intel.com> <20120103.150842.1516759599032629705.davem@davemloft.net> <1325624413.2832.9.camel@bwh-desktop> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jeffrey.t.kirsher@intel.com, bruce.w.allan@intel.com, netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com To: bhutchings@solarflare.com Return-path: Received: from shards.monkeyblade.net ([198.137.202.13]:43226 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753212Ab2ACVQC (ORCPT ); Tue, 3 Jan 2012 16:16:02 -0500 In-Reply-To: <1325624413.2832.9.camel@bwh-desktop> Sender: netdev-owner@vger.kernel.org List-ID: From: Ben Hutchings Date: Tue, 3 Jan 2012 21:00:12 +0000 > On Tue, 2012-01-03 at 15:08 -0500, David Miller wrote: >> From: Jeff Kirsher >> Date: Tue, 3 Jan 2012 11:19:12 -0800 >> >> > - __sum16 sum = (__force __sum16)htons(csum); >> > + __sum16 sum = (__force __sum16)htons(le16_to_cpu(csum)); >> >> Looks like a NOP. It's essentially "cpu_to_le16(le16_to_cpu(csum)" as >> far as I can tell. > > Looks like a swab() to me... I don't see how it can be. It's effectively doing a 16-bit swap and then a 16-bit swap again, which is a NOP. It's the same as "(__force __sum16) csum" and I bet if the code above works, then this expression I'm suggesting will work too.