Thread (29 messages) 29 messages, 7 authors, 2012-01-06

Re: [net-next 07/11] e1000e: cleanup Rx checksum offload code

flat view

From: David Miller <davem@davemloft.net>
Date: 2012-01-03 21:16:02

From: Ben Hutchings <redacted>
Date: Tue, 3 Jan 2012 21:00:12 +0000
On Tue, 2012-01-03 at 15:08 -0500, David Miller wrote:
quoted
From: Jeff Kirsher <redacted>
Date: Tue,  3 Jan 2012 11:19:12 -0800
quoted
-		__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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help