Thread (12 messages) flat view 12 messages, 4 authors, 2012-02-13

Re: [net-next 4/7] ixgbe: Add function for testing status bits in Rx descriptor

From: Ben Hutchings <hidden>
Date: 2012-02-13 17:37:51

On Mon, 2012-02-13 at 09:21 -0800, Alexander Duyck wrote:
On 02/11/2012 11:06 AM, Ben Hutchings wrote:
quoted
On Fri, 2012-02-10 at 16:08 -0800, Jeff Kirsher wrote:
quoted
From: Alexander Duyck <redacted>

This change adds a small function for testing Rx status bits in the
descriptor.  The advantage to this is that we can avoid unnecessary
byte swaps on big endian systems.
[...]
quoted
+	/* unmap the sg list when FCPRSP is received */
+	case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):
[...]

cpu_to_le32() works as a compile-time constant when given a constant
argument.  You shouldn't need this ugly __constant_ prefix.

Ben.
If that is the case then what is the point of even having the
__constant_ prefixed version of these macros anyway?  I ask because I
know we have had people submit patches in the past replacing htons calls
with __constant_htons and the like and nobody has ever spoken up before
to indicate that these were unnecessary.
[...]

Probably for backward-compatibility, as this wasn't true before Linux
2.6.22.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help