From: Simon Kagstrom Date: Thu, 20 Aug 2009 08:25:59 +0200 Subject: [U-Boot] [PATCH] net: See to it that sent data is aligned to the ethernet controllers wishes In-Reply-To: <4A8C2E92.50403@gmail.com> References: <20090819092607.7d2333e8@marrow.netinsight.se> <20090819095120.709d603b@marrow.netinsight.se> <20090819101719.1e92b340@marrow.netinsight.se> <4A8C2E92.50403@gmail.com> Message-ID: <20090820082559.3e71deb6@marrow.netinsight.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 19 Aug 2009 09:55:46 -0700 Ben Warren wrote: > My preference is for the drivers to handle alignment. OK, I'm fine with that. I'd like to withdraw this patch then. > I like Dave's idea of creating a buffer (or multiple buffers) in initialization(), > then memcpy'ing to to it in the send() routine. You could make it smart > to only memcpy if the frame is not aligned as needed. It already only memcpys unaligned buffers, but I'll go with Daves suggestion and allocate it at startup instead. > Your original patch created a buffer of size 9000, which I commented was > probably bigger than necessary. I didn't see a response to that (which > doesn't mean you didn't send one, but I get a lot of e-mail :) I was off for vacation [*], so I only sent it this week. I'll rework this patch a bit to address a small bug I found. Thanks for the comments! // Simon [*] By now the U-boot list is probably tired of hearing about my vacation, but I can assure you that I had a good time!