RE: [PATCH] mlx4_en: fix transmit of packages when blue frame isenabled

2011-10-09 Thread Benjamin Herrenschmidt
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

Re: [PATCH] mlx4_en: fix transmit of packages when blue frame isenabled

2011-10-07 Thread Thadeu Lima de Souza Cascardo
On Thu, Oct 06, 2011 at 03:10:28PM +0100, David Laight wrote: static void mlx4_bf_copy(unsigned long *dst, unsigned long *src, unsigned bytecnt) { + int i; + __le32 *psrc = (__le32 *)src; + + /* +* the buffer is already in big endian. For little endian machines that's

RE: [PATCH] mlx4_en: fix transmit of packages when blue frame isenabled

2011-10-06 Thread David Laight
static void mlx4_bf_copy(unsigned long *dst, unsigned long *src, unsigned bytecnt) { + int i; + __le32 *psrc = (__le32 *)src; + + /* + * the buffer is already in big endian. For little endian machines that's + * fine. For big endain machines we must swap since the