RE: [PATCH] mlx4_en: fix transmit of packages when blue frame isenabled
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-10-09 07:29:12
Also in:
netdev
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-10-09 07:29:12
Also in:
netdev
On Thu, 2011-10-06 at 15:10 +0100, David Laight wrote:
horrid... 1) I'm not sure the caller expects the buffer to be corrupted. 2) It contains a lot of memory cycles. 3) It looked from the calls that this code is copying descriptors, so the transfer length is probably 1 or 2 words - so the loop is inefficient. 4) ppc doesn't have a fast byteswap instruction (very new gcc might use the byteswapping memery access for the le32_to_cpu() though), so it would be better getting the byteswap done inside __iowrite64_copy() - since that is probably requesting a byteswap anyway. OTOH I'm not at all clear about the 64bit xfers....
And it's just plain wrong anyway. You should never have to byteswap a copy. Ben.